Compare commits
No commits in common. "961678fbcac591ca8ccff934bb528fed97fa372b" and "3284c5ca81468711751f9c83401e975391cb4853" have entirely different histories.
961678fbca
...
3284c5ca81
|
@ -1,6 +1,6 @@
|
|||
class Slide {
|
||||
constructor(slide, idx) {
|
||||
this.isAudioLoaded = this.isVideoLoaded = false
|
||||
this.isInit = false
|
||||
this.el = slide
|
||||
this.idx = idx
|
||||
this.duration = slide.dataset.duration
|
||||
|
@ -32,8 +32,8 @@ class Slide {
|
|||
container: this.videoContainer
|
||||
})
|
||||
|
||||
videoEmbed.on('loaded', () => {
|
||||
this.isVideoLoaded = true
|
||||
videoEmbed.on('init', (data) => {
|
||||
this.isVideoInit = true
|
||||
})
|
||||
|
||||
videoEmbed.on('playing', (positionData) => {
|
||||
|
@ -50,8 +50,8 @@ class Slide {
|
|||
container: this.audioContainer
|
||||
})
|
||||
|
||||
audioEmbed.on('loaded', () => {
|
||||
this.isAudioLoaded = true
|
||||
audioEmbed.on('init', (data) => {
|
||||
this.isAudioInit = true
|
||||
})
|
||||
|
||||
audioEmbed.on('playing', (positionData) => {
|
||||
|
@ -64,19 +64,6 @@ class Slide {
|
|||
return this;
|
||||
}
|
||||
|
||||
isReady() {
|
||||
console.log('isReady called');
|
||||
if (this.video && this.audio) {
|
||||
return this.isVideoLoaded && this.isAudioLoaded
|
||||
} else if (this.video) {
|
||||
return this.isVideoLoaded
|
||||
} else if (this.audio) {
|
||||
return this.isAudioLoaded
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
sendToBack() {
|
||||
this.el.style.zIndex = 0
|
||||
return this
|
||||
|
@ -88,7 +75,6 @@ class Slide {
|
|||
}
|
||||
|
||||
start() {
|
||||
console.log('called start', this.isReady())
|
||||
if (this.zooms) {
|
||||
this.startZoom()
|
||||
} else if (this.video && this.video.length) {
|
||||
|
@ -188,14 +174,7 @@ function init() {
|
|||
}
|
||||
|
||||
function go(idx) {
|
||||
if (!slides[idx].isReady()) {
|
||||
console.log('slide not ready');
|
||||
return setTimeout(() => {
|
||||
go(idx)
|
||||
}, 250)
|
||||
}
|
||||
var old = current
|
||||
|
||||
slides[current].sendToBack()
|
||||
slides[idx].bringToFront()
|
||||
current = idx
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
<script src="../lib/PandoraEmbed.js"></script>
|
||||
<link type="text/css" href="example.css" rel="stylesheet" />
|
||||
<div class="base">
|
||||
</div>
|
||||
<div class="slide" data-duration="10">
|
||||
<div class="video" data-volume="0.9" data-url_0="https://pad.ma/BVF/editor/F#embed"
|
||||
></div>
|
||||
|
||||
</div>
|
||||
<div class="slide" data-duration="10">
|
||||
<div class="title">FROM JANTA COLONY TO JANTA COLONY</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>Subscribe to events from pad.ma iframe embed</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe width="640" height="360" src="https://pad.ma/BVF/editor/F#embed" frameborder="0" allowfullscreen id="padembed"></iframe>
|
||||
<iframe width="640" height="360" src="http://pandora/documents/I/649,254,1289,723#embed" frameborder="0" allowfullscreen id="padembed"></iframe>
|
||||
<button id="setUrl">
|
||||
Set Iframe URL
|
||||
</button>
|
||||
|
|
Loading…
Reference in New Issue
Block a user