Changeset 274559 in webkit
- Timestamp:
- Mar 17, 2021, 8:20:55 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLMediaElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r274557 r274559 1 2021-03-17 Souju TANAKA <soujyu.tanaka@access-company.com> 2 3 Set media elements' networkState to NETWORK_IDLE if the connection is interrupted 4 https://bugs.webkit.org/show_bug.cgi?id=223242 5 6 Reviewed by Eric Carlson. 7 8 Media elements' networkState was set to NETWORK_EMPTY if the connection is interrupted after some 9 media data has been received. This fix changes the state to NETWORK_IDLE, according to recent spec. 10 11 No new tests since there seems no way to disconnect network connection during tests. 12 13 * html/HTMLMediaElement.cpp: 14 (WebCore::HTMLMediaElement::mediaLoadingFailedFatally): 15 1 16 2021-03-17 Kimmo Kinnunen <kkinnunen@apple.com> 2 17 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r274324 r274559 2089 2089 void HTMLMediaElement::mediaLoadingFailedFatally(MediaPlayer::NetworkState error) 2090 2090 { 2091 // https://html.spec.whatwg.org/#loading-the-media-resource:dom-media-have_nothing-2 2092 // 17 March 2021 2093 2091 2094 // 1 - The user agent should cancel the fetching process. 2092 2095 stopPeriodicTimers(); … … 2102 2105 ASSERT_NOT_REACHED(); 2103 2106 2104 // 3 - Queue a task to fire a simple event named error at the media element.2105 scheduleEvent(eventNames().errorEvent);2106 2107 2107 #if ENABLE(MEDIA_SOURCE) 2108 2108 detachMediaSource(); 2109 2109 #endif 2110 2110 2111 // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value and queue a 2112 // task to fire a simple event called emptied at the element. 2113 m_networkState = NETWORK_EMPTY; 2114 scheduleEvent(eventNames().emptiedEvent); 2115 2116 // 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. 2111 // 3 - Set the element's networkState attribute to the NETWORK_IDLE value. 2112 m_networkState = NETWORK_IDLE; 2113 2114 // 4 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. 2117 2115 setShouldDelayLoadEvent(false); 2116 2117 // 5 - Fire an event named error at the media element. 2118 dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); 2118 2119 2119 2120 // 6 - Abort the overall resource selection algorithm.
Note:
See TracChangeset
for help on using the changeset viewer.