Skip to content

Commit

Permalink
Merge branch 'wip-MDL-56829-master-2' of git://github.com/marinaglanc…
Browse files Browse the repository at this point in the history
…y/moodle
  • Loading branch information
David Monllao committed Nov 30, 2016
2 parents 449b730 + 7d94f00 commit 8c291fb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions media/player/videojs/classes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ public function embed($urls, $name, $width, $height, $options) {
$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) {
// Original text already had media tag - add necessary attributes and replace sources
// with the supported URLs only.
Expand Down

0 comments on commit 8c291fb

Please sign in to comment.