canplay => loadedmetadata
This commit is contained in:
parent
2b7cb018d8
commit
3ba2931b6d
|
@ -43,7 +43,8 @@ addEvent(video, 'ended', function () {
|
||||||
togglePlay.value = "play";
|
togglePlay.value = "play";
|
||||||
});
|
});
|
||||||
|
|
||||||
addEvent(video, 'canplay', function () {
|
// this used to be canplay, but really it should have been loadedmetadata - sorry folks
|
||||||
|
addEvent(video, 'loadedmetadata', function () {
|
||||||
video.muted = true;
|
video.muted = true;
|
||||||
ready = true;
|
ready = true;
|
||||||
document.querySelector('#duration').innerHTML = asTime(this.duration);
|
document.querySelector('#duration').innerHTML = asTime(this.duration);
|
||||||
|
|
Loading…
Reference in New Issue