Internal: Move code to success callback when mediaelement is loaded - refs BT#21508

pull/5509/head
Angel Fernando Quiroz Campos 1 year ago
parent d9455580cc
commit 8309fb3cab
  1. 10
      assets/vue/composables/mediaElementLoader.js

@ -7,6 +7,14 @@ const videoSelector = "video:not(.skip), audio:not(.skip)"
const mejsOptions = {
iconSprite,
/**
* @param {HTMLDivElement} media
* @param {HTMLVideoElement|HTMLAudioElement|HTMLIFrameElement} node
*/
success(media, node) {
node.classList.add("not-prose")
},
}
function newVideosCallback(newVideo) {
@ -16,8 +24,6 @@ function newVideosCallback(newVideo) {
return
}
newVideo.classList.add("not-prose")
// eslint-disable-next-line no-undef
new MediaElementPlayer(newVideo, mejsOptions)
}

Loading…
Cancel
Save