Compat peertube v6
This commit is contained in:
parent
c91738bd38
commit
3fbd095af3
@ -6,12 +6,18 @@ export function buildPlayer (video, player, videojs) {
|
|||||||
|
|
||||||
const fieldName = 'player-annotations'
|
const fieldName = 'player-annotations'
|
||||||
|
|
||||||
if (!video.pluginData || !video.pluginData[fieldName]) return
|
if (!video.pluginData || !video.pluginData[fieldName]) {
|
||||||
|
player.overlay({ overlays: [] })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const annotationsText = video.pluginData[fieldName]
|
const annotationsText = video.pluginData[fieldName]
|
||||||
|
|
||||||
const annotations = parseAnnotations(video, annotationsText)
|
const annotations = parseAnnotations(video, annotationsText)
|
||||||
if (!annotations) return
|
if (!annotations) {
|
||||||
|
player.overlay({ overlays: [] })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
console.log('Will inject annotations in player.', annotations)
|
console.log('Will inject annotations in player.', annotations)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user