MDL-63453 media_videojs: Upgrade Video.JS to 7.6.5.
Upgrade videojs media player to version 7.6.5 as well as a general update this adds MPEG-DASH and HLS playlist support to the Video.JS media player.
This commit is contained in:
committed by
Matt Porritt
parent
4487612c4a
commit
411bbe6ba0
@@ -1165,4 +1165,39 @@ class core_useragent {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if current browser supports the HLS and MPEG-DASH video
|
||||
* streaming formats. Most browsers get this from Media Source Extensions.
|
||||
* Safari on iOS, doesn't support MPEG-DASH at all.
|
||||
*
|
||||
* Note, the check here is not 100% accurate!
|
||||
*
|
||||
* Also we assume that users of Firefox/Chrome/Safari do not use the ancient versions of browsers.
|
||||
*
|
||||
* We check the exact version for IE/Edge though. We know that there are still users of very old
|
||||
* versions that are afraid to upgrade or have slow IT department.
|
||||
*
|
||||
* Resources:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API
|
||||
* https://caniuse.com/#search=mpeg-dash
|
||||
* https://caniuse.com/#search=hls
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function supports_media_source_extensions(string $extension) : bool {
|
||||
// Not supported in IE below 11.0.
|
||||
if (self::is_ie() && !self::check_ie_version('11.0')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($extension == '.mpd') {
|
||||
// Not supported is iOS on Safari.
|
||||
if (self::is_safari_ios()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user