client-sdk-flutter icon indicating copy to clipboard operation
client-sdk-flutter copied to clipboard

screen share resolution is not work

Open wanjm opened this issue 2 years ago • 0 comments

localVideoTrackFuture = LocalVideoTrack.createScreenShareTrack(
      ScreenShareCaptureOptions(
        params: VideoParameters(
          dimensions: VideoDimensions(1280, 720),
          encoding: const VideoEncoding(
            maxBitrate: 2500 * 1000,
            maxFramerate: 15,
          ),
        ),
        sourceId: sourceId,
        maxFrameRate: 30.0,
      ),
    );

var localVideo = await localVideoTrackFuture!;
        var a = await plasoRoom.room.localParticipant!.publishVideoTrack(
          localVideo,
          publishOptions: const VideoPublishOptions(
            simulcast: false,
            videoCodec: "VP8", //"VP8"
          ),
        );

in the above code, I set the screen resolution to 1280x720, and when call "rtc.navigator.mediaDevices.getDisplayMedia(constraints);" the constraints is

{audio: false, video: {width: 1280, height: 720, frameRate: 15, deviceId: {exact: 724049430}, mandatory: {frameRate: 30.0}}}

both windows and macos has such problem, but the resulotion is correct in chrome ,maybe it is a bug of flutter_webrtc, as all experts are here , so I put it here first

wanjm avatar Nov 30 '23 03:11 wanjm