single mode

This commit is contained in:
j 2022-09-07 12:12:31 +02:00
commit a27e1d4686
2 changed files with 78 additions and 5 deletions

View file

@ -84,10 +84,15 @@ class PandoraScroll extends HTMLElement {
config.root = this.shadowRoot.querySelector('.pandora-scroll')
config.video = document.querySelector('video')
loadAnnotations(config).then(config => {
config.annotations.forEach(annotation => {
annotation.src = `${streamPrefix}/${annotation.id.split('/')[0]}/480p.webm`
renderAnnotation(window.config, config.video, config.root, annotation)
})
config.loaded = true
if (config.mode == "single") {
renderSingleMode(config)
} else {
config.annotations.forEach(annotation => {
annotation.src = `${streamPrefix}/${annotation.id.split('/')[0]}/480p.webm`
renderAnnotation(window.config, config.video, config.root, annotation)
})
}
})
}