Changeset 265145 in webkit
- Timestamp:
- Jul 31, 2020 10:09:04 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r265138 r265145 1 2020-07-31 Peng Liu <peng.liu6@apple.com> 2 3 PIP on netflix.com shows only a gray window and spinner 4 https://bugs.webkit.org/show_bug.cgi?id=214899 5 6 Reviewed by Jer Noble. 7 8 Use an empty "seekableRanges" instead of a special "duration" value (NaN) to indicate 9 that seeking is not supported. With this change, the "duration" will always have a meaningful 10 value, so that WebAVPlayerController can work properly in the picture-in-picture mode. 11 Related change: https://trac.webkit.org/changeset/217858. 12 13 * html/HTMLMediaElement.cpp: 14 (WebCore::HTMLMediaElement::supportsSeeking const): 15 * platform/cocoa/PlaybackSessionModelMediaElement.mm: 16 (WebCore::PlaybackSessionModelMediaElement::duration const): 17 (WebCore::PlaybackSessionModelMediaElement::seekableRanges const): 18 * platform/mac/WebPlaybackControlsManager.mm: 19 (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]): 20 1 21 2020-07-31 Carlos Garcia Campos <cgarcia@igalia.com> 2 22 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r264710 r265145 7497 7497 bool HTMLMediaElement::supportsSeeking() const 7498 7498 { 7499 return !document().quirks().needsSeekingSupportDisabled() && !isLiveStream();7499 return !document().quirks().needsSeekingSupportDisabled(); 7500 7500 } 7501 7501 -
trunk/Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm
r262632 r265145 427 427 double PlaybackSessionModelMediaElement::duration() const 428 428 { 429 if (!m_mediaElement) 430 return 0; 431 return m_mediaElement->supportsSeeking() ? m_mediaElement->duration() : std::numeric_limits<double>::quiet_NaN(); 429 return m_mediaElement ? m_mediaElement->duration() : 0; 432 430 } 433 431 … … 459 457 Ref<TimeRanges> PlaybackSessionModelMediaElement::seekableRanges() const 460 458 { 461 return m_mediaElement ? m_mediaElement->seekable() : TimeRanges::create();459 return m_mediaElement && m_mediaElement->supportsSeeking() ? m_mediaElement->seekable() : TimeRanges::create(); 462 460 } 463 461 -
trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm
r260485 r265145 120 120 // other media. The intent of the API is that we return NO when the media is being scrubbed via the on-screen scrubber. 121 121 // But we can only possibly get the right answer for media that uses the default controls. 122 return std::isfinite(_contentDuration) ;;122 return std::isfinite(_contentDuration) && [_seekableTimeRanges count]; 123 123 } 124 124
Note: See TracChangeset
for help on using the changeset viewer.