Skip to content

Commit 9722630

Browse files
committed
(Chatbox): Fix bug with audio messages
Microphone access can only be given to a webpage loaded via https. This meant that the previous way we loaded the webpage would cause audio messages not to work. This fixes that.
1 parent 3945f38 commit 9722630

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/src/chatbox.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@ class ChatBoxState extends State<ChatBox> {
364364
}
365365

366366
String htmlData = await rootBundle.loadString('packages/talkjs_flutter/assets/index.html');
367-
Uri uri = Uri.dataFromString(htmlData, mimeType: 'text/html', encoding: Encoding.getByName('utf-8'));
368-
webViewController.loadUrl(uri.toString());
367+
webViewController.loadHtmlString(htmlData, baseUrl: 'https://app.talkjs.com');
369368

370369
_webViewController = webViewController;
371370
}

0 commit comments

Comments
 (0)