Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] player works fine on debug but crashes on deployed site #819

Open
aytunch opened this issue May 2, 2023 · 2 comments
Open

[web] player works fine on debug but crashes on deployed site #819

aytunch opened this issue May 2, 2023 · 2 comments

Comments

@aytunch
Copy link

aytunch commented May 2, 2023

The moment controller is created, we get an error. In debug mode it works perfectly. Do anyone have any idea?
I will supply more crash logs soon..

In debug mode, we get an error but it does not effect the functionality:
Screenshot 2023-05-02 at 19 33 52

In release deployment we get this error the moment controller is created and no player and widget is rendered on screen:
NoSuchMethodError: method not found: 'bw8' on null

@halfaHalfawy
Copy link

same issue

@talhaocakci
Copy link

talhaocakci commented Jul 25, 2023

I solved the problem like this:
First, the reason is: WebYoutubePlayerIframePlatform is not loaded via flutter_web_view since following plugin is not loaded in release mode: https://github.com/sarbagyastha/youtube_player_flutter/blob/master/packages/youtube_player_iframe_web/pubspec.yaml#L15

I have initialized the WebViewPlatform.instance in my own widget's initState method of the webview_flutter which is used by youtube player plugin of this repository.

WebViewPlatform.instance = WebYoutubePlayerIframePlatform();

required imports are

 import 'package:webview_flutter_platform_interface/src/webview_platform.dart';
import 'package:youtube_player_iframe_web/src/web_youtube_player_iframe_platform.dart';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@talhaocakci @aytunch @halfaHalfawy and others