flutter-tizen / plugins

Flutter plugins for Tizen
66 stars 47 forks source link

[webview_flutter_tizen] playing video result in black screen & audio only #752

Closed danimnh closed 1 month ago

danimnh commented 1 month ago

Hi we're prototyping a new app for video playing purposes on Tizen OS

However we came across an issue where our videos are black screens even though the audio works perfectly, we tested youtube on the Samsung TV (Tizen 6.0) main browser and came across the same issue.

We were wondering if you know what is happening here since using the browser has the same issue and just wondering if this package might offer a solution for this kind of situation?

Reproduce

Requirements

danimnh commented 1 month ago

https://eu.community.samsung.com/t5/tv/can-t-play-videos-via-web-browser/td-p/928820

maybe related to this case?

JSUYA commented 1 month ago

Have you tried this? When I tested the https://videojs.com/advanced/?video=disneys-oceans example, I confirmed that the video was displayed normally.

--- a/packages/webview_flutter/example/lib/main.dart
+++ b/packages/webview_flutter/example/lib/main.dart
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-       backgroundColor: Colors.green,
+       backgroundColor: Colors.transparent,
       appBar: AppBar(
         title: const Text('Flutter WebView example'),

https://pub.dev/packages/webview_flutter_tizen#note

+) Video playback may not work properly in webview (slow, crashes, etc.). This can be due to a problem with the web engine or device, and the embedded web engine may not provide all functions because it is optimized. Please be aware of this.

danimnh commented 1 month ago

Yes we tested on backgroundColor set to transparent.

However we just find out more results

Video.js site I got timeout issue, however I can confirm that Youtube works fine.

[I] flutter: WebView is loading (progress : 10%)
[I] flutter: allowing navigation to https://videojs.com/

[I] flutter: Page resource error:
[I] flutter:   code: 8
[I] flutter:   description: Connection timeout
[I] flutter:   errorType: WebResourceErrorType.timeout
[I] flutter:   isForMainFrame: true
[I] flutter:
[I] flutter: WebView is loading (progress : 100%)

Youtube

So i think its more about how I initiialized the webview right? Since the example app is working just fine on youtube.

danimnh commented 2 weeks ago

Hi, just wanted to post an update, somehow I got it working with no crashes. Funny thing is I don't have code changes on my end.

some checklists are

Restarting the TV might help here, but not sure.

+) Video playback may not work properly in webview (slow, crashes, etc.). This can be due to a problem with the web engine or device, and the embedded web engine may not provide all functions because it is optimized. Please be aware of this.

might this causes the inconsistency? since sometime it breaks, sometime it works.