Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue/298-client-side' into issu…
Browse files Browse the repository at this point in the history
…e/298
  • Loading branch information
swashbuck committed Sep 30, 2024
2 parents 629762b + 282d3bc commit 84e8616
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions js/mediaLibrariesOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ Object.assign(window.mejs.MediaElementPlayer.prototype, {
},

/**
* because the fullscreen events and properties are still vendor-prefixed in some browsers...
*/
* because the fullscreen events and properties are still vendor-prefixed in some browsers...
*/
getVendorPrefix() {
const browser = device.browser;

Expand Down
25 changes: 15 additions & 10 deletions js/mediaView.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
import Adapt from 'core/js/adapt';
import wait from 'core/js/wait';
import offlineStorage from 'core/js/offlineStorage';
import a11y from 'core/js/a11y';
// import device from 'core/js/device';
import logging from 'core/js/logging';
import ComponentView from 'core/js/views/componentView';
import 'libraries/mediaelement-and-player';
import './mediaLibrariesOverrides';
import('libraries/mediaelement-and-player')
.then(() => {
import('libraries/plugins/speed');
import('libraries/plugins/speed-i18n');
import('libraries/plugins/jump-forward');
import('libraries/plugins/jump-forward-i18n');
import('libraries/plugins/skip-back');
import('libraries/plugins/skip-back-i18n');
});

// instruct adapt to wait whilst loading client-side libraries
wait.for(async done => {
// wait for window.mejs to load
await import('libraries/mediaelement-and-player');
// load plugins
import('libraries/plugins/speed');
import('libraries/plugins/speed-i18n');
import('libraries/plugins/jump-forward');
import('libraries/plugins/jump-forward-i18n');
import('libraries/plugins/skip-back');
import('libraries/plugins/skip-back-i18n');
done();
});

class MediaView extends ComponentView {

Expand Down

0 comments on commit 84e8616

Please sign in to comment.