Bug 1271697 - B2GOS: Fix DOMCameraControl.cpp nsIAudioChannelAgent::NotifyStartedPlaying. r=baku
authorGregor Wagner <gwagner@mozilla.com>
Mon, 16 May 2016 12:06:42 +0200
changeset 297542 54ff8765b3d2c3383a05d321a755653fb009746d
parent 297541 5324db36f2395612f56751de883bff47916c6e27
child 297543 beb7305d0d5febdac47daf159678d2fcb7c037d2
push id19247
push userkwierso@gmail.com
push dateMon, 16 May 2016 21:23:15 +0000
treeherderfx-team@ae689711c218 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1271697
milestone49.0a1
Bug 1271697 - B2GOS: Fix DOMCameraControl.cpp nsIAudioChannelAgent::NotifyStartedPlaying. r=baku
dom/camera/DOMCameraControl.cpp
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -1181,19 +1181,18 @@ nsDOMCameraControl::NotifyRecordingStatu
     mAudioChannelAgent = do_CreateInstance("@mozilla.org/audiochannelagent;1");
     if (!mAudioChannelAgent) {
       return NS_ERROR_UNEXPECTED;
     }
 
     // Camera app will stop recording when it falls to the background, so no callback is necessary.
     mAudioChannelAgent->Init(mWindow, (int32_t)AudioChannel::Content, nullptr);
     // Video recording doesn't output any sound, so it's not necessary to check canPlay.
-    float volume = 0.0;
-    bool muted = true;
-    rv = mAudioChannelAgent->NotifyStartedPlaying(&volume, &muted);
+    AudioPlaybackConfig config;
+    rv = mAudioChannelAgent->NotifyStartedPlaying(&config, AudioChannelService::AudibleState::eAudible);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
   }
 #endif
   return rv;
 }