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

Introducing beta version of the player. #26

Closed
sarbagyastha opened this issue Jun 9, 2019 · 7 comments
Closed

Introducing beta version of the player. #26

sarbagyastha opened this issue Jun 9, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@sarbagyastha
Copy link
Owner

sarbagyastha commented Jun 9, 2019

Improvements:

  • Faster full screen toggling.
  • Toggles full screen on orientation change.
  • Option to add own custom thumbnail.
  • Memory efficient than previous versions.
  • Fixes for some videos being stuck at Unknown state forever.

Issues:

Pub Link: https://pub.dev/packages/youtube_player_flutter/versions/3.0.0-beta.4

@sarbagyastha sarbagyastha added the enhancement New feature or request label Jun 9, 2019
@macroday
Copy link

I got the below error when i used this beta version

Failed to handle method call
java.lang.IllegalArgumentException: Unknown WebView setting: debuggingEnabled
at io.flutter.plugins.webviewflutter.FlutterWebView.applySettings(FlutterWebView.java:199)
at io.flutter.plugins.webviewflutter.FlutterWebView.(FlutterWebView.java:42)
at io.flutter.plugins.webviewflutter.WebViewFactory.create(WebViewFactory.java:26)
at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:143)
at android.app.Dialog.dispatchOnCreate(Dialog.java:389)
at android.app.Dialog.show(Dialog.java:293)
at android.app.Presentation.show(Presentation.java:235)
at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:79)
at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:48)
at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:203)
at io.flutter.plugin.platform.PlatformViewsController.onMethodCall(PlatformViewsController.java:142)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
2019-06-18 18:32:59.694 E: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Unknown WebView setting: debuggingEnabled, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)

#2 AndroidViewController._create (package:flutter/src/services/platform_views.dart:596:54)

#3 AndroidViewController.setSize (package:flutter/src/services/platform_views.dart:521:14)

#4 RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:189:29)

#5 RenderAndroidView.performResize (package:flutter/src/rendering/platform_view.dart:170:5)
#6 RenderObject.layout (package:flutter/src/rendering/object.dart:1629:9)
#7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#8 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#9 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#10 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#11 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
#12 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#13 RenderAspectRatio.performLayout (package:flutter/src/rendering/proxy_box.dart:518:13)
#14 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#15 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)
#16 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#17 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:737:15)
#18 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#19 _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:497:13)
#20 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#21 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#22 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#23 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#24 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#25 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#26 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#27 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#28 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#29 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#30 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#31 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#32 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#33 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#34 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)
#35 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#36 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7)

Please check and fix this issue

@sarbagyastha
Copy link
Owner Author

@macroday , can you ensure whether or not the issue exists currently?

@macroday
Copy link

Still happening

@sarbagyastha
Copy link
Owner Author

Please check with v3.0.0. Does it still exist for you ?

@macroday
Copy link

macroday commented Jun 24, 2019

Its fixed. Please change the play icon instead of pause icon, if complete the video in youtube_player_flutter 3.0.0+1 this version. And full screen not properly working in this version.

  1. When i goto full screen the video gets increased contrast automatically.See here
  2. In some times the video widget not attached to bottom and right side. Some gap has been shown. See here

@Fuchs1990
Copy link

Hey, I just upgraded to 3.0.0+1 but I still have a JavaScript Issue (#2) on iOS.
The following error log is from your Sample App which I checked out.

This error appears when the app is started.

[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'loadById("iLnmTe5Q2Qw", 0)'
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=79, WKJavaScriptExceptionMessage=TypeError: player.loadVideoById is not a function. (In 'player.loadVideoById(id, startAt)', 'player.loadVideoById' is undefined), WKJavaScriptExceptionColumnNumber=25, WKJavaScriptExceptionSourceURL=https://sarbagyadhaubanjar.github.io/youtube_player/player-revised.js, NSLocalizedDescription=A JavaScript exception occurred})
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)

#2 MethodChannelWebViewPlatform.evaluateJavascript (package:ytview/src/webview_method_channel.dart:90:21)
#3 WebViewController.evaluateJavascript (package:ytview/ytview.dart:579:39)
#4 YoutubePlayerController._evaluateJS (package:youtube_player_flutter/src/youtube_player.dart:580:30)
#5 YoutubePlayerController.load (package:youtube_player_flutter/src/youtube_player.dart:594:7)
#6 __PlayerState.build. (package:youtube_player_flutter/src/youtube_player.dart:462:37)
#7 _PlatformCallbacksHandler.onPageFinished (package:ytview/ytview.dart:406:15)
#8 MethodChannelWebViewPlatform._onMethodCall (package:ytview/src/webview_method_channel.dart:39:35)
#9 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#10 MethodChannelWebViewPlatform._onMethodCall (package:ytview/src/webview_method_channel.dart:26:29)
#11 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:383:55)
#12 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#13 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:380:39)
#14 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:351:54)
#15 BinaryMessages.handlePlatformMessage (package:flutter/src/services/platform_messages.dart:76:33)
#16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#17 BinaryMessages.handlePlatformMessage (package:flutter/src/services/platform_messages.dart:67:44)
#18 _invoke3. (dart:ui/hooks.dart:263:15)
#19 _rootRun (dart:async/zone.dart:1124:13)
#20 _CustomZone.run (dart:async/zone.dart:1021:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#22 _invoke3 (dart:ui/hooks.dart:262:10)
#23 _dispatchPlatformMessage (dart:ui/hooks.dart:136:5)

The following error appears when I press the play button on the video.

[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'play()'
Error Domain=WKErrorDomain Code=1 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred})
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)

#2 MethodChannelWebViewPlatform.evaluateJavascript (package:ytview/src/webview_method_channel.dart:90:21)
#3 WebViewController.evaluateJavascript (package:ytview/ytview.dart:579:39)
#4 YoutubePlayerController._evaluateJS (package:youtube_player_flutter/src/youtube_player.dart:580:30)
#5 YoutubePlayerController.play (package:youtube_player_flutter/src/youtube_player.dart:587:18)
#6 _PlayPauseButtonState.build. (package:youtube_player_flutter/src/controls.dart:80:64)
#7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:511:14)
#8 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:566:30)
#9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:166:24)
#10 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:240:9)
#11 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:211:7)
#12 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:225:20)
#14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:199:22)
#15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
#16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
#17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
#18 _rootRunUnary (dart:async/zone.dart:1136:13)
#19 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#21 _invoke1 (dart:ui/hooks.dart:233:10)
#22 _dispatchPointerDataPacket (dart:ui/hooks.dart:154:5)

@sarbagyastha
Copy link
Owner Author

@Fuchs1990 could you check with new verison and submit log if it's not working on iOS?

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

No branches or pull requests

3 participants