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

Local video not working #356

Open
uitlegentekst opened this issue May 21, 2020 · 0 comments
Open

Local video not working #356

uitlegentekst opened this issue May 21, 2020 · 0 comments

Comments

@uitlegentekst
Copy link

Environment

**Flutter version:**1.18.0
Plugin version: 3.2.0
iOS version: 13.5
Xcode version: 11.5

First of all: thanks for your great plugin! Just one thing I can get my head around: I just can't get a local html-embedded video to work. Is this a bug or am I doing something wrong?

Description

Expected behavior:
Embedded video in html is displayed in the AppWebView

Current behavior:
Video is not loaded. Slash through play button.

Steps to reproduce

  1. Make a simple html-file with embedded local-video (see below) and test.
  2. Add files through Pubspec.yaml
  3. Create AppWebView with controller and display html.

###Dart code:
I use this to create the AppWebView:

webView = InAppWebView(
onLoadStart: (InAppWebViewController controller, String url) {
print('load');
},
onLoadError: (InAppWebViewController controller, String url, int code,
String message) async {
print("error $url: $code, $message");
},
onLoadHttpError: (InAppWebViewController controller, String url,
int statusCode, String description) async {
print("HTTP error $url: $statusCode, $description");
},
onWebViewCreated: (InAppWebViewController controller) {
webViewController = controller;
},
initialUrl: "http://localhost:8080/assets/source/intro.html",
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
cacheEnabled: true,
javaScriptCanOpenWindowsAutomatically: true,
minimumFontSize: 10,
useOnLoadResource: true,
debuggingEnabled: true,
javaScriptEnabled: true,
mediaPlaybackRequiresUserGesture: false,
),
),
);

Ofcourse I add it to the tree. The WebView works great. Only video is not displayed.

###HTML code.
The videotag in HTML is:

Pubspec is attached.

I am at a loss here.. any ideas?

Regards,
Mark

pubspec.yaml.zip

This was referenced Jul 6, 2020
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

1 participant