Open namankk opened 2 years ago
Facing same issue, youtube player keeps loading when opened from android app, while it works when running directly from flutter module.
install flutter_inappwebview in pub get
I have also encountered the same problem.
我找到了原因,是因为我在安卓中使用viewpage,InAppWebview只是被嵌入到其中一个页面了,启动程序的时候,flutter引擎被初始化了,但是还没有展示在界面上,导致通信失败,后续就一直失败了
same issue, freezes an application ui
So this answer made it work for me https://stackoverflow.com/a/74835030/10766511 .
Just set the useHybridComposition
to false
Example:
YoutubePlayer(
controller: YoutubePlayerController(
initialVideoId: videoModel.url,
flags: const YoutubePlayerFlags(
useHybridComposition: false,
mute: false,
autoPlay: true,
disableDragSeek: true,
loop: false,
isLive: false,
forceHD: false,
enableCaption: false,
showLiveFullscreenButton:
false),
),
showVideoProgressIndicator: true,
progressIndicatorColor:
colorScheme.secondary,
progressColors: progressColors,
),
I tried to install flutter_inappwebview and add 'useHybridComposition: false'. but it still makes error. In my case, this error is generated when I dispose the Widget including YoutubePlayer.
Describe the bug I am using flutter module as addToApp in my android application this error occur when i try to use youtube_player_flutter: ^8.0.0 Library the video keeps on loading never gets loaded and when i run the flutter module separately it works fine but it didn't work when i run it from android module
Technical Details:
Error Logs E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method create on channel flutter/platform_views)
0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7)