Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/components/stream_preview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ class _StreamPreviewState extends State<StreamPreview> {
})
..setNavigationDelegate(NavigationDelegate(
onPageFinished: (url) async {


String? x = await _controller.currentUrl();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this actually do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just testing things, this is the point where I got stuck.

print('================================================================================================================================================================');
print(x);
if(x?.contains("controls=false")??false){
x = x?.replaceAll("controls=false","controls=true");
print(x);
_controller.loadRequest(Uri.parse(x??""));
}
await _controller.runJavaScript(
await rootBundle.loadString('assets/twitch-tunnel.js'));
// wait a second for twitch to catch up.
Expand Down Expand Up @@ -159,7 +169,7 @@ class _StreamPreviewState extends State<StreamPreview> {
),
),
)
else if (_playerState == "Playing")
else if (_playerState == "Playing"&&Platform.isIOS)
Positioned.fill(
child: GestureDetector(
onTap: () {
Expand Down