Skip to content

Commit d370248

Browse files
alexmercerindesarbanis
authored andcommitted
fix: check isDesktopVideoPlayerSupported
1 parent 8b9c4c4 commit d370248

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/stream_chat_flutter/lib/src/stream_chat.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ class StreamChatState extends State<StreamChat> {
9898
@override
9999
void initState() {
100100
super.initState();
101-
VideoPlayerMediaKit.ensureInitialized(
102-
windows: true,
103-
linux: true,
104-
);
101+
if (isDesktopVideoPlayerSupported) {
102+
VideoPlayerMediaKit.ensureInitialized(
103+
windows: true,
104+
linux: true,
105+
);
106+
}
105107
}
106108

107109
@override

0 commit comments

Comments
 (0)