Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/10/2015 12:24:24 PM (10 years ago)
Author:
imath
Message:

Avatar UI : improve the camera feature

  • Change the name of the tab: "Camera" is now replaced by "Take Photo"
  • Improve the user feedback messages
  • Completely disable the feature for Internet Explorer and Safari as they do not support getUserMedia.

Props r-a-y, boonebgorges.

Fixes #6425

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-avatars.php

    r9828 r9860  
    18391839 * @since  BuddyPress (2.3.0)
    18401840 *
     1841 * @global $is_safari
     1842 * @global $is_IE
    18411843 * @return bool True to load the Webcam Avatar UI part. False otherwise.
    18421844 */
    18431845function bp_avatar_use_webcam() {
     1846    global $is_safari, $is_IE;
     1847
    18441848    /**
    18451849     * Do not use the webcam feature for mobile devices
     
    18471851     */
    18481852    if ( wp_is_mobile() ) {
     1853        return false;
     1854    }
     1855
     1856    /**
     1857     * Bail when the browser does not support getUserMedia.
     1858     *
     1859     * @see  http://caniuse.com/#feat=stream
     1860     */
     1861    if ( $is_safari || $is_IE ) {
    18491862        return false;
    18501863    }
Note: See TracChangeset for help on using the changeset viewer.