WebKit Bugzilla
Attachment 369592 Details for
Bug 197793
: [iOS] HTMLMediaElement sometimes doesn't send 'webkitplaybacktargetavailabilitychanged' event
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197793-20190510132939.patch (text/plain), 3.62 KB, created by
Eric Carlson
on 2019-05-10 13:29:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2019-05-10 13:29:39 PDT
Size:
3.62 KB
patch
obsolete
>Subversion Revision: 245032 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 889f39ca35961eef61010d14961a3572e4fa8af1..43076a13766d325a2097d6c47ad525d4e6aad121 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-10 Eric Carlson <eric.carlson@apple.com> >+ >+ [iOS] HTMLMediaElement sometimes doesn't send 'webkitplaybacktargetavailabilitychanged' event >+ https://bugs.webkit.org/show_bug.cgi?id=197793 >+ <rdar://problem/46429187> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * html/MediaElementSession.cpp: >+ (WebCore::MediaElementSession::MediaElementSession): Initialize m_hasPlaybackTargets. >+ >+ * platform/audio/ios/MediaSessionManagerIOS.mm: >+ (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange): Log >+ target availability. >+ (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Call the client >+ externalOutputDeviceAvailableDidChange method after the AVRouteDetector is available. >+ > 2019-05-07 Youenn Fablet <youenn@apple.com> > > getUserMedia framerate unusable under low light in iOS 12.2 >diff --git a/Source/WebCore/html/MediaElementSession.cpp b/Source/WebCore/html/MediaElementSession.cpp >index 7c3d009e1bcc776997736ed125f6da51217f18a4..90fb5ec0761b7d55cab4c42b111a9fae9aa6fdcb 100644 >--- a/Source/WebCore/html/MediaElementSession.cpp >+++ b/Source/WebCore/html/MediaElementSession.cpp >@@ -110,6 +110,7 @@ MediaElementSession::MediaElementSession(HTMLMediaElement& element) > , m_restrictions(NoRestrictions) > #if ENABLE(WIRELESS_PLAYBACK_TARGET) > , m_targetAvailabilityChangedTimer(*this, &MediaElementSession::targetAvailabilityChangedTimerFired) >+ , m_hasPlaybackTargets(PlatformMediaSessionManager::sharedManager().hasWirelessTargetsAvailable()) > #endif > , m_mainContentCheckTimer(*this, &MediaElementSession::mainContentCheckTimerFired) > , m_clientDataBufferingTimer(*this, &MediaElementSession::clientDataBufferingTimerFired) >diff --git a/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm b/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm >index faf5b44db7d3a97da9d27e27da949be98332e449..ab1cae0dcb8a0ba20cdbe49fe0e752d88e1c2d94 100644 >--- a/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm >+++ b/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm >@@ -183,9 +183,14 @@ void MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary() > void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange() > { > BEGIN_BLOCK_OBJC_EXCEPTIONS >- forEachSession([haveTargets = [m_objcObserver hasWirelessTargetsAvailable]] (PlatformMediaSession& session, size_t) { >+ >+ auto haveTargets = [m_objcObserver hasWirelessTargetsAvailable]; >+ ALWAYS_LOG(LOGIDENTIFIER, haveTargets); >+ >+ forEachSession([haveTargets] (PlatformMediaSession& session, size_t) { > session.externalOutputDeviceAvailableDidChange(haveTargets); > }); >+ > END_BLOCK_OBJC_EXCEPTIONS > } > >@@ -289,6 +294,8 @@ void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange() > protectedSelf->_routeDetector = adoptNS([PAL::allocAVRouteDetectorInstance() init]); > protectedSelf->_routeDetector.get().routeDetectionEnabled = protectedSelf->_monitoringAirPlayRoutes; > [[NSNotificationCenter defaultCenter] addObserver:protectedSelf selector:@selector(wirelessRoutesAvailableDidChange:) name:AVRouteDetectorMultipleRoutesDetectedDidChangeNotification object:protectedSelf->_routeDetector.get()]; >+ >+ protectedSelf->_callback->externalOutputDeviceAvailableDidChange(); > END_BLOCK_OBJC_EXCEPTIONS > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197793
:
369592
|
369605
|
369734