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

Files over HTTP do not support 206 Partial Content #1343

Closed
diachedelic opened this issue Mar 22, 2019 · 4 comments
Closed

Files over HTTP do not support 206 Partial Content #1343

diachedelic opened this issue Mar 22, 2019 · 4 comments

Comments

@diachedelic
Copy link
Contributor

diachedelic commented Mar 22, 2019

HTML5 <audio> and <video> elements make use of Range requests to estimate media duration, and facilitate seeking. It appears that Capacitor's file server, at least on Android, does not support the Range header on requests:

GET http://localhost/_capacitor_file_/storage/emulated/0/Documents/1553226944608.webm
Range: bytes=0-

HTTP/1.1 200 OK
Content-Length: 124870
Content-Type: video/webm
Cache-Control: no-cache
Client-Via: shouldInterceptRequest

Along with serving correct Content-Type headers, I feel this feature is necessary for streaming media from the filesystem.

@diachedelic
Copy link
Contributor Author

I see that there is support for 206 responses in some capacity, am I just doing something wrong?

@jcesarmobile
Copy link
Member

Looking at the code, the Range is only checked for the app assets (public folder), not to downloaded files, will fix it.

@llorenspujol
Copy link

llorenspujol commented Jul 30, 2020

Range request are not working correctly in my case, actually I may do something wrong, but it only fails using the capacitor server... I opened this issue explaining the use case.

Is quite annoying since I can't put sound in my app... well... I can maybe play the first 3 seconds of the audio 🤣 , just kidding, but any help would be really appreciated :) !

@Losses

This comment was marked as abuse.

@ionic-team ionic-team locked and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants