Bug 1059295 - sending the getUserMedia:revoke notification with the "screen:" prefix doesn't stop app sharing r=jesup
authorMatthew A. Miller <linuxwolf@outer-planes.net>
Thu, 28 Aug 2014 16:44:27 -0600
changeset 223946 8669b13c8567a30c42854662ff8de9d6f1d77b3b
parent 223945 beb9d95844dd10fd5dbcc32a785409cdffee31eb
child 223947 1d074a9ef902b3c71bcabcd34b31143157a7793e
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1059295
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1059295 - sending the getUserMedia:revoke notification with the "screen:" prefix doesn't stop app sharing r=jesup
dom/media/MediaManager.cpp
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -2315,16 +2315,17 @@ GetUserMediaCallbackMediaStreamListener:
 // Doesn't kill audio
 // XXX refactor to combine with Invalidate()?
 void
 GetUserMediaCallbackMediaStreamListener::StopScreenWindowSharing()
 {
   NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
   if (mVideoSource && !mStopped &&
       (mVideoSource->GetMediaSource() == MediaSourceType::Screen ||
+       mVideoSource->GetMediaSource() == MediaSourceType::Application ||
        mVideoSource->GetMediaSource() == MediaSourceType::Window)) {
     // Stop the whole stream if there's no audio; just the video track if we have both
     nsRefPtr<MediaOperationRunnable> runnable(
       new MediaOperationRunnable(mAudioSource ? MEDIA_STOP_TRACK : MEDIA_STOP,
                                  this, nullptr, nullptr,
                                  nullptr, mVideoSource,
                                  mFinished, mWindowID, nullptr));
     mMediaThread->Dispatch(runnable, NS_DISPATCH_NORMAL);