Closed hasanm08 closed 3 weeks ago
do you want to use same code as video_player?
follow this in that case https://github.com/media-kit/media-kit/tree/main/video_player_media_kit
for the point of safari browser it may be hard to select based on what browser i dont have experience in that part
I have issues for android app sizes when i added media_kit and used it for web. Do you have any ideas to handel this? Maybe thease can help, but i don't know how?
https://docs.flutter.dev/packages-and-plugins/developing-packages
flutter: plugin: platforms: android: package: com.example.hello pluginClass: HelloPlugin ios: pluginClass: HelloPlugin macos: pluginClass: HelloPlugin web: pluginClass: HelloPlugin fileName: hello_web.dart
you are making a package? what is the use case? and can you show me the pubspec?
also check the link
I am using video_viewer package for hls streaming. But it has issues on hls streaming on web. So i want to merge it with your code and fix this issue in best perfomant casem
also check the link
I checked that package but are you sure about handling web issues and android size issues? Should i use that for both platforms?
I am using video_viewer package for hls streaming. But it has issues on hls streaming on web. So i want to merge it with your code and fix this issue in best perfomant casem
In that case you can import the web only, which will not increase size for other platforms
also check the link
I checked that package but are you sure about handling web issues and android size issues? Should i use that for both platforms?
I don't understand the android size problems, for web yes the package handles hls
also check the link
I checked that package but are you sure about handling web issues and android size issues? Should i use that for both platforms?
I don't understand the android size problems, for web yes the package handles hls
I checked that but i cannot find media_kit_libs_web To add as depandency after i made web field to true
There is no libs for web
Just adding the package and setting web to true is enough
There is no libs for web
Just adding the package and setting web to true is enough
I tried this way but it causes some depracated logs and no playing in web platform
Share the logs and a screenshot
Share the logs and a screenshot
`` The platformViewRegistry getter is deprecated and will be removed in a future release. Please import it from
dart:ui_web` instead.
onInitError other 2.718281828459045 http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3
throw_
http://localhost:51150/packages/media_kit/src/models/media/media_web.dart 82:7 new
http://localhost:51150/packages/video_player_media_kit/src/media_kit_video_player.dart 114:7 create
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5 _async
http://localhost:51150/packages/video_player_media_kit/src/media_kit_video_player.dart 69:22 create
http://localhost:51150/packages/video_player/video_player.dart 434:46 initialize
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5 _async
http://localhost:51150/packages/video_player/video_player.dart 392:26 initialize
http://localhost:51150/packages/video_viewer/domain/bloc/controller.dart 788:32 changeSource
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5 _async
http://localhost:51150/packages/video_viewer/domain/bloc/controller.dart 742:28 changeSource
http://localhost:51150/packages/video_viewer/domain/bloc/controller.dart 822:17 <fn>
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
http://localhost:51150/dart-sdk/lib/async/zone.dart 1407:47 _rootRunUnary
http://localhost:51150/dart-sdk/lib/async/zone.dart 1308:19 runUnary
http://localhost:51150/dart-sdk/lib/async/future_impl.dart 162:18 handleValue
http://localhost:51150/dart-sdk/lib/async/future_impl.dart 838:44 handleValueCallback
http://localhost:51150/dart-sdk/lib/async/future_impl.dart 867:13 _propagateToListeners
http://localhost:51150/dart-sdk/lib/async/future_impl.dart 634:7 [_complete]
http://localhost:51150/dart-sdk/lib/async/future.dart 419:15 <fn>
http://localhost:51150/dart-sdk/lib/async/zone.dart 1391:47 _rootRun
http://localhost:51150/dart-sdk/lib/async/zone.dart 1301:19 run
http://localhost:51150/dart-sdk/lib/async/zone.dart 1209:7 runGuarded
http://localhost:51150/dart-sdk/lib/async/zone.dart 1249:23 <fn>
http://localhost:51150/dart-sdk/lib/async/zone.dart 1399:13 _rootRun
http://localhost:51150/dart-sdk/lib/async/zone.dart 1301:19 run
http://localhost:51150/dart-sdk/lib/async/zone.dart 1233:23 <fn>
http://localhost:51150/dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:11 internalCallback
The platformViewRegistry getter is deprecated and will be removed in a future release. Please import it from dart:ui_web instead.
this is not a problem for now, it shouldnt cause a problem , the logs you shared is missing the error thrown, its only the stack trace
if thats the error onInitError other 2.718281828459045
then i dont know sadly
you can try https://pub.dev/packages/video_player_web_hls if your use case for web requires hls since they support it too
if thats the error
onInitError other 2.718281828459045
then i dont know sadly
currently i am using web hls package
this is redundant error with diffrent number
2538
The platformViewRegistry getter is deprecated and will be removed in a future release. Please import it from `dart:ui_web` instead. onInitError other 2.718281828459045 http://localhost:53823/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3 throw_
as i mentinoed The platformViewRegistry getter is deprecated and will be removed in a future release. Please import it from dart:ui_web
instead. this is a warning which shouldnt cause a problem
note that in media_kit we are using import 'dart:ui_web';
so its not from our side
i found a better error text Unsupported operation: HTTP headers are not supported on web and i fixed the deprecated issue for you in this #782
i found a better error text Unsupported operation: HTTP headers are not supported on web and i fixed the deprecated issue for you in this #782
I still can't find the fix, since you didn't change the import itself, so I don't see the need for the pr. I am ignoring the other changes which are unrelated
i found a better error text Unsupported operation: HTTP headers are not supported on web and i fixed the deprecated issue for you in this #782
I still can't find the fix, since you didn't change the import itself, so I don't see the need for the pr. I am ignoring the other changes which are unrelated
because you imported html and ui_web it uses html methods that marked as deprecated and if you want to fix. you should using direct import using as
keyword.
about the error
Unsupported operation: HTTP headers are not supported on web
I noticed that you throw it your self in media_kit\lib\src\models\media\media_web.dart
line 93
. can't we avoid exception and handle it in another way? i swapped exception with print and return but after priniting media_kit: WebVideoController: 1920, 1080
nothing happened.
what should I do?
I think instead of changing the logic inside the package, you could send null http headers for web from your side, the exception is an exception since if this warning was not seen it will cause alot of harm to people who believe it's set
Btw the pr has alot of changes unrelated to web warning, so please a open a pr only for web warning alone, no need for dependency updates nor logic edits
I think instead of changing the logic inside the package, you could send null http headers for web from your side, the exception is an exception since if this warning was not seen it will cause alot of harm to people who believe it's set
Btw the pr has alot of changes unrelated to web warning, so please a open a pr only for web warning alone, no need for dependency updates nor logic edits
but i didn't add any headers. can you check your package for any bad assign or anything else?
I think instead of changing the logic inside the package, you could send null http headers for web from your side, the exception is an exception since if this warning was not seen it will cause alot of harm to people who believe it's set Btw the pr has alot of changes unrelated to web warning, so please a open a pr only for web warning alone, no need for dependency updates nor logic edits
but i didn't add any headers. can you check your package for any bad assign or anything else?
check this change https://github.com/media-kit/media-kit/pull/783
I want to use your package only on ios web and safari browser and for other platforms use video_player. what files should i use and how can i add them step by step?