@@ -49,7 +49,9 @@ class _RoomPageState extends State<RoomPage> {
49
49
Hardware .instance.setSpeakerphoneOn (true );
50
50
}
51
51
52
- ReplayKitChannel .listenMethodChannel (widget.room);
52
+ if (lkPlatformIs (PlatformType .iOS)) {
53
+ ReplayKitChannel .listenMethodChannel (widget.room);
54
+ }
53
55
54
56
if (lkPlatformIsDesktop ()) {
55
57
onWindowShouldClose = () async {
@@ -64,7 +66,9 @@ class _RoomPageState extends State<RoomPage> {
64
66
void dispose () {
65
67
// always dispose listener
66
68
(() async {
67
- ReplayKitChannel .closeReplayKit ();
69
+ if (lkPlatformIs (PlatformType .iOS)) {
70
+ ReplayKitChannel .closeReplayKit ();
71
+ }
68
72
widget.room.removeListener (_onRoomDidUpdate);
69
73
await _listener.dispose ();
70
74
await widget.room.dispose ();
@@ -203,22 +207,25 @@ class _RoomPageState extends State<RoomPage> {
203
207
if (localParticipantTracks != null ) {
204
208
for (var t in localParticipantTracks) {
205
209
if (t.isScreenShare) {
206
- if (! _flagStartedReplayKit) {
207
- _flagStartedReplayKit = true ;
210
+ if (lkPlatformIs (PlatformType .iOS)) {
211
+ if (! _flagStartedReplayKit) {
212
+ _flagStartedReplayKit = true ;
208
213
209
- ReplayKitChannel .startReplayKit ();
214
+ ReplayKitChannel .startReplayKit ();
215
+ }
210
216
}
211
-
212
217
screenTracks.add (ParticipantTrack (
213
218
participant: widget.room.localParticipant! ,
214
219
videoTrack: t.track,
215
220
isScreenShare: true ,
216
221
));
217
222
} else {
218
- if (_flagStartedReplayKit) {
219
- _flagStartedReplayKit = false ;
223
+ if (lkPlatformIs (PlatformType .iOS)) {
224
+ if (_flagStartedReplayKit) {
225
+ _flagStartedReplayKit = false ;
220
226
221
- ReplayKitChannel .closeReplayKit ();
227
+ ReplayKitChannel .closeReplayKit ();
228
+ }
222
229
}
223
230
224
231
userMediaTracks.add (ParticipantTrack (
0 commit comments