Bug 247804 - Media element timeupdates continue after turning wi-fi off, no network error
Summary: Media element timeupdates continue after turning wi-fi off, no network error
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 16
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-11 07:24 PST by Robert Bryer
Modified: 2023-01-12 03:49 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Bryer 2022-11-11 07:24:43 PST
1. Start playing a video (HLS)
2. Turn the wifi (or other internet) off in settings and await buffer exhaustion after a few minutes of playback

After running out of data, timeupdates continue with increasing currentTime values still come out. There's no data so the media is not progressing.

I would expect instead an error MEDIA_ERR_NETWORK (2) — this does not come out.

When playback resumes when the wifi is back on, it seems to jump forward.
Comment 1 Radar WebKit Bug Importer 2022-11-18 07:25:21 PST
<rdar://problem/102514414>
Comment 2 Robert Bryer 2022-12-02 07:39:20 PST
Ok, so along the same lines here, if there's any failure at all to download HLS fragments, there's no error event at all.

Here's an example HLS programme but only the first four segments (~30s) exist, so all the rest 404:
http://smp-scratch.tools.bbc.co.uk/bob/samples/hls/partial/hls-plain.html

In this case, after the 30s, I _sometimes_ get the increasing timeupdates, sometimes just a waiting event.

Regardless of bad timeupdates or waiting, I'm not getting any MediaElement network error - and there's no way to tell that anything has gone wrong loading the resource at all.
Comment 3 Smoley 2022-12-07 13:42:24 PST
Thanks for filing, I've not been able to reproduce this on Safari 16.1 or 16.4 (STP). On which version of Safari are you seeing this issue?
Comment 4 Robert Bryer 2023-01-12 03:23:43 PST
It's definitely on Safari 16.1

Testing a bit more, I think it needs the video to be muted (I've amended the example page to start muted) and also the video has to go out and back in to visibility before the connection is cut (background suspension?).
Comment 5 Robert Bryer 2023-01-12 03:49:09 PST
Regardless of the timeupdates, is there any hope of adding in the error event once it's given up trying to fetch segments? If I want to detect a problem with the example stream, I need to set a timer on the waiting event and trigger after waiting for too long.