Changeset 240434 in webkit
- Timestamp:
- Jan 24, 2019 7:31:02 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240428 r240434 1 2019-01-24 Eric Carlson <eric.carlson@apple.com> 2 3 [iOS] Enable media element volume on iPad 4 https://bugs.webkit.org/show_bug.cgi?id=193745 5 <rdar://problem/47452297> 6 7 Reviewed by Jer Noble. 8 9 * html/HTMLMediaElement.cpp: 10 (WebCore::HTMLMediaElement::setVolume): 11 (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged): 12 (WebCore::HTMLMediaElement::updateVolume): 13 14 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 15 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): 16 1 17 2019-01-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 18 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r240237 r240434 3713 3713 return Exception { IndexSizeError }; 3714 3714 3715 #if !PLATFORM(IOS_FAMILY) 3715 #if PLATFORM(IOS_FAMILY) 3716 if (!processingUserGestureForMedia()) 3717 return { }; 3718 #endif 3719 3716 3720 if (m_volume == volume) 3717 3721 return { }; … … 3729 3733 setAutoplayEventPlaybackState(AutoplayEventPlaybackState::PreventedAutoplay); 3730 3734 } 3731 #endif 3735 3732 3736 return { }; 3733 3737 } … … 4920 4924 beginProcessingMediaPlayerCallback(); 4921 4925 if (m_player) { 4922 double vol = m_player->volume();4923 if (vol != m_volume) {4924 m_volume = vol ;4926 double volume = m_player->volume(); 4927 if (volume != m_volume) { 4928 m_volume = volume; 4925 4929 updateVolume(); 4926 4930 scheduleEvent(eventNames().volumechangeEvent); … … 5335 5339 if (!m_player) 5336 5340 return; 5337 #if PLATFORM(IOS_FAMILY) 5338 // Only the user can change audio volume so update the cached volume and post the changed event. 5339 float volume = m_player->volume(); 5340 if (m_volume != volume) { 5341 m_volume = volume; 5342 scheduleEvent(eventNames().volumechangeEvent); 5343 } 5344 #else 5341 5345 5342 // Avoid recursion when the player reports volume changes. 5346 5343 if (!processingMediaPlayerCallback()) { … … 5371 5368 if (hasMediaControls()) 5372 5369 mediaControls()->changedVolume(); 5373 #endif5374 5370 } 5375 5371 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r240168 r240434 306 306 307 307 #if HAVE(CELESTIAL) 308 309 308 SOFT_LINK_PRIVATE_FRAMEWORK(Celestial) 310 309 SOFT_LINK_CONSTANT(Celestial, AVController_RouteDescriptionKey_RouteCurrentlyPicked, NSString *) … … 314 313 #define AVController_RouteDescriptionKey_RouteName getAVController_RouteDescriptionKey_RouteName() 315 314 #define AVController_RouteDescriptionKey_AVAudioRouteName getAVController_RouteDescriptionKey_AVAudioRouteName() 316 317 315 #endif // HAVE(CELESTIAL) 318 316 … … 1383 1381 { 1384 1382 #if PLATFORM(IOS_FAMILY) 1385 UNUSED_PARAM(volume); 1386 return; 1387 #else 1383 if ([[PAL::getUIDeviceClass() currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPad) 1384 return; 1385 #endif 1386 1388 1387 if (!m_avPlayer) 1389 1388 return; 1390 1389 1391 1390 [m_avPlayer.get() setVolume:volume]; 1392 #endif1393 1391 } 1394 1392
Note: See TracChangeset
for help on using the changeset viewer.