Skip to content

Fix asset:// URL loading for MediaPlayer#10

Merged
marcprux merged 3 commits intoskiptools:mainfrom
0-mykola:mediaplayerfix
Aug 4, 2025
Merged

Fix asset:// URL loading for MediaPlayer#10
marcprux merged 3 commits intoskiptools:mainfrom
0-mykola:mediaplayerfix

Conversation

@0-mykola
Copy link
Contributor

@0-mykola 0-mykola commented Aug 4, 2025

Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Fixes an issue with MediaPlayer in the skip-av package when trying to play files from the source directory. The problem was due to an incorrect URL format, which this fix corrects by using the proper asset:/// scheme or file path expected by MediaPlayer.

Labels:
bug, android

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

@cla-bot cla-bot bot added the cla-signed label Aug 4, 2025
@marcprux marcprux changed the title fixed url for MediaPlayer Fix asset:// URL loading for MediaPlayer Aug 4, 2025
Copy link
Member

@marcprux marcprux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I was under the impression that MediaPlayer/ExoPlayer has automatic support for "asset://" URLs, and there are a number of examples on GitHub that use this scheme, like https://github.com/joelsmith/audiobookshelf-app/blob/master/android/app/src/main/java/com/audiobookshelf/app/LocalMediaManager.kt#L72.

I guess we never tested it out ourselves, though. I assume you tried and it wasn't working? Was there any error logged in adb logcat, or did the video simply not play?

@marcprux marcprux merged commit f3bd7be into skiptools:main Aug 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants