You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android I am unable to stream mp3 files that require authentication header to access.
I've set this as a feature because it looks like it was never intentionally implemented, HOWEVER, it might be a bug if other users are not experiencing this problem.
Note: I am using Capacitor.
Feature Description
The media.create function would include an additional boolean parameter to indicate whether the streaming file should include headers, or an array of headers to include.
AFAICT this is only a problem on Android. I'm surprised that this doesn't work or hasn't been implemented so maybe I'm doing something wrong:
Using the cordova-plugin-filetransfer I am able to download files that require authentication. When I look at the Java code I see there is a function that pulls the cookie's from webview and includes them in the header with the file request.
When I look at the Java code for cordova-plugin-media I see this, which does not include any headers if (this.isStreaming(file)) { this.player.setDataSource(file);
Feature Request
Motivation Behind Feature
On Android I am unable to stream mp3 files that require authentication header to access.
I've set this as a feature because it looks like it was never intentionally implemented, HOWEVER, it might be a bug if other users are not experiencing this problem.
Note: I am using Capacitor.
Feature Description
The media.create function would include an additional boolean parameter to indicate whether the streaming file should include headers, or an array of headers to include.
AFAICT this is only a problem on Android. I'm surprised that this doesn't work or hasn't been implemented so maybe I'm doing something wrong:
Using the cordova-plugin-filetransfer I am able to download files that require authentication. When I look at the Java code I see there is a function that pulls the cookie's from webview and includes them in the header with the file request.
When I look at the Java code for cordova-plugin-media I see this, which does not include any headers
if (this.isStreaming(file)) { this.player.setDataSource(file);
And looking at the API for setDataSource, it looks like I can include the headers. But it also says that they might already be managed by the apps own CookieManager.
https://developer.android.com/reference/android/media/MediaPlayer#setDataSource(android.content.Context,%20android.net.Uri,%20java.util.Map%3Cjava.lang.String,%20java.lang.String%3E,%20java.util.List%3Cjava.net.HttpCookie%3E)
Alternatives or Workarounds
The text was updated successfully, but these errors were encountered: