summaryrefslogtreecommitdiff
path: root/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/webrtc/MediaEngineCameraVideoSource.cpp')
-rw-r--r--dom/media/webrtc/MediaEngineCameraVideoSource.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/media/webrtc/MediaEngineCameraVideoSource.cpp b/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
index e63a9afded..e1e572724f 100644
--- a/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
@@ -339,6 +339,13 @@ MediaEngineCameraVideoSource::SetName(nsString aName)
facingMode = VideoFacingModeEnum::User;
}
#endif // ANDROID
+#ifdef XP_MACOSX
+ // Kludge to test user-facing cameras on OSX.
+ if (aName.Find(NS_LITERAL_STRING("Face")) != -1) {
+ hasFacingMode = true;
+ facingMode = VideoFacingModeEnum::User;
+ }
+#endif
#ifdef XP_WIN
// The cameras' name of Surface book are "Microsoft Camera Front" and
// "Microsoft Camera Rear" respectively.