WebKit Bugzilla
Attachment 370945 Details for
Bug 198345
: Video playback in Safari should continue when CarPlay is plugged in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-198345-20190530085041.patch (text/plain), 20.52 KB, created by
Jer Noble
on 2019-05-30 08:50:41 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-05-30 08:50:41 PDT
Size:
20.52 KB
patch
obsolete
>Subversion Revision: 245884 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0ef8ff452f56afa9835d52e2e748a6d87ed95b0c..b88afa9f96a744755bd81bba4dc6a33b43d21d36 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,40 @@ >+2019-05-30 Jer Noble <jer.noble@apple.com> >+ >+ Video playback in Safari should continue when CarPlay is plugged in >+ https://bugs.webkit.org/show_bug.cgi?id=198345 >+ <rdar://problem/45505750> >+ >+ Reviewed by Eric Carlson. >+ >+ Test: media/video-isplayingtoautomotiveheadunit.html >+ >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const): >+ * platform/audio/PlatformMediaSessionManager.cpp: >+ (WebCore::PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit): >+ * platform/audio/PlatformMediaSessionManager.h: >+ (WebCore::PlatformMediaSessionManager::isPlayingToAutomotiveHeadUnit const): >+ * platform/audio/ios/MediaSessionManagerIOS.h: >+ * platform/audio/ios/MediaSessionManagerIOS.mm: >+ (WebCore::MediaSessionManageriOS::MediaSessionManageriOS): >+ (WebCore::MediaSessionManageriOS::carPlayServerDied): >+ (WebCore::MediaSessionManageriOS::updateCarPlayIsConnected): >+ (-[WebMediaSessionHelper initWithCallback:]): >+ (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): >+ (-[WebMediaSessionHelper interruption:]): >+ (-[WebMediaSessionHelper applicationWillEnterForeground:]): >+ (-[WebMediaSessionHelper applicationDidBecomeActive:]): >+ (-[WebMediaSessionHelper applicationWillResignActive:]): >+ (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): >+ (-[WebMediaSessionHelper applicationDidEnterBackground:]): >+ (-[WebMediaSessionHelper carPlayServerDied:]): >+ (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]): >+ * testing/Internals.cpp: >+ (WebCore::Internals::resetToConsistentState): >+ (WebCore::Internals::setIsPlayingToAutomotiveHeadUnit): >+ * testing/Internals.h: >+ * testing/Internals.idl: >+ > 2019-05-29 Robin Morisset <rmorisset@apple.com> > > [WHLSL] Parsing and lexing the standard library is slow >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index f00d81ca0889bb4927f3473a2b5401ec8ee8a4b5..75f19383ad6145936d4d757f8fbd35fc9948a8ed 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -7715,6 +7715,10 @@ bool HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction(PlatformMedia > INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToExternalTarget() is true"); > return true; > } >+ if (PlatformMediaSessionManager::sharedManager().isPlayingToAutomotiveHeadUnit()) { >+ INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToAutomotiveHeadUnit() is true"); >+ return true; >+ } > if (m_videoFullscreenMode & VideoFullscreenModePictureInPicture) > return true; > #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) >@@ -7726,6 +7730,10 @@ bool HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction(PlatformMedia > INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToExternalTarget() is true"); > return true; > } >+ if (PlatformMediaSessionManager::sharedManager().isPlayingToAutomotiveHeadUnit()) { >+ INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToAutomotiveHeadUnit() is true"); >+ return true; >+ } > } > return false; > } >diff --git a/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp b/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp >index 8370fb0c48fe46c1c239bc40f29d790fb0a7f415..b42c2148b8d317a1b7b938f957c1545167bd5b4b 100644 >--- a/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp >+++ b/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp >@@ -391,6 +391,14 @@ void PlatformMediaSessionManager::processDidResume() > #endif > } > >+void PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit(bool isPlayingToAutomotiveHeadUnit) >+{ >+ if (isPlayingToAutomotiveHeadUnit == m_isPlayingToAutomotiveHeadUnit) >+ return; >+ >+ ALWAYS_LOG(LOGIDENTIFIER, isPlayingToAutomotiveHeadUnit); >+ m_isPlayingToAutomotiveHeadUnit = isPlayingToAutomotiveHeadUnit; >+} > > void PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged(PlatformMediaSession& session) > { >diff --git a/Source/WebCore/platform/audio/PlatformMediaSessionManager.h b/Source/WebCore/platform/audio/PlatformMediaSessionManager.h >index 3685307b7308d0e3908ca36ef5fa13b728512178..b9119e09f52ac8de646274bbbe1e838d55aaf71b 100644 >--- a/Source/WebCore/platform/audio/PlatformMediaSessionManager.h >+++ b/Source/WebCore/platform/audio/PlatformMediaSessionManager.h >@@ -129,6 +129,9 @@ public: > > void sessionIsPlayingToWirelessPlaybackTargetChanged(PlatformMediaSession&); > >+ WEBCORE_EXPORT void setIsPlayingToAutomotiveHeadUnit(bool); >+ bool isPlayingToAutomotiveHeadUnit() const { return m_isPlayingToAutomotiveHeadUnit; } >+ > void forEachMatchingSession(const Function<bool(const PlatformMediaSession&)>& predicate, const Function<void(PlatformMediaSession&)>& matchingCallback); > > protected: >@@ -188,6 +191,7 @@ private: > mutable bool m_isApplicationInBackground { false }; > bool m_willIgnoreSystemInterruptions { false }; > bool m_processIsSuspended { false }; >+ bool m_isPlayingToAutomotiveHeadUnit { false }; > > #if USE(AUDIO_SESSION) > bool m_becameActive { false }; >diff --git a/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h b/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h >index eb01d6f379e7a58ba54930ea56ffae5d0b88a8ec..479da7aba5d7d33fa7edc85e6875a339e66598b8 100644 >--- a/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h >+++ b/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h >@@ -47,6 +47,8 @@ public: > > void externalOutputDeviceAvailableDidChange(); > bool hasWirelessTargetsAvailable() override; >+ void carPlayServerDied(); >+ void updateCarPlayIsConnected(Optional<bool>&&); > > private: > friend class PlatformMediaSessionManager; >diff --git a/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm b/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm >index 0043904a53025e4450015af0068b63c532447853..9d4eed68c2aa8b5d50ef5a5314b3cf05186755bf 100644 >--- a/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm >+++ b/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm >@@ -56,6 +56,10 @@ WEBCORE_EXPORT NSString* WebUIApplicationDidEnterBackgroundNotification = @"WebU > SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Celestial) > SOFT_LINK_CLASS_OPTIONAL(Celestial, AVSystemController) > SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_PIDToInheritApplicationStateFrom, NSString *) >+SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedAttribute, NSString *) >+SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedDidChangeNotification, NSString *) >+SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedNotificationParameter, NSString *) >+SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_ServerConnectionDiedNotification, NSString *) > #endif > > using namespace WebCore; >@@ -109,6 +113,8 @@ MediaSessionManageriOS::MediaSessionManageriOS() > m_objcObserver = adoptNS([[WebMediaSessionHelper alloc] initWithCallback:this]); > END_BLOCK_OBJC_EXCEPTIONS > resetRestrictions(); >+ >+ updateCarPlayIsConnected(WTF::nullopt); > } > > MediaSessionManageriOS::~MediaSessionManageriOS() >@@ -194,6 +200,27 @@ void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange() > END_BLOCK_OBJC_EXCEPTIONS > } > >+void MediaSessionManageriOS::carPlayServerDied() >+{ >+ ALWAYS_LOG(LOGIDENTIFIER); >+ updateCarPlayIsConnected(WTF::nullopt); >+} >+ >+void MediaSessionManageriOS::updateCarPlayIsConnected(Optional<bool>&& carPlayIsConnected) >+{ >+ if (carPlayIsConnected) { >+ setIsPlayingToAutomotiveHeadUnit(carPlayIsConnected.value()); >+ return; >+ } >+ >+ if (!canLoadAVSystemController_CarPlayIsConnectedAttribute()) { >+ setIsPlayingToAutomotiveHeadUnit(false) >+ return; >+ } >+ >+ setIsPlayingToAutomotiveHeadUnit([[[getAVSystemControllerClass() sharedAVSystemController] attributeForKey:getAVSystemController_CarPlayIsConnectedAttribute()] boolValue]); >+} >+ > } // namespace WebCore > > @implementation WebMediaSessionHelper >@@ -218,6 +245,10 @@ - (id)initWithCallback:(MediaSessionManageriOS*)callback > [center addObserver:self selector:@selector(applicationWillResignActive:) name:WebUIApplicationWillResignActiveNotification object:nil]; > [center addObserver:self selector:@selector(applicationDidEnterBackground:) name:PAL::get_UIKit_UIApplicationDidEnterBackgroundNotification() object:nil]; > [center addObserver:self selector:@selector(applicationDidEnterBackground:) name:WebUIApplicationDidEnterBackgroundNotification object:nil]; >+ if (canLoadAVSystemController_ServerConnectionDiedNotification()) >+ [center addObserver:self selector:@selector(carPlayServerDied:) name:getAVSystemController_ServerConnectionDiedNotification() object:nil]; >+ if (canLoadAVSystemController_CarPlayIsConnectedDidChangeNotification()) >+ [center addObserver:self selector:@selector(carPlayIsConnectedDidChange:) name:getAVSystemController_CarPlayIsConnectedDidChangeNotification() object:nil]; > > // Now playing won't work unless we turn on the delivery of remote control events. > dispatch_async(dispatch_get_main_queue(), ^ { >@@ -286,14 +317,14 @@ - (void)startMonitoringAirPlayRoutes > > LOG(Media, "-[WebMediaSessionHelper startMonitoringAirPlayRoutes]"); > >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable { > ASSERT(!protectedSelf->_routeDetector); > > if (protectedSelf->_callback) { > BEGIN_BLOCK_OBJC_EXCEPTIONS > 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()]; >+ [[NSNotificationCenter defaultCenter] addObserver:protectedSelf.get() selector:@selector(wirelessRoutesAvailableDidChange:) name:AVRouteDetectorMultipleRoutesDetectedDidChangeNotification object:protectedSelf->_routeDetector.get()]; > > protectedSelf->_callback->externalOutputDeviceAvailableDidChange(); > END_BLOCK_OBJC_EXCEPTIONS >@@ -328,7 +359,7 @@ - (void)interruption:(NSNotification *)notification > if (type == AVAudioSessionInterruptionTypeEnded && [[[notification userInfo] objectForKey:AVAudioSessionInterruptionOptionKey] unsignedIntegerValue] == AVAudioSessionInterruptionOptionShouldResume) > flags = PlatformMediaSession::MayResumePlaying; > >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self), type, flags]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), type, flags]() mutable { > auto* callback = protectedSelf->_callback; > if (!callback) > return; >@@ -351,7 +382,7 @@ - (void)applicationWillEnterForeground:(NSNotification *)notification > LOG(Media, "-[WebMediaSessionHelper applicationWillEnterForeground]"); > > BOOL isSuspendedUnderLock = [[[notification userInfo] objectForKey:@"isSuspendedUnderLock"] boolValue]; >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self), isSuspendedUnderLock]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), isSuspendedUnderLock]() mutable { > if (auto* callback = protectedSelf->_callback) > callback->applicationWillEnterForeground(isSuspendedUnderLock); > }); >@@ -366,7 +397,7 @@ - (void)applicationDidBecomeActive:(NSNotification *)notification > > LOG(Media, "-[WebMediaSessionHelper applicationDidBecomeActive]"); > >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable { > if (auto* callback = protectedSelf->_callback) > callback->applicationDidBecomeActive(); > }); >@@ -381,7 +412,7 @@ - (void)applicationWillResignActive:(NSNotification *)notification > > LOG(Media, "-[WebMediaSessionHelper applicationWillResignActive]"); > >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable { > if (auto* callback = protectedSelf->_callback) > callback->applicationWillBecomeInactive(); > }); >@@ -396,7 +427,7 @@ - (void)wirelessRoutesAvailableDidChange:(NSNotification *)notification > > LOG(Media, "-[WebMediaSessionHelper wirelessRoutesAvailableDidChange]"); > >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable { > if (auto* callback = protectedSelf->_callback) > callback->externalOutputDeviceAvailableDidChange(); > }); >@@ -410,11 +441,42 @@ - (void)applicationDidEnterBackground:(NSNotification *)notification > LOG(Media, "-[WebMediaSessionHelper applicationDidEnterBackground]"); > > BOOL isSuspendedUnderLock = [[[notification userInfo] objectForKey:@"isSuspendedUnderLock"] boolValue]; >- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self), isSuspendedUnderLock]() mutable { >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), isSuspendedUnderLock]() mutable { > if (auto* callback = protectedSelf->_callback) > callback->applicationDidEnterBackground(isSuspendedUnderLock); > }); > } >+ >+- (void)carPlayServerDied:(NSNotification *)notification >+{ >+ if (!_callback) >+ return; >+ >+ LOG(Media, "-[WebMediaSessionHelper carPlayServerDied:]"); >+ UNUSED_PARAM(notification); >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable { >+ if (auto* callback = protectedSelf->_callback) >+ callback->carPlayServerDied(); >+ }); >+} >+ >+- (void)carPlayIsConnectedDidChange:(NSNotification *)notification >+{ >+ if (!_callback) >+ return; >+ >+ Optional<bool> carPlayIsConnected; >+ if (notification && canLoadAVSystemController_CarPlayIsConnectedNotificationParameter()) { >+ NSNumber *nsCarPlayIsConnected = [[notification userInfo] valueForKey:getAVSystemController_CarPlayIsConnectedNotificationParameter()]; >+ if (nsCarPlayIsConnected) >+ carPlayIsConnected = [nsCarPlayIsConnected boolValue]; >+ } >+ >+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), carPlayIsConnected = WTFMove(carPlayIsConnected)]() mutable { >+ if (auto* callback = protectedSelf->_callback) >+ callback->updateCarPlayIsConnected(WTFMove(carPlayIsConnected)); >+ }); >+} > @end > > #endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 510ef0d31b6ea420e4ab09bfe81f415a318f2efe..2730dfea4b0b7b6f08ee8f93a49dbfb362948179 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -492,6 +492,7 @@ void Internals::resetToConsistentState(Page& page) > PlatformMediaSessionManager::sharedManager().resetRestrictions(); > PlatformMediaSessionManager::sharedManager().setWillIgnoreSystemInterruptions(true); > #endif >+ PlatformMediaSessionManager::sharedManager().setIsPlayingToAutomotiveHeadUnit(false); > #if HAVE(ACCESSIBILITY) > AXObjectCache::setEnhancedUserInterfaceAccessibility(false); > AXObjectCache::disableAccessibility(); >@@ -5067,4 +5068,9 @@ void Internals::setXHRMaximumIntervalForUserGestureForwarding(XMLHttpRequest& re > request.setMaximumIntervalForUserGestureForwarding(interval); > } > >+void Internals::setIsPlayingToAutomotiveHeadUnit(bool isPlaying) >+{ >+ PlatformMediaSessionManager::sharedManager().setIsPlayingToAutomotiveHeadUnit(isPlaying); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h >index 3ac66f72598030c089f71202b4481308379f7946..46d426a10c9e7d56b79e9a09bbec86071f5f4130 100644 >--- a/Source/WebCore/testing/Internals.h >+++ b/Source/WebCore/testing/Internals.h >@@ -823,6 +823,8 @@ public: > > void setXHRMaximumIntervalForUserGestureForwarding(XMLHttpRequest&, double); > >+ void setIsPlayingToAutomotiveHeadUnit(bool); >+ > private: > explicit Internals(Document&); > Document* contextDocument() const; >diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl >index ca2bc545b3e04a7868c3d48940ae077249d147a7..3a59b4d7f5eb9c70fc321343d7c530cd25eb28e1 100644 >--- a/Source/WebCore/testing/Internals.idl >+++ b/Source/WebCore/testing/Internals.idl >@@ -753,4 +753,6 @@ enum CompositingPolicy { > void testDictionaryLogging(); > > void setXHRMaximumIntervalForUserGestureForwarding(XMLHttpRequest xhr, double interval); >+ >+ void setIsPlayingToAutomotiveHeadUnit(boolean value); > }; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e7da17fe14345c7ede4d8eeed9ccca2b6687c6c6..39889c276a04dcc6adc98d371524a5de1762a160 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-30 Jer Noble <jer.noble@apple.com> >+ >+ Video playback in Safari should continue when CarPlay is plugged in >+ https://bugs.webkit.org/show_bug.cgi?id=198345 >+ <rdar://problem/45505750> >+ >+ Reviewed by Eric Carlson. >+ >+ * media/video-isplayingtoautomotiveheadunit-expected.txt: Added. >+ * media/video-isplayingtoautomotiveheadunit.html: Added. >+ > 2019-05-29 Said Abou-Hallawa <sabouhallawa@apple.com> > > REGRESSION (r244182) [Mac WK2] Layout Test imported/w3c/web-platform-tests/visual-viewport/viewport-resize-event-on-load-overflowing-page.html is a flaky failure >diff --git a/LayoutTests/media/video-isplayingtoautomotiveheadunit-expected.txt b/LayoutTests/media/video-isplayingtoautomotiveheadunit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..063e5edf42db9756e978591f3fba65239ddee26f >--- /dev/null >+++ b/LayoutTests/media/video-isplayingtoautomotiveheadunit-expected.txt >@@ -0,0 +1,15 @@ >+ >+RUN(video.src = findMediaFile("video", "content/test")) >+EVENT(canplaythrough) >+RUN(video.play()) >+EVENT(playing) >+RUN(internals.setMediaSessionRestrictions("videoaudio", "suspendedunderlockplaybackrestricted")) >+RUN(internals.applicationDidEnterBackground(true)) >+EVENT(pause) >+RUN(internals.applicationWillEnterForeground(true)) >+EVENT(playing) >+RUN(internals.setIsPlayingToAutomotiveHeadUnit(true)) >+RUN(internals.applicationDidEnterBackground(true)) >+EXPECTED (video.paused == 'false') OK >+END OF TEST >+ >diff --git a/LayoutTests/media/video-isplayingtoautomotiveheadunit.html b/LayoutTests/media/video-isplayingtoautomotiveheadunit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b1053f9041aa65c7a55ee63be299e1773d952223 >--- /dev/null >+++ b/LayoutTests/media/video-isplayingtoautomotiveheadunit.html >@@ -0,0 +1,34 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>video-isplayingtoautomotiveheadunit</title> >+ <script src="video-test.js"></script> >+ <script src="media-file.js"></script> >+ <script> >+ window.addEventListener('load', async event => { >+ findMediaElement(); >+ >+ run('video.src = findMediaFile("video", "content/test")'); >+ await waitFor(video, 'canplaythrough'); >+ >+ runWithKeyDown('video.play()'); >+ await waitFor(video, 'playing'); >+ >+ run('internals.setMediaSessionRestrictions("videoaudio", "suspendedunderlockplaybackrestricted")') >+ run('internals.applicationDidEnterBackground(true)'); >+ await waitFor(video, 'pause'); >+ >+ run('internals.applicationWillEnterForeground(true)'); >+ await waitFor(video, 'playing'); >+ >+ run('internals.setIsPlayingToAutomotiveHeadUnit(true)'); >+ run('internals.applicationDidEnterBackground(true)'); >+ testExpected('video.paused', false); >+ endTest(); >+ }); >+ </script> >+</head> >+<body> >+ <video controls></video> >+</body> >+</html> >\ No newline at end of file
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 198345
:
370875
|
370944
| 370945