-
Notifications
You must be signed in to change notification settings - Fork 26
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
Can't work on web platform. #13
Comments
It seems that it can't get the data until the request is finished, but MJPEG can't be finished. This may be related to JavaScript's inability to handle keep-alive connections. |
I'm using this package in flutter web without issue... I'll double check your example when I can! |
Hi @jaumard, Have you updated to Flutter 2.x? |
I've updated to flutter 2.0 but I don't think I have tested it on web. I'll try to do that this weekend but not sure I'll have time. |
If I tried your URL in a browser https://mjpeg-server.herokuapp.com/ I still have timeout, something is wrong with the server, so problem is coming from that, not the package I think. (I will still test when I have time) but look like you might want to check your URL on plain HTML page as it should work there first. |
Or you can set the timeout longer. Mjpeg(
stream: "https://mjpeg-server.herokuapp.com/",
isLive: true,
fit: BoxFit.fill,
timeout: const Duration(seconds: 60),
) |
I was able to test on web and you're right, stream is not loading and get a timeout... Didn't dig that much but I'll ! Thanks for the report! |
I've searched a bit but so far no idea what really append on web... just getting timeout |
Getting same error on Flutter web.
Tried to increase the timeout as well didn't work. Any update on what's causing this? |
Maybe related to flutter/flutter#84252. |
Yup.. found that just two minutes ago. It might just work if I downgrade flutter. Let me try and revert. |
@YowFung where did you see that JS can't handle keep-alive request ? I this it does, look like a Dart issue to me, once compiled into JS they have a bug I will say |
From some discussions in other community website. You can write an Ajax demo through javascript to request your mjpeg stream to verify that. |
I am not sure whether it's related for this issue. But I have found import 'dart:io' in mjpeg.dart , which is not supported for flutter web. Do the change will remove dart:io I have no time to test it but just a guess. |
Limitation is due to dart not supporting @delphi007 sure |
Any update ? I got this error on flutter web too ..
|
mark |
Hi @jaumard, It seems can't work on the web platform.
Simple code:
These screenshots may help you:
flutter doctor -v
The text was updated successfully, but these errors were encountered: