Describe the bug
When I click the youtube icon provided by the player, it redirects to webpage with below error:
Web page not available
The web page at intent://m.youtube.com/watch?time_continue=145&v=tcodrIK2P_I&embeds_referring_euri=https%3A%2F%2Fwww.youtube.com%2F&embeds_referring_origin=https%3A%2F%2Fwww.youtube.com&source_ve_path=Mjg2NjY&feature=emb_logo&feature=mweb_302redirect_to_app_11264154#Intent;package=com.google.android.youtube;scheme=vnd.youtube;launchFlags=268435456;end; could not be loaded because:
net::ERR_UNKNOWN_URL_SCHEME
this error found in flutter app when click the youtube iframe player's youtube icon
To Reproduce
Steps to reproduce the behavior:
1) run the screen
2) click the youtube icon in the player
Expected behavior
It should be redirects to Youtube App for displaying the video instead.
Screenshots
The screen before clicking the youtube icon in the player:
Describe the bug When I click the youtube icon provided by the player, it redirects to webpage with below error: Web page not available The web page at intent://m.youtube.com/watch?time_continue=145&v=tcodrIK2P_I&embeds_referring_euri=https%3A%2F%2Fwww.youtube.com%2F&embeds_referring_origin=https%3A%2F%2Fwww.youtube.com&source_ve_path=Mjg2NjY&feature=emb_logo&feature=mweb_302redirect_to_app_11264154#Intent;package=com.google.android.youtube;scheme=vnd.youtube;launchFlags=268435456;end; could not be loaded because:
net::ERR_UNKNOWN_URL_SCHEME this error found in flutter app when click the youtube iframe player's youtube icon
To Reproduce Steps to reproduce the behavior: 1) run the screen 2) click the youtube icon in the player
Expected behavior It should be redirects to Youtube App for displaying the video instead.
Screenshots The screen before clicking the youtube icon in the player:
After clicking youtube ico:
Technical Details:
Code `import 'dart:developer';
import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:youtube_player_iframe/youtube_player_iframe.dart';
class YoutubeAppDemo extends StatefulWidget { @override _YoutubeAppDemoState createState() => _YoutubeAppDemoState(); }
class _YoutubeAppDemoState extends State {
late YoutubePlayerController _controller;
@override void initState() { super.initState(); _controller = YoutubePlayerController.fromVideoId( videoId: 'H5v3kku4y6Q', autoPlay: false, params: const YoutubePlayerParams( showControls: true, mute: false, showFullscreenButton: true, loop: false, ), );
}
@override Widget build(BuildContext context) { return YoutubePlayerScaffold( controller: _controller, builder: (context, player) { return Scaffold( body: Stack( children: [ LayoutBuilder( builder: (context, constraints) { if (kIsWeb && constraints.maxWidth > 750) { return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox(height: 100.0), Expanded( flex: 20, child: Column( children: [ player, ], ), ), ], ); }
}
@override void dispose() { _controller.close(); super.dispose(); } } `