-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Don't know why RTCVideoView is been rotated wrongly to landscaped on other peer, Even the video dimensions is inverted, width turn to height while height to width on using getUserMedia
navigator.mediaDevices.getUserMedia({
'audio': true,
'video': videoID == null || videoID.isEmpty? true : {
'optional': [
{'sourceId': videoID}
],
'width': 480, 'height': 640
},
});
LayoutBuilder(
builder: (context, constraints) {
return ValueListenableBuilder<RTCVideoValue>(
valueListenable: ps.renderer!,
builder:
(BuildContext context, RTCVideoValue value, Widget? child) {
if(!forcedCover){
forcedCover = canCoverVideoToScreen(
constraints.maxWidth,
constraints.maxHeight,
ps.renderer!.videoWidth.toDouble(),
ps.renderer!.videoHeight.toDouble());
}
return Container(
margin: const EdgeInsets.all(1),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(12),
),
child: Stack(
children: [
RTCVideoView(
ps.renderer!,
objectFit: forcedCover?RTCVideoViewObjectFit
.RTCVideoViewObjectFitCover:RTCVideoViewObjectFit
.RTCVideoViewObjectFitContain,
mirror: ps.isMirror,
),
Text(
"value.width:${ps.renderer!.videoWidth}x${ps.renderer!.videoHeight}",
style: TextStyle(color:Colors.red),
)]),
);
});
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

