[Webkit-unassigned] [Bug 184443] TextTrack not rendered in edge case with autoplay

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 12 11:21:18 PDT 2018


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

--- Comment #6 from Oren Me <oren.me at gmail.com> ---
I apologise Eric, I accidentally uploaded the wrong test page. 

I can't see how to upload another file here, so I'll paste it here, let me know if this is OK:

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Demo</title>
  <meta name="description" content="Demo">

</head>

<body>
  <video controls muted width=640 height=360></video>
  <textarea cols=50 rows=25></textarea>
  <script>
        var textArea = document.querySelector("textarea");
        function prependToTextArea(text){
                console.warn(text);
                textArea.value = text + "\n" + textArea.value;
        }
        var nativeEvents = [
                'loadstart',
                'progress',
                'suspend',
                'abort',
                'error',
                'emptied',
                'stalled',
                'play',
                'pause',
                'loadedmetadata',
                'loadeddata',
                'waiting',
                'playing',
                'canplay',
                'canplaythrough',
                'seeking',
                'seeked',
                // 'timeupdate',
                'ended',
                'ratechange',
                'durationchange',
                'volumechange'
        ];
        var vid = document.querySelector("video");

        prependToTextArea("set source");
        vid.src= "http://tinyurl.com/y9udlma6";
        prependToTextArea("call play");
        // vid.play();
        nativeEvents.forEach((event) =>
                vid.addEventListener(event, (e)=> prependToTextArea("event: " + e.type))
        );
        ["loadedmetadata", "canplay"].forEach((event) =>
                vid.addEventListener(event, (e)=>{
                        prependToTextArea("No of text tracks: " + vid.textTracks.length);
                        if (vid.textTracks.length > 0){
                                for  (var i = 0; i< vid.textTracks.length; i++){
                                        vid.textTracks.onchange = () => prependToTextArea("text track changed");
                                        vid.textTracks[i].oncuechange = (e) => prependToTextArea("VTTCue changed: " + e.currentTarget.activeCues[0].text)
                                }
                        }
                })
        );
  </script>

</body>
</html>

-- 
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/20180412/9ae1a7a1/attachment-0002.html>


More information about the webkit-unassigned mailing list