Bug 198296 - missing error event after the connection is interrupted and some media data has been received
Summary: missing error event after the connection is interrupted and some media data h...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 12
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-28 08:59 PDT by Massimiliano Mura
Modified: 2019-06-27 02:03 PDT (History)
2 users (show)

See Also:


Attachments
Test case (846 bytes, text/html)
2019-06-27 01:46 PDT, tomasz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Massimiliano Mura 2019-05-28 08:59:43 PDT
Summary: No error is fired after the connection is interrupted and some media data has been received, causing the user agent to give up trying to fetch the resource.

I've replicate the bug using the BBC Standard Media Player and with a basic HTML page too on iOS 12.3.1, iPhone 6s

To reproduce it, play a HLS video, go offline (I'm using Network Link Conditioner) and once the buffered video will finish to play you'll get a WAITING event and not a error one.

Thank you,
Massimiliano
Comment 1 Radar WebKit Bug Importer 2019-05-28 17:17:18 PDT
<rdar://problem/51202282>
Comment 2 tomasz 2019-06-27 01:46:11 PDT
Created attachment 373010 [details]
Test case
Comment 3 tomasz 2019-06-27 02:03:16 PDT
I experienced the same issue in Safari 12.1.1 (macOS 10.14.5).

Test case
1. Open `test_case.html` in Safari
2. Press _Play_ button
3. Then PROGRESS events are fired
4. Turn off internet connection
5. Then STALLED and OFFLINE events are fired
6. Then "Failed to load resource: The internet connection appears to be offline".
7. Turn on internet connection
8. Then buffer is empty
9. Then the WAITING event is fired
10. Then playback hangs
11. Then the ERROR event is NOT fired


...finally the video element is broken. It's not possible to resume playback using play, pause or seek.

I would like to note that the behaviour was different in previous versions. Safari was able to resume loading content after connection was back:

1. Open `test_case.html` in Safari
2. Press _Play_ button
3. Then PROGRESS events are fired
4. Turn off internet connection
5. Then STALLED and OFFLINE events are fired
6. Then "Failed to load resource: The internet connection appears to be offline".
7. Turn on internet connection
8. Then the buffer is NOT empty
9. Then PROGRESS events are fired (loading content is back)
10. Then video continues to play