[Webkit-unassigned] [Bug 243453] New: EXT-X-DATERANGE has incorrect startTime and endTime

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 2 07:28:52 PDT 2022


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

            Bug ID: 243453
           Summary: EXT-X-DATERANGE has incorrect startTime and endTime
           Product: WebKit
           Version: Safari 15
          Hardware: All
                OS: Unspecified
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: lowette at gmail.com

Background:
Safari’s <video> element has native support for HLS streams. These HLS streams can contain timed metadata through the #EXT-X-DATERANGE tag. (https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-11#section-4.4.5.1)

Issue:
Safari extracts the incorrect startTime and endTime of #EXT-X-DATERANGE cues. 

Expected behavior:
Safari should extract the correct attributes related to #EXT-X-DATERANGE tags, for any type of stream (e.g. VOD, Live) and content protection mechanism (unencrypted, AES-128, FairPlay, …).

Impact:
Video streaming services are not capable of using #EXT-X-DATERANGE through the native Safari player. By not supporting this, video streaming services cannot use this tag to mark their ad breaks, their ad beacons, …, and makes them resort to solutions outside of the HLS specification.
Furthermore, for streaming services that are unaware of this bug, they might be doing (unintentional) ad fraud by firing ad beacons at inappropriate times informed by an incorrect Safari API.

Reproduction steps A:
1. Go to https://safaridaterange.thijsl.repl.co/index.html.
2. Wait for the video to autoplay, or hit the play button.
3. Confirm that you see something like “0: [startTime: 0] - [endTime: 15] - [value: {"key":"X-DATA","data":"lala”}]” being printed. This line represents the startTime and endTime detected through the API.
4. Confirm that this startTime and endTime should be 363 and 378 instead.

Reproduction steps B:
1. Create a HLS VOD with #EXT-X-DATERANGE tags. Ensure that they are correctly formatted across media playlists, and that you use more than one media playlist.
2. Ensure that your #EXT-X-DATERANGE cues start at a different position than 0.
3. When the video is playing, ensure that your metadata textTrack isn’t disabled.
4. Query the cues, and confirm that the startTime and endTime is incorrect.

Remarks:
* https://safaridaterange.thijsl.repl.co/goodbutinvalid.html is a demo page that has the correct startTime and endTime but has illegal syntax. Why is it illegal? This HLS stream has two video qualities (i.e. media playlists). The first media playlist has the following:

#EXT-X-PROGRAM-DATE-TIME:2022-07-27T12:36:10.000Z
...
#EXT-X-DATERANGE:ID="b",START-DATE="2022-07-27T12:42:13.000Z",DURATION=15.000,X-DATA="lala"

The second media playlist has illegal/weird syntax. It doesn’t have a PLANNED-DURATION, DURATION or END-DATE attribute, but it does have two identical START-DATE attributes:

#EXT-X-PROGRAM-DATE-TIME:2022-07-27T12:36:10.000Z
...
#EXT-X-DATERANGE:ID="b",START-DATE="2022-07-27T12:42:13.000Z",START-DATE="2022-07-27T12:42:13.000Z",X-DATA="lala"

And, even though it’s incorrect, the startTime and endTime will be correct.

You can also click the providing one video quality button on this page to observe that the timings are also correct when you only provide one video quality in your HLS stream.

(I also raised this through https://feedbackassistant.apple.com/feedback/11008280. I wasn't sure what was best.)

-- 
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/20220802/70b907b3/attachment-0001.htm>


More information about the webkit-unassigned mailing list