Compare commits

..

No commits in common. "9cb4300004e71f5c3ede04ea6af36452a0e53023" and "440a78b6910e669bad8de2cddf394e2f57081db0" have entirely different histories.

View File

@ -9,8 +9,7 @@ init()
function init() {
document.querySelectorAll('.slide').forEach(function(slide) {
slides.push(slide)
var data = slideData[slides.length - 1] = load_slide(slide);
data.idx = slides.length - 1;
var data = slideData[slides.length - 1] = load_slide(slide)
if (data.video && data.video.length) {
data.embed = init_embed(data)
}
@ -63,7 +62,7 @@ function stop(idx) {
if (data.zoom_to) {
reset_zoom(data)
} else if (data.video && data.video.length) {
reset_video(data)
pause_video(data)
}
}
@ -94,19 +93,12 @@ function load_slide(slide) {
function init_embed(data) {
var embed = window.currentEmbed = new PandoraEmbed({
id: 'slide-' + data.idx,
id: 'fixme',
url: data.video[0],
container: data.container
});
embed.on('init', function(data) {
});
embed.on('playing', function(positionData) {
if (!slideData[data.idx].start) {
slideData[data.idx].start = positionData.position;
}
});
return embed;
}
@ -143,10 +135,9 @@ function start_video(data) {
})
}
function reset_video(data) {
function pause_video(data) {
data.embed.postMessage('options', {
'paused': true,
'position': data.start || 0
'paused': true
})
}