just default streamPrefix to pandoraURL for now
This commit is contained in:
parent
e89d8fd13d
commit
e9378efc62
2 changed files with 9 additions and 9 deletions
|
@ -168,13 +168,13 @@ function renderAnnotation(config, video, root, clip) {
|
||||||
}
|
}
|
||||||
var values = []
|
var values = []
|
||||||
clip.annotations.forEach(a => {
|
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>')
|
values = values.join('<br><br>')
|
||||||
div.innerHTML = `
|
div.innerHTML = `
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<figure>
|
<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}
|
${figcaption}
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
@ -187,7 +187,7 @@ function renderAnnotation(config, video, root, clip) {
|
||||||
if (clip.src) {
|
if (clip.src) {
|
||||||
src = clip.src
|
src = clip.src
|
||||||
} else if (config.edit) {
|
} else if (config.edit) {
|
||||||
src = `${pandoraURL}/${annotation.id.split('/')[0]}/480p.webm`
|
src = `${streamPrefix}/${annotation.id.split('/')[0]}/480p.webm`
|
||||||
}
|
}
|
||||||
if (config.loaded && visible) {
|
if (config.loaded && visible) {
|
||||||
updatePlayer(video, frame, annotation['in'], annotation['out'], src, config)
|
updatePlayer(video, frame, annotation['in'], annotation['out'], src, config)
|
||||||
|
@ -213,7 +213,7 @@ function renderAnnotations(config) {
|
||||||
video.WebKitPlaysInline = true
|
video.WebKitPlaysInline = true
|
||||||
video.muted = true
|
video.muted = true
|
||||||
if (config.item) {
|
if (config.item) {
|
||||||
setVideoSrc(video, `${pandoraURL}/${config.item}/480p.webm`)
|
setVideoSrc(video, `${streamPrefix}/${config.item}/480p.webm`)
|
||||||
}
|
}
|
||||||
video.addEventListener('timeupdate', timeupdate)
|
video.addEventListener('timeupdate', timeupdate)
|
||||||
video.addEventListener('touchstart', showOverlay)
|
video.addEventListener('touchstart', showOverlay)
|
||||||
|
@ -233,7 +233,7 @@ function renderAnnotations(config) {
|
||||||
if (frame) {
|
if (frame) {
|
||||||
var src
|
var src
|
||||||
if (config.edit) {
|
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, config)
|
updatePlayer(video, frame, config.first['in'], config.first['out'], src, config)
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ async function loadAnnotations(config) {
|
||||||
function renderSingleMode(config) {
|
function renderSingleMode(config) {
|
||||||
var src
|
var src
|
||||||
config.annotations.forEach(annotation => {
|
config.annotations.forEach(annotation => {
|
||||||
src = annotation.src = `${pandoraURL}/${annotation.id.split('/')[0]}/480p.webm`
|
src = annotation.src = `${streamPrefix}/${annotation.id.split('/')[0]}/480p.webm`
|
||||||
})
|
})
|
||||||
var div = document.createElement('div')
|
var div = document.createElement('div')
|
||||||
var annotation = config.annotations[0].annotations[0]
|
var annotation = config.annotations[0].annotations[0]
|
||||||
|
@ -400,7 +400,7 @@ function renderSingleMode(config) {
|
||||||
div.innerHTML = `
|
div.innerHTML = `
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<figure>
|
<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}
|
${figcaption}
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
@ -422,7 +422,7 @@ function renderSingleMode(config) {
|
||||||
config.annotations.forEach(clip => {
|
config.annotations.forEach(clip => {
|
||||||
var values = []
|
var values = []
|
||||||
clip.annotations.forEach(a => {
|
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>')
|
values = values.join('<br><br>')
|
||||||
var annot = document.createElement('div')
|
var annot = document.createElement('div')
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<script>
|
<script>
|
||||||
var config = {{ text.json | safe }};
|
var config = {{ text.json | safe }};
|
||||||
var pandoraURL = "{{ pandora_url }}";
|
var pandoraURL = "{{ pandora_url }}";
|
||||||
var streamPrefix = "{{ stream_prefix }}";
|
var streamPrefix = "{{ pandora_url }}";
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/js/api.js?2021112223"></script>
|
<script src="/static/js/api.js?2021112223"></script>
|
||||||
{% if text.data.view == 'player' %}
|
{% if text.data.view == 'player' %}
|
||||||
|
|
Loading…
Reference in a new issue