Bug 1059295 - sending the getUserMedia:revoke notification with the "screen:" prefix doesn't stop app sharing r=jesup

This commit is contained in:
Matthew A. Miller
2014-08-28 16:44:27 -06:00
parent 6ae375279a
commit 00f06cbb73

View File

@@ -2320,6 +2320,7 @@ GetUserMediaCallbackMediaStreamListener::StopScreenWindowSharing()
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread"); NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
if (mVideoSource && !mStopped && if (mVideoSource && !mStopped &&
(mVideoSource->GetMediaSource() == MediaSourceType::Screen || (mVideoSource->GetMediaSource() == MediaSourceType::Screen ||
mVideoSource->GetMediaSource() == MediaSourceType::Application ||
mVideoSource->GetMediaSource() == MediaSourceType::Window)) { mVideoSource->GetMediaSource() == MediaSourceType::Window)) {
// Stop the whole stream if there's no audio; just the video track if we have both // Stop the whole stream if there's no audio; just the video track if we have both
nsRefPtr<MediaOperationRunnable> runnable( nsRefPtr<MediaOperationRunnable> runnable(