Skip to content

Commit 3167a7c

Browse files
committed
Added play/pause function to the play example app, also added fullscreen for play
1 parent dc67dea commit 3167a7c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

example/SampleProject/lib/play.dart

+8-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class _PlayState extends State<Play> {
2828
List<String> abrList = ['Automatic'];
2929
bool _inCalling = false;
3030
bool _isPaused = false;
31+
bool _isFullScreen = false;
3132

3233
_PlayState();
3334

@@ -196,12 +197,18 @@ class _PlayState extends State<Play> {
196197
builder: (context, orientation) {
197198
return Stack(
198199
children: <Widget>[
199-
Container(
200+
_isFullScreen ? Container(
200201
margin: const EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
201202
width: MediaQuery.of(context).size.width,
202203
height: MediaQuery.of(context).size.height,
203204
decoration: const BoxDecoration(color: Colors.black54),
204205
child: RTCVideoView(_remoteRenderer,objectFit: orientation == Orientation.portrait ? RTCVideoViewObjectFit.RTCVideoViewObjectFitContain : RTCVideoViewObjectFit.RTCVideoViewObjectFitCover ),
206+
) : Container(
207+
margin: const EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
208+
width: MediaQuery.of(context).size.width,
209+
height: MediaQuery.of(context).size.height,
210+
decoration: const BoxDecoration(color: Colors.black54),
211+
child: RTCVideoView(_remoteRenderer),
205212
),
206213
_isPaused
207214
? Center(
@@ -242,5 +249,4 @@ class _PlayState extends State<Play> {
242249
)
243250
);
244251
}
245-
246252
}

0 commit comments

Comments
 (0)