WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
202101
Support for callbacks for manifest events
https://bugs.webkit.org/show_bug.cgi?id=202101
Summary
Support for callbacks for manifest events
shivaksk1
Reported
2019-09-23 05:00:33 PDT
Hi Team, It would be good to have callbacks for manifest timed events (HLS). E.g. EXT-X-DATERANGE. This is required for Server Side Dynamic Ad Implementations. For example the Ad related metadata could be passed in this attribute. The App could listen for this metadata callback and take appropriate action based on this. It's supported in the AV player in iOS, but there is no support on Safari.
Attachments
Patch
(29.22 KB, patch)
2019-10-18 10:55 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch for landing
(28.56 KB, patch)
2019-10-18 17:09 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch for landing.
(28.74 KB, patch)
2019-10-25 11:04 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-09-23 10:26:07 PDT
<
rdar://problem/55627676
>
Eric Carlson
Comment 2
2019-10-18 10:55:48 PDT
Created
attachment 381314
[details]
Patch
Jer Noble
Comment 3
2019-10-18 13:56:39 PDT
Comment on
attachment 381314
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=381314&action=review
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3519 > + UNUSED_PARAM(output); > + UNUSED_PARAM(track); > + > + ensureOnMainThread([self, strongSelf = retainPtr(self), metadataGroups = retainPtr(groups)]() mutable { > + m_taskQueue.enqueueTask([player = m_player, metadataGroups = WTFMove(metadataGroups), currentTime = m_player->currentMediaTime()] { > + if (!player) > + return; > + > + for (AVDateRangeMetadataGroup *group in metadataGroups.get()) > + player->metadataDidArrive(retainPtr(group.items), currentTime); > + }); > + });
Nit: why are we using a background queue if we're just going to dispatch to the main thread?
Eric Carlson
Comment 4
2019-10-18 17:09:01 PDT
Created
attachment 381350
[details]
Patch for landing
Eric Carlson
Comment 5
2019-10-25 11:04:56 PDT
Created
attachment 381943
[details]
Patch for landing.
WebKit Commit Bot
Comment 6
2019-10-25 19:37:54 PDT
The commit-queue encountered the following flaky tests while processing
attachment 381943
[details]
: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity.html
bug 203394
(author:
ysuzuki@apple.com
) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 7
2019-10-25 19:38:47 PDT
Comment on
attachment 381943
[details]
Patch for landing. Clearing flags on attachment: 381943 Committed
r251626
: <
https://trac.webkit.org/changeset/251626
>
WebKit Commit Bot
Comment 8
2019-10-25 19:38:49 PDT
All reviewed patches have been landed. Closing bug.
shivaksk1
Comment 9
2021-09-02 22:10:51 PDT
Hi, could you please explain how to listen to this event (EXT-X-DATERANGE) from the html5 video element in Safari browser (on Mac)?
Eric Carlson
Comment 10
2021-09-03 12:04:53 PDT
(In reply to shivaksk1 from
comment #9
)
> Hi, could you please explain how to listen to this event (EXT-X-DATERANGE) > from the html5 video element in Safari browser (on Mac)?
EXT-X-DATERANGE metadata is exposed just like all timed metadata - as a text track with `kind=metadata`. The scripts in this simple test page I wrote, which logs metadata cues as they are emitted, might be helpful:
https://streaming-metadata.glitch.me
shivaksk1
Comment 11
2021-09-06 05:39:22 PDT
Hi Team, Thanks for the quick response. May I know from which Safari browser version this feature is supported?
shivaksk1
Comment 12
2021-09-06 06:13:29 PDT
Also, I have a query: #EXT-X-DATERANGE:ID="adbreak-100076-0",START-DATE="2021-09-06T12:05:34.000Z",DURATION=30,X-PRESENTATION-TIME=1630929934000,CLASS="com.xyz.dai.adbreak" #EXT-X-DATERANGE:ID="tracking-100076-0-0",START-DATE="2021-09-06T12:05:34.000Z",DURATION=1,X-AD-URL="
https://url_1
",X-AD-ID="adbreak-100076-0",CLASS="com.xyz.dai.tracking" In the above manifest, are we supposed to get two cues, one for each EXT-X-DATERANGE tag? Cue 1: contains ID, DURATION, X-PRESENTATION-TIME, CLASS for cue 1 Cue 2: contains ID, DURATION, X-PRESENTATION-TIME, CLASS for cue 2 When I tried to run the sample script on the above manifest, I observed that: - For the first EXT-X-DATERANGE tag, we get one cue, with key = X-PRESENTATION-TIME. - For the second EXT-X-DATERANGE tag, we get 2 cues, - cue 1: {key: X-AD-ID, value: adbreak-100076-0} - cue 2: {key: X-AD-URL, value:
https://url_1
} Could you please explain this behavior?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug