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

iOS error handling seems inconsistant #35

Open
eacarter opened this issue Oct 6, 2023 · 2 comments
Open

iOS error handling seems inconsistant #35

eacarter opened this issue Oct 6, 2023 · 2 comments

Comments

@eacarter
Copy link

eacarter commented Oct 6, 2023

First off, thank you to your team for developing this library, it's been a lot of help. I do notice some inconsistencies with the error handling for iOS compared to Android. In my application, I use the error attribute to display text when the connection/ video is interrupted and I've been having a hard time getting the same text to show up on iOS in a more consistent manner. At the moment, if my video is interrupted on iOS the video will freeze and stay frozen without an error response, using "print(error)" from the provided example for troubleshooting, and not displaying my error message 90% of the time this issue occurs. Is there maybe a workaround or possibly a fix that you all are working on that would help me out?

if it helps, I'm running Flutter 3.10.5

@jaumard
Copy link
Member

jaumard commented Oct 6, 2023

Hello,

Thanks for the feedback, this is strange as there is no native code on this package, it's 100% Dart.
Can you provide some way to reproduce this on my side so I can dig into that please?

@eacarter
Copy link
Author

eacarter commented Oct 6, 2023

I can't provide the actual stream URL as it is coming from an ESP-32 camera that I have but below is the code that I'm using. inside the error block, I print the error, then try to return text centered in the view that states "no camera available". on Android, this works perfectly but on iOS I get it 10% of the time if the feed throws an exception. I don't know, it could very much be an issue with Flutter and iOS, I've been having a lot of those issues lately. Also, I'm using a physical iPhone 12 for testing.

EDIT: I apologize but I forgot to mention that in this particular view, I have an OrientationBuilder in my view that allows me to change aspects of the view based on whether the user is in portrait or landscape mode (just going from a stream view with a home button to a fullscreen view.) if I have issues with my stream then go from portrait to landscape of vice versa I assume the view is being rebuilt and the error that I'm looking for then registers with my iOS app.

Mjpeg(
isLive: true,
error: (context, error, stack) {
print("error: $error");
return const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("No Camera Available",
style: TextStyle(color: Colors.white))
]
);
},
stream: url,
fit: BoxFit.contain
);

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

No branches or pull requests

2 participants