Skip to content

Commit 8309fb3

Browse files
committed
Internal: Move code to success callback when mediaelement is loaded - refs BT#21508
1 parent d945558 commit 8309fb3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

assets/vue/composables/mediaElementLoader.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ const videoSelector = "video:not(.skip), audio:not(.skip)"
77

88
const mejsOptions = {
99
iconSprite,
10+
11+
/**
12+
* @param {HTMLDivElement} media
13+
* @param {HTMLVideoElement|HTMLAudioElement|HTMLIFrameElement} node
14+
*/
15+
success(media, node) {
16+
node.classList.add("not-prose")
17+
},
1018
}
1119

1220
function newVideosCallback(newVideo) {
@@ -16,8 +24,6 @@ function newVideosCallback(newVideo) {
1624
return
1725
}
1826

19-
newVideo.classList.add("not-prose")
20-
2127
// eslint-disable-next-line no-undef
2228
new MediaElementPlayer(newVideo, mejsOptions)
2329
}

0 commit comments

Comments
 (0)