Merge branch 'develop' of https://github.com/frappe/lms into develop
This commit is contained in:
@@ -334,7 +334,6 @@ const props = defineProps({
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
startTimer()
|
startTimer()
|
||||||
enablePlyr()
|
|
||||||
document.addEventListener('fullscreenchange', attachFullscreenEvent)
|
document.addEventListener('fullscreenchange', attachFullscreenEvent)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -473,6 +472,7 @@ watch(
|
|||||||
() => lesson.data,
|
() => lesson.data,
|
||||||
(data) => {
|
(data) => {
|
||||||
setupLesson(data)
|
setupLesson(data)
|
||||||
|
enablePlyr()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -531,26 +531,28 @@ export const enablePlyr = () => {
|
|||||||
const videoElement = document.getElementsByClassName('video-player')
|
const videoElement = document.getElementsByClassName('video-player')
|
||||||
if (videoElement.length === 0) return
|
if (videoElement.length === 0) return
|
||||||
|
|
||||||
const src = videoElement[0].getAttribute('src')
|
Array.from(videoElement).forEach((video) => {
|
||||||
if (src) {
|
const src = video.getAttribute('src')
|
||||||
let videoID = src.split('/').pop()
|
if (src) {
|
||||||
videoElement[0].setAttribute('data-plyr-embed-id', videoID)
|
let videoID = src.split('/').pop()
|
||||||
}
|
video.setAttribute('data-plyr-embed-id', videoID)
|
||||||
new Plyr('.video-player', {
|
}
|
||||||
youtube: {
|
new Plyr(video, {
|
||||||
noCookie: true,
|
youtube: {
|
||||||
},
|
noCookie: true,
|
||||||
controls: [
|
},
|
||||||
'play-large',
|
controls: [
|
||||||
'play',
|
'play-large',
|
||||||
'progress',
|
'play',
|
||||||
'current-time',
|
'progress',
|
||||||
'mute',
|
'current-time',
|
||||||
'volume',
|
'mute',
|
||||||
'fullscreen',
|
'volume',
|
||||||
],
|
'fullscreen',
|
||||||
})
|
],
|
||||||
}, 500)
|
})
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const openSettings = (category, close) => {
|
export const openSettings = (category, close) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user