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

player not loading videos without extension #77

Open
gbuela opened this issue May 15, 2023 · 3 comments
Open

player not loading videos without extension #77

gbuela opened this issue May 15, 2023 · 3 comments

Comments

@gbuela
Copy link
Contributor

gbuela commented May 15, 2023

Hello,

I need to work with video URLs that have no extension. AVPlayer works with those if I use them directly, but not when used with the resource loader as this library does. To make it work I have to do a trick similar to what you do by adding a prefix to the scheme, ie it needs to be something other than https: it also needs to have an extension like ".mp4". Then it has to be removed when making the actual request.

I could provide a pull request for that. I don't know however if it's OK to add .mp4 to any video or whether it will work depending on the actual type of video downloaded.

@wxxsw
Copy link
Owner

wxxsw commented May 16, 2023

You should not delete the suffix because it will affect other video formats such as m3u8. You can consider adding.mp4 outside of the SDK when passing in urls.

@gbuela
Copy link
Contributor Author

gbuela commented May 16, 2023

It should not affect them because the only suffix that is deleted is the one that is added. If you have a m3u8 file, it will internally become __loader__https://whatever/file.m3u8.mp4 and then only the prefix and the dummy .mp4 suffix is deleted, yielding the real url for the requests.

If I just add the .mp4 extension outside the SDK, then the SDK will not know that the real URL has no extension and will try to hit that. Unless I'm missing something. This is the kind of URL with the issue:
https://media.staticontent.com/media/documents/132420b8-b6b0-4c29-8e81-3cec4522f6f1
Can you see a way to make it work without making a change to the SDK?

@wxxsw
Copy link
Owner

wxxsw commented May 21, 2023

I see. Your pull request can be opened and I will merge it.

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