wildside96 / bst-player

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

PlayerUtil.getPlayer() problem with www url's (NPE) #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When instanciating a specific player, there's no problem, but when using 
PlayerUtil.getPlayer(), the url cannot be parsed correctly.

What steps will reproduce the problem?
-----------------------------------------------------------------------------
1. AbstractMediaPlayer player = 
PlayerUtil.getPlayer("http://mysite.com/app/servlet?param1=x&param2=y&ext=.mp3",
 true, "60px", "100%");

What is the expected output? What do you see instead?
-----------------------------------------------------------------------------
Expected: a player instance, if possible.
Instead:
java.lang.NullPointerException
    at com.bramosystems.oss.player.core.client.impl.plugin.PlayerManager.getPlayer(PlayerManager.java:158)
    at com.bramosystems.oss.player.core.client.PlayerUtil.getPlayer(PlayerUtil.java:115)
    at com.bramosystems.oss.player.core.client.PlayerUtil.getPlayer(PlayerUtil.java:72)

What version of the product are you using? On what operating system? On
what browser/version?
-----------------------------------------------------------------------------
version 1.3, win7, Chrome 16.0 / IE8 / FF9

Please provide any additional information below.
-----------------------------------------------------------------------------
This line of code in PlayerManager.extractExt(String) seems to have problems 
with this url.
-> String _mediaURL = mediaURL.replaceAll("[\\?;#].*$", "");
-> this line removes all the chars from the ?, so the extension disappears... 

Original issue reported on code.google.com by public.t...@gmail.com on 25 Jan 2012 at 4:42

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 26 Jan 2012 at 12:52

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 24 Mar 2012 at 2:48

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 24 Feb 2013 at 2:08