Index: content/renderer/media/media_stream_video_track.cc |
diff --git a/content/renderer/media/media_stream_video_track.cc b/content/renderer/media/media_stream_video_track.cc |
index dede54fecb104f1e46e97f43eb0ba1d2ed1dea20..a8c1a2a94cd9a06d23c47a6d2fa7d60239896e31 100644 |
--- a/content/renderer/media/media_stream_video_track.cc |
+++ b/content/renderer/media/media_stream_video_track.cc |
@@ -307,6 +307,25 @@ void MediaStreamVideoTrack::getSettings( |
settings.frameRate = format->frame_rate; |
settings.width = format->frame_size.width(); |
settings.height = format->frame_size.height(); |
+ const media::VideoFacingMode facing = source_->GetVideoFacing(); |
+ switch (facing) { |
+ case media::VideoFacingMode::USER: |
+ settings.facingMode = |
+ blink::WebMediaStreamTrack::Settings::VideoFacingMode::User; |
+ break; |
+ case media::VideoFacingMode::ENVIRONMENT: |
+ settings.facingMode = blink::WebMediaStreamTrack::Settings:: |
+ VideoFacingMode::Environment; |
+ break; |
+ case media::VideoFacingMode::LEFT: |
+ settings.facingMode = |
+ blink::WebMediaStreamTrack::Settings::VideoFacingMode::Left; |
+ break; |
+ case media::VideoFacingMode::RIGHT: |
+ settings.facingMode = |
+ blink::WebMediaStreamTrack::Settings::VideoFacingMode::Right; |
+ break; |
+ } |
} |
} |
// TODO(hta): Extract the real value. |