harmonwood / capacitor-video-player

Capacitor Video Player Plugin
MIT License
116 stars 46 forks source link

fix(): correctly parse video URLs with queryParams #162

Closed eduardoRoth closed 3 months ago

eduardoRoth commented 3 months ago

When the source element for the video URL had query parameters (a ? in the URL) it incorrectly parsed the extension of the video, leading to the video player not loading anything.

This fix removes the query parameters in the _getVideoType method as, in this point, they don't matter.

harmonwood commented 3 months ago

I will need to do some research on this. It would appear at first glance that a url could have a valid query parameter. EI: https://myurl.ex/fetch-video-by-name?name=myvideoname.mp4

I think the solution needs to be more robust.