Bug 262886

Summary: iOS 17.1 beta 2: ManagedMediaSource video playback stops when changing timestampOffset
Product: WebKit Reporter: Mattias <mattias.bergstrom>
Component: MediaAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: jean-yves.avenard, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: iPhone / iPad   
OS: iOS 17   
Attachments:
Description Flags
Example code to reproduce the isssue none

Description Mattias 2023-10-09 06:54:44 PDT
Created attachment 468122 [details]
Example code to reproduce the isssue

Video playback stops on iOS beta 2 when timestampOffset is changed. This does not happen on macOS with Managed MediaSource.

The error only occurs when the currentTime is close to the segment being appended after the timestampOffset has been changed. If the buffer is long enough the video does not freeze.

There is a minimal example attached that can reproduce the issue. The example creates a ManagedMediaSource and starts appending segments. It will then set the currentTime on the video element to different latencies depending on if the "?lowLatency=true" query parameter has been set or not. At the 6th segment the timestampOffset will be set to -0.5s which will cause the playback to stop at around 10s if the lowLatency flag has been set.

Reproducing the bug using the example attached:

1. Serve the html, js + media files with a web sever - "npx serve" or similar.
2. Open the page with the query parameter "?lowLatency=true".
3. Observe that the video stops around 10s in.

Best regards,
Mattias
Comment 1 Radar WebKit Bug Importer 2023-10-09 17:08:21 PDT
<rdar://problem/116707511>
Comment 2 Jean-Yves Avenard [:jya] 2023-10-12 07:15:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18995
Comment 3 EWS 2023-10-12 18:41:32 PDT
Committed 269290@main (3acdede1a2e2): <https://commits.webkit.org/269290@main>

Reviewed commits have been landed. Closing PR #18995 and removing active labels.