Changeset 277203 in webkit
- Timestamp:
- May 7, 2021, 3:00:57 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/ios/PlaybackSessionInterfaceAVKit.mm (modified) (1 diff)
-
platform/ios/WebAVPlayerController.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r277202 r277203 1 2021-05-07 Devin Rousso <drousso@apple.com> 2 3 [iOS] fix inconsistency around the meaning of `rate` and `defaultPlaybackRate` between WebKit and AVKit 4 https://bugs.webkit.org/show_bug.cgi?id=225532 5 <rdar://problem/77629276> 6 7 Reviewed by Eric Carlson. 8 9 In AVKit, the `defaultPlaybackRate` is used when playback starts, such as resuming after 10 pausing. In WebKit, however, `defaultPlaybackRate` is only used when first loading and after 11 ending scanning, with the `playbackRate` being used in all other cases, including when 12 resuming after pausing. As such, WebKit should return the `playbackRate` instead of the 13 `defaultPlaybackRate` in these cases when communicating with AVKit. 14 15 * platform/ios/WebAVPlayerController.mm: 16 (-[WebAVPlayerController setRate:]): 17 Also `setDefaultPlaybackRate:` if not paused (i.e. `rate != 0`) since WebKit's definition of 18 `playbackRate` does not change when paused. 19 20 * platform/ios/PlaybackSessionInterfaceAVKit.mm: 21 (WebCore::PlaybackSessionInterfaceAVKit::rateChanged): 22 Make sure to `setDefaultPlaybackRate:` before `setRate:` as the latter can affect the former. 23 1 24 2021-05-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 25 -
trunk/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm
r274249 r277203 127 127 void PlaybackSessionInterfaceAVKit::rateChanged(bool isPlaying, float playbackRate, float defaultPlaybackRate) 128 128 { 129 [m_playerController setDefaultPlaybackRate:defaultPlaybackRate]; 129 130 [m_playerController setRate:isPlaying ? playbackRate : 0.]; 130 [m_playerController setDefaultPlaybackRate:defaultPlaybackRate];131 131 } 132 132 -
trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm
r275956 r277203 197 197 return; 198 198 199 // In AVKit, the `defaultPlaybackRate` is used when playback starts, such as resuming after 200 // pausing. In WebKit, however, `defaultPlaybackRate` is only used when first loading and after 201 // ending scanning, with the `playbackRate` being used in all other cases, including when 202 // resuming after pausing. As such, WebKit should return the `playbackRate` instead of the 203 // `defaultPlaybackRate` in these cases when communicating with AVKit. 204 [self setDefaultPlaybackRate:_rate]; 205 199 206 if (self.delegate && self.delegate->playbackRate() != _rate) 200 207 self.delegate->setPlaybackRate(_rate);
Note:
See TracChangeset
for help on using the changeset viewer.