canplay => loadedmetadata

This commit is contained in:
remy 2011-05-13 23:59:01 +01:00
parent 2b7cb018d8
commit 3ba2931b6d
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ addEvent(video, 'ended', function () {
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;
ready = true;
document.querySelector('#duration').innerHTML = asTime(this.duration);