[iOS] do not pause video when entering background while playing to external device
[WebKit-https.git] / Source / WebCore / platform / audio / MediaSession.cpp
index a92235f..e3cc2d4 100644 (file)
@@ -76,10 +76,13 @@ void MediaSession::setState(State state)
     m_state = state;
 }
 
-void MediaSession::beginInterruption()
+void MediaSession::beginInterruption(InterruptionType type)
 {
     LOG(Media, "MediaSession::beginInterruption(%p), state = %s", this, stateName(m_state));
 
+    if (type == EnteringBackground && client().overrideBackgroundPlaybackRestriction())
+        return;
+
     m_stateToRestore = state();
     m_notifyingClient = true;
     client().pausePlayback();