Skip to content

Commit

Permalink
MDL-72407 videojs: Remove videojs-flash and videojs-swf libraries
Browse files Browse the repository at this point in the history
Apart from removing these libraries because the Flash Player was deprecated
in 2017 and officially discontinued on 31 December 2020, the rtmp and useflash
settings have been removed too (they make no sense anymore).
  • Loading branch information
sarjona committed Oct 4, 2021
1 parent 1a9bee6 commit 2a3527c
Show file tree
Hide file tree
Showing 19 changed files with 108 additions and 1,627 deletions.
2 changes: 0 additions & 2 deletions filter/mediaplugin/tests/filter_test.php
Expand Up @@ -36,7 +36,6 @@ function test_filter_mediaplugin_link() {

// We need to enable the media plugins.
\core\plugininfo\media::set_enabled_plugins('vimeo,youtube,videojs,html5video,html5audio');
set_config('useflash', true, 'media_videojs');

$filterplugin = new filter_mediaplugin(null, array());

Expand All @@ -59,7 +58,6 @@ function test_filter_mediaplugin_link() {
'<a href="http://youtu.be/JghQgA2HMX8" class="href=css">test file</a>',
'<a href="http://y2u.be/JghQgA2HMX8" class="href=css">test file</a>',
'<a class="youtube" href="http://www.youtube.com/watch?v=JghQgA2HMX8">test file</a>',
'<a class="_blanktarget" href="http://moodle.org/testfile/test.flv?d=100x100">test flv</a>',
'<a class="hrefcss" href="http://www.youtube.com/watch?v=JghQgA2HMX8">test file</a>',
'<a class="content" href="http://moodle.org/testfile/test.ogg">test ogg</a>',
'<a id="audio" href="http://moodle.org/testfile/test.mp3">test mp3</a>',
Expand Down
2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/loader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/loader.min.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions media/player/videojs/amd/build/videojs-flash-lazy.min.js

This file was deleted.

This file was deleted.

7 changes: 1 addition & 6 deletions media/player/videojs/amd/src/loader.js
Expand Up @@ -24,7 +24,6 @@
*/

import Ajax from 'core/ajax';
import Config from 'core/config';
import {eventTypes} from 'core_filters/events';
import LocalStorage from 'core/localstorage';
import Notification from 'core/notification';
Expand Down Expand Up @@ -88,14 +87,10 @@ const notifyVideoJS = e => {
// Add YouTube to the list of modules we require.
modulePromises.push(import('media_videojs/Youtube-lazy'));
}
if (config.techOrder && config.techOrder.indexOf('flash') !== -1) {
// Add Flash to the list of modules we require.
modulePromises.push(import('media_videojs/videojs-flash-lazy'));
}

Promise.all([langStrings, ...modulePromises])
.then(([langJson, videojs]) => {
if (firstLoad) {
videojs.options.flash.swf = `${Config.wwwroot}/media/player/videojs/videojs/video-js.swf`;
videojs.options.playbackRates = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
videojs.options.userActions = {
hotkeys: true,
Expand Down

0 comments on commit 2a3527c

Please sign in to comment.