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

[BUG] MediaElement on iOS cant load or play media from an indirect url (Windows and Android works) #1898

Open
2 tasks done
kablammyman opened this issue May 24, 2024 · 0 comments
Labels
bug Something isn't working 📽️ MediaElement Issue/PR that has to do with MediaElement unverified

Comments

@kablammyman
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

MediaElement on iOS cant load or play media from an indirect url

When I say "indirect" url, I mean something like:
https://example.com/audioplayer.php?path=/hiddenpath/cool.mp3
an easily accessible url looks like:
https://example.com/cool.mp3

Android and windows have no problem playing the media from either type of url, but iOS cant load the media from the "indirect" url. This is true with any type of media. Ive tested this with mp3,mp4 and wav files.

Expected Behavior

any type of url can be a media source for Media Element

Steps To Reproduce

run the example object, notice the indirect url source on iOS does not load, however, it will load with windows or Android

Link to public reproduction project repository

https://github.com/kablammyman/mediaelementbug.git

Environment

- .NET MAUI CommunityToolkit,MediaElement:  3.1.1
- OS: iOS
- .NET MAUI: 8.0.40

Anything else?

So, I made a sample test. I placed an 2 copies of audio file on my webserver. One copy of the file is in an easily accessible location, while the other copy can only be accessed via a php script. The php "redirection" is how i add a lil bit of obscurity to my media so anyone cant just steal my content (easily).

Heres the issue, Android and Windows have no issues accessing the media using the indirect url but iOS cant. However, when the media is in an easily accessible location, the iOS version of mediaElement works just fine.

When I say "indirect" url, I mean something like:
https://example.com/audioplayer.php?path=/hiddenpath/cool.mp3
an easily accessible url looks like:
https://example.com/cool.mp3

I think this also applies to IAudioPlayer since I'm getting the same behavior.

Im not sure if what Im trying is "allowed" on iOS or if I need to change my approach or change the settings to make this work like on the other platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📽️ MediaElement Issue/PR that has to do with MediaElement unverified
Projects
None yet
Development

No branches or pull requests

2 participants