From e9378efc62bf80dfb3a1bf4d09e1540b57fe8946 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 2 Mar 2023 16:30:29 +0100 Subject: [PATCH] just default streamPrefix to pandoraURL for now --- app/static/js/ascroll.js | 16 ++++++++-------- app/templates/text.html | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 7453d4d..0e30230 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -168,13 +168,13 @@ function renderAnnotation(config, video, root, 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('

') div.innerHTML = `
- + ${figcaption}
@@ -187,7 +187,7 @@ function renderAnnotation(config, video, root, clip) { if (clip.src) { src = clip.src } else 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, config) @@ -213,7 +213,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) @@ -233,7 +233,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, config) } @@ -390,7 +390,7 @@ async function loadAnnotations(config) { function renderSingleMode(config) { var src 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 annotation = config.annotations[0].annotations[0] @@ -400,7 +400,7 @@ function renderSingleMode(config) { div.innerHTML = `
- + ${figcaption}
@@ -422,7 +422,7 @@ function renderSingleMode(config) { config.annotations.forEach(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('

') var annot = document.createElement('div') diff --git a/app/templates/text.html b/app/templates/text.html index 806fa03..927e5ad 100644 --- a/app/templates/text.html +++ b/app/templates/text.html @@ -28,7 +28,7 @@ {% if text.data.view == 'player' %}