Skip to content

Commit b7f7ba9

Browse files
authored
browser(firefox): screencast support for Windows headful (#2965)
1 parent 19cd96c commit b7f7ba9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

browser_patches/firefox/BUILD_NUMBER

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1128
2-
Changed: [email protected] Wed Jul 15 09:22:48 PDT 2020
1+
1129
2+
Changed: [email protected] Wed Jul 15 23:55:13 GMTST 2020

browser_patches/firefox/juggler/screencast/nsScreencastService.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ rtc::scoped_refptr<webrtc::VideoCaptureModule> CreateWindowCapturer(nsIWidget* w
5050
fprintf(stderr, "Video capture for Wayland is not implemented\n");
5151
return nullptr;
5252
# endif
53+
#elif defined(_WIN32)
54+
mozilla::widget::CompositorWidgetInitData initData;
55+
widget->GetCompositorWidgetInitData(&initData);
56+
const mozilla::widget::WinCompositorWidgetInitData& winInitData = initData.get_WinCompositorWidgetInitData();
57+
nsCString windowId;
58+
windowId.AppendPrintf("%lu", winInitData.hWnd());
59+
return webrtc::DesktopCaptureImpl::Create(sessionId, windowId.get(), webrtc::CaptureDeviceType::Window);
5360
#else
5461
fprintf(stderr, "Video capture is not implemented on this platform\n");
5562
return nullptr;

0 commit comments

Comments
 (0)