Better screenshare

This commit is contained in:
LittleSheep 2024-08-09 22:40:05 +08:00
parent 8ec33ccbf4
commit 0135b8d838

View File

@ -159,8 +159,9 @@ class _ControlsWidgetState extends State<ControlsWidget> {
} }
var track = await LocalVideoTrack.createScreenShareTrack( var track = await LocalVideoTrack.createScreenShareTrack(
ScreenShareCaptureOptions( ScreenShareCaptureOptions(
captureScreenAudio: true,
sourceId: source.id, sourceId: source.id,
maxFrameRate: 15.0, maxFrameRate: 30.0,
), ),
); );
await _participant.publishVideoTrack(track); await _participant.publishVideoTrack(track);
@ -174,6 +175,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
var track = await LocalVideoTrack.createScreenShareTrack( var track = await LocalVideoTrack.createScreenShareTrack(
const ScreenShareCaptureOptions( const ScreenShareCaptureOptions(
useiOSBroadcastExtension: true, useiOSBroadcastExtension: true,
captureScreenAudio: true,
maxFrameRate: 30.0, maxFrameRate: 30.0,
), ),
); );