mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-56829 media_videojs: play inline on iPhone with ios 10
This commit is contained in:
parent
3eabedbb92
commit
7d94f001e2
1 changed files with 9 additions and 0 deletions
|
@ -145,6 +145,15 @@ class media_videojs_plugin extends core_media_player_native {
|
||||||
$attributes += ['width' => $width] + ($height ? ['height' => $height] : []);
|
$attributes += ['width' => $width] + ($height ? ['height' => $height] : []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (core_useragent::is_ios(10)) {
|
||||||
|
// Hides native controls and plays videos inline instead of fullscreen,
|
||||||
|
// see https://github.com/videojs/video.js/issues/3761 and
|
||||||
|
// https://github.com/videojs/video.js/issues/3762 .
|
||||||
|
// iPhone with iOS 9 still displays double controls and plays fullscreen.
|
||||||
|
// iPhone with iOS before 9 display only native controls.
|
||||||
|
$attributes += ['playsinline' => 'true'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($text !== null) {
|
if ($text !== null) {
|
||||||
// Original text already had media tag - add necessary attributes and replace sources
|
// Original text already had media tag - add necessary attributes and replace sources
|
||||||
// with the supported URLs only.
|
// with the supported URLs only.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue