diff --git a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp index 4242985d6b0a..05795aed69d6 100644 --- a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp @@ -329,6 +329,15 @@ MediaEngineGonkVideoSource::StartImpl(webrtc::CaptureCapability aCapability) { mCameraControl->Start(&config); mCameraControl->Set(CAMERA_PARAM_PICTURE_SIZE, config.mPreviewSize); + nsTArray focusModes; + mCameraControl->Get(CAMERA_PARAM_SUPPORTED_FOCUSMODES, focusModes); + for (nsTArray::index_type i = 0; i < focusModes.Length(); ++i) { + if (focusModes[i].EqualsASCII("continuous-video")) { + mCameraControl->Set(CAMERA_PARAM_FOCUSMODE, focusModes[i]); + break; + } + } + hal::RegisterScreenConfigurationObserver(this); }