sarbagyastha / youtube_player_flutter

A Flutter plugin for inline playback or streaming of YouTube videos using the official iFrame Player API.
https://youtube.sarbagyastha.com.np
BSD 3-Clause "New" or "Revised" License
705 stars 816 forks source link

[BUG] <title> video is not playing in android #1012

Open fluxeducare opened 1 week ago

fluxeducare commented 1 week ago

Is there an existing issue for this?

Package

youtube_player_flutter

What happened?

D/InAppWebView(32240): Using InAppWebViewClientCompat implementation W/cr_WebSettings(32240): setForceDark() is a no-op in an app with targetSdkVersion>=T W/cr_SupportWebSettings(32240): setForceDarkBehavior() is a no-op in an app with targetSdkVersion>=T E/MethodChannel#flutter/platform_views(32240): Failed to handle method call E/MethodChannel#flutter/platform_views(32240): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)

What is the expected behaviour?

Loder showing and video not playing

D/InAppWebView(32240): Using InAppWebViewClientCompat implementation W/cr_WebSettings(32240): setForceDark() is a no-op in an app with targetSdkVersion>=T W/cr_SupportWebSettings(32240): setForceDarkBehavior() is a no-op in an app with targetSdkVersion>=T E/MethodChannel#flutter/platform_views(32240): Failed to handle method call E/MethodChannel#flutter/platform_views(32240): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)

How to reproduce?

just try to play the video on app

D/InAppWebView(32240): Using InAppWebViewClientCompat implementation W/cr_WebSettings(32240): setForceDark() is a no-op in an app with targetSdkVersion>=T W/cr_SupportWebSettings(32240): setForceDarkBehavior() is a no-op in an app with targetSdkVersion>=T E/MethodChannel#flutter/platform_views(32240): Failed to handle method call E/MethodChannel#flutter/platform_views(32240): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views(32240): at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)

Flutter Doctor Output

[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.19045.4957], locale en-US)
    • Flutter version 3.22.2 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (4 months ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3
fgodino85 commented 1 week ago

same behavior on android and flutter 3.24.3 and plugin version 9.1.1.

melbanna40 commented 4 days ago

Same here android 14

The app encounters SSL handshake failures, preventing the video from playing.

*I/PlatformViewsController(18639): Using hybrid composition for platform view: 0 [AndroidInAppWebViewWidget] (android) AndroidInAppWebViewWidget ID 0 calling "onWebViewCreated" using [] [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 10} D/CompatChangeReporter(18639): Compat change id reported: 236825255; UID 10200; state: ENABLED D/CompatChangeReporter(18639): Compat change id reported: 193247900; UID 10200; state: ENABLED [AndroidInAppWebViewController] (android) WebView ID 0 calling "onLoadStart" using {url: https://www.youtube.com/} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onUpdateVisitedHistory" using {isReload: false, url: about:blank} W/om.istchrat.app(18639): ApkAssets: Deleting an ApkAssets object ' and /data/app/~~IO4f-ydweff9p9GL_psoiw==/com.google.android.webview-_J0roI8eTVhu24qe9uFkQQ==/WebViewGoogle.apk' with 2 weak references [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 70} E/chromium(18639): [ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 E/chromium(18639): [ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [AndroidInAppWebViewController] (android) WebView ID 0 calling "onReceivedError" using {request: {headers: {User-Agent: Mozilla/5.0 (Linux; Android 14; Build/AP31.240426.022.B1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.82 Mobile Safari/537.36, Referer: https://www.youtube.com/, sec-ch-ua: "Chromium";v="124", "Android WebView";v="124", "Not-A.Brand";v="99", sec-ch-ua-mobile: ?1, Accept: /, sec-ch-ua-platform: "Android"}, isRedirect: false, method: GET, hasGesture: false, isForMainFrame: false, url: https://www.youtube.com/iframe_api}, error: {description: net::ERR_CONNECTION_CLOSED, type: -6}} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 100} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 100} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onTitleChanged" using {title: about:blank} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onLoadStop" using {url: https://www.youtube.com/} E/chromium(18639): [ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 E/chromium(18639): [ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [AndroidInAppWebViewController] (android) WebView ID 0 calling "onReceivedError" using {request: {headers: {User-Agent: Mozilla/5.0 (Linux; Android 14; Build/AP31.240426.022.B1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.82 Mobile Safari/537.36, Referer: https://www.youtube.com/, sec-ch-ua: "Chromium";v="124", "Android WebView";v="124", "Not-A.Brand";v="99", sec-ch-ua-mobile: ?1, Accept: image/avif,image/webp,image/apng,image/svg+xml,image/,/;q=0.8, sec-ch-ua-platform: "Android"}, isRedirect: false, method: GET, hasGesture: false, isForMainFrame: false, url: https://www.youtube.com/favicon.ico}, error: {description: net::ERR_CONNECTION_CLOSED, type: -6}} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onPageCommitVisible" using {url: https://www.youtube.com/} D/EGL_emulation(18639): app_time_stats: avg=1391.71ms min=4.01ms max=7187.35ms count=6.**

musharaf-at-NGI commented 2 days ago

Any update?