12-02-2008 06:11 PM - edited 12-02-2008 06:14 PM
I trying to get the "END_OF_MEDIA" event on a Storm. In the simulator (4.7.0) the event is delivered, but on the device the event never shows up.
I am creating the player like this:
InputStream in = getClass().getResourceAsStream("/movie.mp4");
player = javax.microedition.media.Manager.createPlayer(in,"
videoControl = (VideoControl)player.getControl("VideoControl");
I then have a simple "playerUpdate" method to implement the PlayerListener interface, which dumps the events as strings. On the storm I get:
And that is all. Nothing after started! On the simulator I get the above plus:
What could I be doing wrong?
If I am not doing anything wrong, what are the possible work-arounds for this?
Any help much appreciated, as the project deadline is approaching and I have not yet found a solution to this issue.
02-23-2009 09:43 AM
I have a problem verry much related to yours.
i try to play a stream (or file) through javax.microedition.media.Manager.createPlayer, but it doesn't play properly.
the playback stops about 10 sec. before the actual end of the stream(file)
if the stream is shorter than that it doesn't start at all(actually it starts, but stops immediately)
on the simulator ecerything is Ok, but on the real device it acts in that weird way.
since the same files play normaly on the media player of the device i guess that i do something wrong, on the other hand what could be wrong with these simple rows:
FileConnection file = (FileConnection)Connector.open(FILE_CONN_PREFIX + CURR_DIR + "test.mp3", Connector.READ); player = Manager.createPlayer(file.openInputStream(), "audio/mpeg"); player.start();
(some of the code is removed for clarity)
during debug i found the same Keean says - there's a difference between the simulator and the real device. on the device some of the events are never sent and int doesn't play properly
my main concern is that it doesn' play, byt i guess that these are different sides of one problem, so any information will be of a help.
Keean, did you find "the magic word" for solving this?
or a workarownd?
02-23-2009 10:18 AM
02-23-2009 01:07 PM