Commit d9da700
committed
HLS videos sometimes fail to reach "ended" state & cannot be restarted
https://bugs.webkit.org/show_bug.cgi?id=251119
rdar://102114139
Reviewed by Eric Carlson.
When WebKit receives the AVPlayerItemDidPlayToEndTimeNotification notification, it still
attempts to estimate the current time because it believes it is still playing, as it hasn't
yet received the -timeControlStatus KVO. Reset the values for currentTime estimation when
receiving this notification so that the values returned are consistent.
* LayoutTests/http/tests/media/hls/hls-ended-expected.txt: Added.
* LayoutTests/http/tests/media/hls/hls-ended.html: Added.
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::didEnd):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::didEnd):
Canonical link: https://commits.webkit.org/259342@main1 parent 58e8ab3 commit d9da700
File tree
4 files changed
+34
-0
lines changed- LayoutTests/http/tests/media/hls
- Source/WebCore/platform/graphics/avfoundation
- objc
4 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| 690 | + | |
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1388 | 1388 | | |
1389 | 1389 | | |
1390 | 1390 | | |
| 1391 | + | |
| 1392 | + | |
1391 | 1393 | | |
1392 | 1394 | | |
1393 | 1395 | | |
| |||
0 commit comments