MDL-85000 media_videojs: Enable Ogv.JS Tech for all browsers
This commit is contained in:
@@ -29,8 +29,11 @@ Feature: Add media to Atto
|
||||
And the field "Enter name" matches value "moodle-logo.webm"
|
||||
And I wait until the page is ready
|
||||
And I click on "Insert media" "button"
|
||||
When I click on "Save changes" "button"
|
||||
Then "//a[. = 'moodle-logo.webm']" "xpath_element" should exist
|
||||
And I click on "Show more buttons" "button"
|
||||
When I click on "HTML" "button"
|
||||
Then I should see "moodle-logo.webm\">moodle-logo.webm</a>"
|
||||
And I click on "Save changes" "button"
|
||||
And ".video-js" "css_element" should exist
|
||||
|
||||
@javascript @atto_media_video
|
||||
Scenario: Insert some media as a plain video
|
||||
|
||||
@@ -308,8 +308,17 @@ class media_videojs_plugin extends core_media_player_native {
|
||||
|
||||
// Ogv.JS Tech.
|
||||
$this->ogvtech = false;
|
||||
if (in_array($ext, $this->ogvsupportedextensions) &&
|
||||
(core_useragent::is_safari() || core_useragent::is_ios())) {
|
||||
/* The following browsers do not support OGV natively:
|
||||
- Chrome (since version 120)
|
||||
- Edge (since version 122)
|
||||
- Safari
|
||||
- Safari on iOS
|
||||
- Firefox (since version 130)
|
||||
- Opera (since version 106)
|
||||
Refer: https://caniuse.com/ogv.
|
||||
We need to enable Ogv.JS Tech plugin for all browsers that do not support OGV natively.
|
||||
*/
|
||||
if (in_array($ext, $this->ogvsupportedextensions)) {
|
||||
$this->ogvtech = true;
|
||||
$result[] = $url;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user