KhubaibKhan4 / MediaPlayer-KMP

MediaPlayer-KMP is a Kotlin Multiplatform (KMP) library that allows you to display and play YouTube videos across Android, iOS, Web, and Desktop platforms using JetBrains Compose Multiplatform. It provides a unified API for video playback that seamlessly integrates into Kotlin's multiplatform ecosystem.
GNU General Public License v2.0
116 stars 8 forks source link

MediaPlayer only works if URL ends with ".mp3" #27

Closed slickorange closed 2 months ago

slickorange commented 2 months ago

My server returns media files with a url which looks something like this: http://10.0.0.108:8081/nodes/8d6b8364-cbd2-4a22-bc8b-092ab6732436/media

This is a problem because it seems the MediaPlayer only works if the url ends with ".mp3"

KhubaibKhan4 commented 2 months ago

You must need to provide a valid URL with an extension like .mp3

slickorange commented 2 months ago

My URL is valid and streaming the file works in any browser. My server is designed to hide the file details from the URL (a common requirement) - the client only provides the file uuid and the server responds with the file (which could be video, mp3 etc..) So unfortunately that makes this component unusable in that case

KhubaibKhan4 commented 2 months ago

@slickorange Thank you for creating this issue. I just fixed this issue and updating the latest version on the Maven Central.