File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,12 @@ class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>
92
92
93
93
String get viewType => 'RTCVideoRenderer-$textureId ' ;
94
94
95
- void _updateAllValues () {
96
- final element = findHtmlView ();
95
+ void _updateAllValues (web. HTMLVideoElement fallback ) {
96
+ final element = findHtmlView () ?? fallback ;
97
97
value = value.copyWith (
98
98
rotation: 0 ,
99
- width: element? .videoWidth.toDouble () ?? 0.0 ,
100
- height: element? .videoHeight.toDouble () ?? 0.0 ,
99
+ width: element.videoWidth.toDouble (),
100
+ height: element.videoHeight.toDouble (),
101
101
renderVideo: renderVideo,
102
102
);
103
103
}
@@ -273,13 +273,13 @@ class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>
273
273
274
274
_subscriptions.add (
275
275
element.onCanPlay.listen ((dynamic _) {
276
- _updateAllValues ();
276
+ _updateAllValues (element );
277
277
}),
278
278
);
279
279
280
280
_subscriptions.add (
281
281
element.onResize.listen ((dynamic _) {
282
- _updateAllValues ();
282
+ _updateAllValues (element );
283
283
onResize? .call ();
284
284
}),
285
285
);
You can’t perform that action at this time.
0 commit comments