use streaming proxy
This commit is contained in:
parent
16a9439152
commit
c230b57dca
9 changed files with 34 additions and 25 deletions
|
|
@ -211,13 +211,13 @@ function renderAnnotation(config, video, ascroll, clip) {
|
|||
}
|
||||
var values = []
|
||||
clip.annotations.forEach(a => {
|
||||
values.push(a.value.replace(/src="\//g, `src="${pandoraURL}/`).replace(/href="\//g, `href="${pandoraURL}/`))
|
||||
values.push(a.value.replace(/src="\//g, `src="${streamPrefix}/`).replace(/href="\//g, `href="${pandoraURL}/`))
|
||||
})
|
||||
values = values.join('<br><br>')
|
||||
div.innerHTML = `
|
||||
<div class="frame">
|
||||
<figure>
|
||||
<img src="${pandoraURL}/${annotation.id.split('/')[0]}/${imageResolution}p${annotation.in}.jpg">
|
||||
<img src="${streamPrefix}/${annotation.id.split('/')[0]}/${imageResolution}p${annotation.in}.jpg">
|
||||
${figcaption}
|
||||
</figure>
|
||||
</div>
|
||||
|
|
@ -228,7 +228,7 @@ function renderAnnotation(config, video, ascroll, clip) {
|
|||
document.addEventListener('scroll', onVisibilityChange(div.querySelector('.frame'), function(visible) {
|
||||
var src
|
||||
if (config.edit) {
|
||||
src = `${pandoraURL}/${annotation.id.split('/')[0]}/480p.webm`
|
||||
src = `${streamPrefix}/${annotation.id.split('/')[0]}/480p.webm`
|
||||
}
|
||||
if (config.loaded && visible) {
|
||||
updatePlayer(video, frame, annotation['in'], annotation['out'], src)
|
||||
|
|
@ -248,7 +248,7 @@ function renderAnnotations(config) {
|
|||
video.WebKitPlaysInline = true
|
||||
video.muted = true
|
||||
if (config.item) {
|
||||
setVideoSrc(video, `${pandoraURL}/${config.item}/480p.webm`)
|
||||
setVideoSrc(video, `${streamPrefix}/${config.item}/480p.webm`)
|
||||
}
|
||||
video.addEventListener('timeupdate', timeupdate)
|
||||
video.addEventListener('touchstart', showOverlay)
|
||||
|
|
@ -268,7 +268,7 @@ function renderAnnotations(config) {
|
|||
if (frame) {
|
||||
var src
|
||||
if (config.edit) {
|
||||
src = `${pandoraURL}/${config.first.id.split('/')[0]}/480p.webm`
|
||||
src = `${streamPrefix}/${config.first.id.split('/')[0]}/480p.webm`
|
||||
}
|
||||
updatePlayer(video, frame, config.first['in'], config.first['out'], src)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ function renderPlayer(config) {
|
|||
video.muted = false
|
||||
video.controls = true
|
||||
if (config.item) {
|
||||
setVideoSrc(video, `${pandoraURL}/${config.item}/480p.webm`)
|
||||
video.poster = `${pandoraURL}/${config.item}/480p.jpg`
|
||||
setVideoSrc(video, `${streamPrefix}/${config.item}/480p.webm`)
|
||||
video.poster = `${streamPrefix}/${config.item}/480p.jpg`
|
||||
}
|
||||
video.addEventListener('timeupdate', timeupdate)
|
||||
var box = document.createElement('div')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue