Open velsa opened 5 years ago
Same issue!
@pichillilorenzo
I encounter an issue when I click on full screen button inside the youtube video. the app crush after that. what is the solution for this?
@maltub9 please post the error log you get, otherwise I can't fix it. Also, if possible, post the code you are using to show the youtube video in order to debug it. Thanks
I still have the same issue. Is there a solution for this?
Same here, version ^5.4.3+7, Here's the code:
InAppWebViewGroupOptions options = InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
useShouldOverrideUrlLoading: true,
mediaPlaybackRequiresUserGesture: false,
),
android: AndroidInAppWebViewOptions(
useHybridComposition: true,
),
ios: IOSInAppWebViewOptions(
allowsInlineMediaPlayback: true,
));
@override
Widget build(BuildContext context) {
return InAppWebView(
key: webViewKey,
initialUrlRequest: URLRequest(
url: Uri.parse('https://www.youtube.com/embed/q_dsgjGRBsw?autoplay=1'),
),
initialOptions: options,
onWebViewCreated: (controller) {
webViewController = controller;
},
);
}
I've set the option
'mediaPlaybackRequiresUserGesture': false
, but youtube player still doesn't autostart. I'm emeding YouTube player in webview by opening a urlhttps://www.youtube.com/embed/Mz3kHQxBjGg?autoplay=1
Any ideas on how to make it autoplay in the webview?