film pages
This commit is contained in:
parent
205d6f159d
commit
c06436433f
10 changed files with 480 additions and 28 deletions
|
|
@ -1,11 +1,10 @@
|
|||
var cache = cache || {}
|
||||
var layer = 'descriptions'
|
||||
var baseURL = 'https://pad.ma'
|
||||
var imageResolution = 480
|
||||
var videoExtension
|
||||
|
||||
async function pandoraAPI(action, data) {
|
||||
var url = baseURL + '/api/'
|
||||
var url = pandoraURL + '/api/'
|
||||
//var url = '/pandoraAPI/'
|
||||
var key = JSON.stringify([action, data])
|
||||
if (!cache[key]) {
|
||||
|
|
@ -233,13 +232,13 @@ function renderAnnotation(config, video, ascroll, annotation) {
|
|||
var director = annotation.director[0]
|
||||
}
|
||||
var txt = `${title} (${director})`
|
||||
figcaption = `<figcaption><a href="${baseURL}/${annotation.id}" target="_blank">${txt}</a></figcaption>`
|
||||
figcaption = `<figcaption><a href="${pandoraURL}/${annotation.id}" target="_blank">${txt}</a></figcaption>`
|
||||
}
|
||||
annotation.value = annotation.value.replace(/src="\//g, `src="${baseURL}/`).replace(/href="\//g, `href="${baseURL}/`)
|
||||
annotation.value = annotation.value.replace(/src="\//g, `src="${pandoraURL}/`).replace(/href="\//g, `href="${pandoraURL}/`)
|
||||
div.innerHTML = `
|
||||
<div class="frame">
|
||||
<figure>
|
||||
<img src="${baseURL}/${annotation.id.split('/')[0]}/${imageResolution}p${annotation.in}.jpg">
|
||||
<img src="${pandoraURL}/${annotation.id.split('/')[0]}/${imageResolution}p${annotation.in}.jpg">
|
||||
${figcaption}
|
||||
</figure>
|
||||
</div>
|
||||
|
|
@ -250,7 +249,7 @@ function renderAnnotation(config, video, ascroll, annotation) {
|
|||
document.addEventListener('scroll', onVisibilityChange(div.querySelector('.frame'), function(visible) {
|
||||
var src
|
||||
if (config.edit) {
|
||||
src = `${baseURL}/${annotation.id.split('/')[0]}/480p.webm`
|
||||
src = `${pandoraURL}/${annotation.id.split('/')[0]}/480p.webm`
|
||||
}
|
||||
if (config.loaded && visible) {
|
||||
updatePlayer(video, frame, annotation['in'], annotation['out'], src)
|
||||
|
|
@ -270,7 +269,7 @@ function renderAnnotations(config) {
|
|||
video.WebKitPlaysInline = true
|
||||
video.muted = true
|
||||
if (config.item) {
|
||||
setVideoSrc(video, `${baseURL}/${config.item}/480p.webm`)
|
||||
setVideoSrc(video, `${pandoraURL}/${config.item}/480p.webm`)
|
||||
}
|
||||
video.addEventListener('timeupdate', timeupdate)
|
||||
video.addEventListener('touchstart', showOverlay)
|
||||
|
|
@ -290,7 +289,7 @@ function renderAnnotations(config) {
|
|||
if (frame) {
|
||||
var src
|
||||
if (config.edit) {
|
||||
src = `${baseURL}/${config.first.id.split('/')[0]}/480p.webm`
|
||||
src = `${pandoraURL}/${config.first.id.split('/')[0]}/480p.webm`
|
||||
}
|
||||
updatePlayer(video, frame, config.first['in'], config.first['out'], src)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue