wildside96 / bst-player

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

java.lang.IllegalStateException: Player not available, create an instance #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I've used this to instantiate player = new WinMediaPlayer("Movie.AVI", 
false, "150px", "150px");
2. Even though I've mentioned false to auto play but still movie plays when 
page shows up.
3. But when I write following statements player.pauseMedia() or 
player.stopMedia(); it gives me this error message 
(java.lang.IllegalStateException: Player not available, create an instance). 
Even though player variable is not null in this case.

What is the expected output? What do you see instead?
I would like to see movie not autoplay as I've mentioned autoplay as false. 
Then I also want to programatically stop, pause or play video but in this case 
I am not able to do anything as I get IllegalStateException.

What version of the product are you using? On what operating system?
I am using bst-player-api-1.2.jar on Windows 7.

Please provide any additional information below.

Original issue reported on code.google.com by rajarizk...@gmail.com on 10 Jan 2011 at 6:37

GoogleCodeExporter commented 9 years ago
You can programmatically control the player only after a 
PlayerStateEvent.State.READY event is fired.  So register a handler for that 
event and then you can control the player.

As for the autoplay, i will take another look at it.

Original comment by sbrah...@gmail.com on 10 Jan 2011 at 7:40

GoogleCodeExporter commented 9 years ago
Thanks I'll register for PlayerStateEven.State.READY handler.

Original comment by rajarizk...@gmail.com on 11 Jan 2011 at 5:35

GoogleCodeExporter commented 9 years ago
I did register for the PlayerStateEvent but even there when I do 
player.stopMedia() or player.pauseMedia(), I dont't get the desired result. 
This time I don't get exception because I do it after the state is Ready, but 
the video doesn't stop or Pause. I don't know why video still plays even I've 
mentioned false to auto play and when I use player.stopMedia or 
player.pauseMedia.

Original comment by rajarizk...@gmail.com on 14 Jan 2011 at 6:11

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 19 Jan 2011 at 10:50

GoogleCodeExporter commented 9 years ago
Check with the latest 1.2.1-snapshot.

Original comment by sbrah...@gmail.com on 26 Jan 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Issue 41 has been merged into this issue.

Original comment by sbrah...@gmail.com on 3 Feb 2011 at 10:50

GoogleCodeExporter commented 9 years ago
can somebody provide me some sample code about PlayerStateEvent.State.READY, 
please

Original comment by jamesjara on 3 Feb 2011 at 3:02

GoogleCodeExporter commented 9 years ago
http://oss.bramosystems.com/bst-player/events.html

Original comment by sbrah...@gmail.com on 4 Feb 2011 at 4:10