Browser::isMobile PHP Method

isMobile() public method

Is the browser from a mobile device?
public isMobile ( ) : boolean
return boolean True if the browser is from a mobile device otherwise false
    public function isMobile()
    {
        return $this->_is_mobile;
    }

Usage Example

 /**
  * Returns the stream URL for the media. A direct link will be returned if 
  * the user is on a mobile device or if the "singleFilePlaylist" setting 
  * is enabled, otherwise the media playlist URL will be returned
  * @return string the stream URL
  */
 protected function getStreamUrl()
 {
     if (count($this->_links) === 1 && (Setting::getBoolean('singleFilePlaylist') || (Browser::isMobile() || Browser::isTablet()))) {
         return $this->_links[0]->url;
     } else {
         return $this->getPlayListAction();
     }
 }
All Usage Examples Of Browser::isMobile