Changeset 261342 in webkit
- Timestamp:
- May 7, 2020 4:08:44 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r261341 r261342 1 2020-05-07 Eric Carlson <eric.carlson@apple.com> 2 3 [macOS] Playhead in Touch Bar continues when loading stalls 4 https://bugs.webkit.org/show_bug.cgi?id=211585 5 <rdar://problem/33893306> 6 7 Reviewed by Darin Adler. 8 9 * platform/cocoa/PlaybackSessionModelMediaElement.h: 10 * platform/cocoa/PlaybackSessionModelMediaElement.mm: 11 (WebCore::PlaybackSessionModelMediaElement::updateForEventName): Listen for `waitingEvent` 12 and `canplay` events. Don't claim to be playing when stalled. 13 (WebCore::PlaybackSessionModelMediaElement::isStalled const): New. 14 1 15 2020-05-07 Eric Carlson <eric.carlson@apple.com> 2 16 -
trunk/Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.h
r260729 r261342 104 104 static const Vector<WTF::AtomString>& observedEventNames(); 105 105 const WTF::AtomString& eventNameAll(); 106 bool isStalled() const; 106 107 107 108 RefPtr<HTMLMediaElement> m_mediaElement; -
trunk/Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm
r261013 r261342 141 141 || eventName == eventNames().pauseEvent 142 142 || eventName == eventNames().playEvent 143 || eventName == eventNames().ratechangeEvent) { 144 bool isPlaying = this->isPlaying(); 143 || eventName == eventNames().ratechangeEvent 144 || eventName == eventNames().waitingEvent 145 || eventName == eventNames().canplayEvent) { 146 bool isPlaying = this->isPlaying() && !isStalled(); 145 147 float playbackRate = this->playbackRate(); 146 148 for (auto client : m_clients) … … 430 432 } 431 433 434 bool PlaybackSessionModelMediaElement::isStalled() const 435 { 436 return m_mediaElement && m_mediaElement->readyState() <= HTMLMediaElement::HAVE_CURRENT_DATA; 437 } 438 432 439 float PlaybackSessionModelMediaElement::playbackRate() const 433 440 {
Note: See TracChangeset
for help on using the changeset viewer.