[Webkit-unassigned] [Bug 173387] New: loadedmetadata event triggers before we can report the number of audio and video tracks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 14 16:11:17 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=173387

            Bug ID: 173387
           Summary: loadedmetadata event triggers before we can report the
                    number of audio and video tracks
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: graouts at apple.com
                CC: webkit-bug-importer at group.apple.com

Created attachment 312926

  --> https://bugs.webkit.org/attachment.cgi?id=312926&action=review

Testcase

When a video is loaded, we dispatch the "resize" and "loadedmetadata" events first, but when either is dispatched, at least with a local file, audioTracks and videoTracks are empty. We get "addtracks" events for both of those properties later on, at which point we correctly get the list of tracks. This means that catching a "loadedmetadata" is not sufficient to obtain basic information about the media. In STP 33, the attached test reports the following:

Received "resize" on [object HTMLVideoElement]
    time since last event – "8.50ms"
    videoWidth – 320
    videoHeight – 240
    audioTracks – 0
    videoTracks – 0

Received "loadedmetadata" on [object HTMLVideoElement]
    time since last event – "1.30ms"
    videoWidth – 320
    videoHeight – 240
    audioTracks – 0
    videoTracks – 0

Received "addtrack" on [object AudioTrackList]
    time since last event – "6.60ms"
    videoWidth – 320
    videoHeight – 240
    audioTracks – 1
    videoTracks – 1

Received "addtrack" on [object VideoTrackList]
    time since last event – "0.40ms"
    videoWidth – 320
    videoHeight – 240
    audioTracks – 1
    videoTracks – 1

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170614/041e2a75/attachment.html>


More information about the webkit-unassigned mailing list