-
Notifications
You must be signed in to change notification settings - Fork 71
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
the youtube sample does not work on windows desktop for any url #171
Comments
Can you provide which example you were using? So I can provide explained steps to fvp? Also I am going to test both examples of YouTube and your url Keep in mind an error with 403 status code most probably an unauthorized, so make sure to attach http headers if needed |
I was using the example which contains the Play Youtube video. And yes I can confirm my doubts. When I do flutter run --debug -windows from vscode terminal I get a detailed stack trace as below. What headers do I need to pass. Is there some instruction I am missing. A Dart VM Service on Windows is available at: http://127.0.0.1:55651/LcDw0CfyGRs=/ |
HTTP error 403 Forbidden, means that data couldnt be extracted due to autoriztion are you sure you used the right header? |
Since this is a url in public domain. (I can view in browser) do I need special authorization. r u suggesting to view a youtube video in my player i need access ? |
@floyd-lewis can you git pull latest changes and try again? now it works for me |
Yes, confirmed it works. Will also test on android as it was not working there too. Never suspected the issue to stem form ...explode.... Thx! |
Glad to know it was fixed , feel free to check on Android and close the issue if it works correctly Thank you for explaining the issue that helped alot ❤️ |
I just tested on android. Get an error, Library not loading. Will attach a screen shot too
|
will check it and let you know, for now can you test with
it should work correctly |
also i just tested and it works correctly on android in my example with can you do a flutter clean and try rebuilding the android version and let me know what is the result? also you are testing on my example without any changes correct? what is the emulator api version? mine is 31 |
I downloaded and unzipped your project from git, so the environment should be identical to yours. Launching lib\pocMeeduPlayer.dart on sdk gphone x86 in debug mode... FAILURE: Build failed with an exception.
C++ build system [configure] failed while executing: CMake Warning at C:/Users/floyd.lewis/AppData/Local/Android/Sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message): Downloading mdk-sdk from https://sourceforge.net/projects/mdk-sdk/files/nightly/mdk-sdk-android.7z CMake Warning at C:/Users/floyd.lewis/AppData/Local/Android/Sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message): CMake Error: Problem with archive_read_next_header():
BUILD FAILED in 1m 37s |
Flutter clean and try again, fvp failed to download the files needed to run as mentioned Make sure the internet is stable while building |
Also am using Nexus 5 emulator. |
When build is done (flutter clean and try again until a different error appears or it works) Test and let me know the result since I tried and it worked for me using fvp |
also for android use for now
until this gets fixed wang-bin/fvp#23 (for fixing this error |
also i just did try a flutter clean and build and it worked for me now |
Here another thing. I'm using shared_preferences package. flutter_meedu_videoplayer is using it too. In the main I am getting the instance. It fails. If I remove the flutter_meedu_videoplayer dependency there is no issue. On windows there is no issue. I suspect it is something to do with the failure (fpv?) on android. E/flutter (30733): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) |
i dont think its related , can you terminate the app and try again? since this means the package for shared_preferences files are not added did you try to use after hot restart? since this is may be the issue |
I did a flutter clean and then pub get. And then debug. Here's the code, i call init in main. It appears that the shared_prefrence native part is buggered up when I include meedo. import 'package:shared_preferences/shared_preferences.dart'; class PreferenceService { static Future init() async => |
Just a confirmation ...no problem on WIndows when i include meedu |
on mobile it may fail due to speed, since windows is faster, also it may be due to android interface not being inilized to work yet
or
test that and let me know. |
just tested and no errors
also this works
|
But for u ...the build for android succeeds. For me it does not. Here lies the problem. I just know that when i have meedu in the dependency ..shared_preference bombs. |
The error you mentioned is fixed by any of the ways I mentioned This is not related to the build, also fvp fixed the android issue and I did test it and it worked for me If the build still fails for you let me know the error |
Still fails. Here's the command line output. Am using androidFPV = true. Failing to load libfvp_plugin.so. Will try with FPV false too. Just a heads up. PS F:\floyd\src\flutter\flutter_meedu_videoplayer\package\example> flutter clean
E/flutter (19318): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libfvp_plugin.so': dlopen failed: "/data/app/~~GC1_glfon1RtTxom3guKhw==/com.zezo357.flutter_meedu_videoplayer_example-sTbjxVVLFB5K_o-t7nPTzw==/lib/x86/libmdk.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)E/flutter (19318): #0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43) Flutter run key commands. A Dart VM Service on sdk gphone x86 is available at: http://127.0.0.1:53294/KiRTB4o77Sg=/ ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════ When the exception was thrown, this was the stack: I/AssistStructure(19318): Flattened final assist data: 504 bytes, containing 1 windows, 3 views |
Please try with it as false and use one of the main implementations I mentioned please |
Fails as below. It appears any plugin which accesses the channel throws the error. In my case it was the share_preferences. Here it appears to be the volume controller. A Dart VM Service on sdk gphone x86 is available at: http://127.0.0.1:54987/lHiVlIeEjsA=/ ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════ When the exception was thrown, this was the stack: |
Channel version 3.10.5 PS F:\floyd\src\flutter\flutter_meedu_videoplayer\package\example> flutter doctor |
Can you please share your main function? |
Some more input:- E/flutter (24318): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libfvp_plugin.so': dlopen failed: "/data/app/~~9wU42vMEMQEpkMS8nLBAcg==/com.zezo357.flutter_meedu_videoplayer_example-W0wRR5_oiFRx7CtkW60j1Q==/lib/x86/libmdk.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23) void main() async { |
Used the code from git repository.
I entered https://www.youtube.com/watch?v=pRReSpMSYi4 as the youtube url.
I am using Windows 10
Below is the stack trace.
[flutter_meedu_videoplayer] Exception: No Stream for textureId: -1.
[flutter_meedu_videoplayer] #0 MdkVideoPlayer.videoEventsFor
video_player_mdk.dart:208
#1 VideoPlayerController.initialize
video_player.dart:488
#2 MeeduPlayerController.setDataSource
controller.dart:533
#3 _YoutubeExamplePageState._setDataSource
yotube_page_example.dart:123
[flutter_meedu_videoplayer] Fit is BoxFit.contain
The text was updated successfully, but these errors were encountered: