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

Uploading from mobile device browser in background #68

Open
adrienfloor opened this issue Nov 8, 2021 · 4 comments
Open

Uploading from mobile device browser in background #68

adrienfloor opened this issue Nov 8, 2021 · 4 comments

Comments

@adrienfloor
Copy link

Hey Guys

Thank you very much for the great work. I'm using Mux with upchunk to direct upload videos from my React web app.
So far it's been very positive, and I didn't have any problem to implement it for desktop web. That being said, I have a big problem using the web app on mobile devices :

as soon I switch from my browser application to another application and therefore put the browser app in "background-mode", the upload stops. It resumes when I make the browser come back to foreground. I've tried this on Chrome && Safari.

This is very annoying for large video files because it means that when a user uploads a video, he has to wait for the upload to be complete before doing anything else with his phone ... which is very bad ! 😢

Can anyone give me a hand here ? Or some tips on what to do ? I implemented the whole thing on a web client because I had the exact same problem with my react-native app... so it's quite a bummer.

I'm willing to submit a PR if someone can guide me on what do, and I can review anything 😊

Thanks a lot !

@adrienfloor
Copy link
Author

So I figured out that you can't really process requests from a mobile browser while it is in background.
My apologies for not knowing that before posting this issue.

It is ok for the upload to pause when the user puts the browser in background, but the progress event jumps backwards every time I do this. I found that to be an issue happening in the past (and being resolved here : #43 ) . Though, it looks like it is happening under the circumstances I describe. The correct behaviour would be for the upload and progress event to pause when browser app goes in background mode, and resume from where it stopped when browser app goes back to foreground mode.

Does anyone know what I could do ? Or where does this problem comes from ? Thank you all very much.

@davekiss
Copy link
Contributor

Hey @adrienfloor thanks for your note. Can you confirm which mobile browsers and operating system this progress reversal is happening on? I will try to reproduce and debug on our end, but I'm wondering if this could be a low-level browser implementation caveat.

@adrienfloor
Copy link
Author

Hey @davekiss
I'm using an iphone 12pro with iOS 15.1.
This is happening on both the last versions of Safari and Chrome mobile browsers.
Thank you so much for your help here ! 🙌🏼

@h-mergel
Copy link

Are there any news to this? We are also wondering, if it is possible to resume the upload after the browser was in background.

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

3 participants