wildside96 / bst-player

Automatically exported from code.google.com/p/bst-player
0 stars 0 forks source link

Error getting plugin if URL contains parameter / sessionid etc #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I stumbled upon a problem retrieving a suitable plugin when the 
provided media url contains request parameter, an internal link, a sessionid 
etc.

I peeked into the source a found the cause:

com.bramosystems.oss.player.core.client.PlayerUtil

protected static String extractExt(String mediaURL) {
   return mediaURL.substring(mediaURL.lastIndexOf(".") + 1);
}

Replacing the method above with

protected static String extractExt(String mediaURL) {
   mediaURL = mediaURL.replaceAll("[\\?;#].*$", "");
   return mediaURL.substring(mediaURL.lastIndexOf(".") + 1);
}

fixed the problem.

It would be great if you will integrate the fix in feature releases.

Thanks for a great peace of software

Greetings Janne

Original issue reported on code.google.com by *...@obecon.net on 16 Aug 2011 at 10:16

GoogleCodeExporter commented 9 years ago
Fix applied.
Rgds.

Original comment by sbrah...@gmail.com on 16 Aug 2011 at 3:25