12-21-2009 01:12 AM
I wish to run one video files in my application.I created one SDCard .If i keep the file directly inside video folder i can able to play if i keep the same file inside another folder and keep the folder inside the video means i could not play..can anyone clarify me why i could not play the video .
Solved! Go to Solution.
12-21-2009 03:33 PM
What BlackBerry Smartphone model and BlackBerry device software version are you testing on? You can find this under Options, About on the BlackBerry Smartphone. How are you trying to play the video? Are you invoking the built in media player or using the Player class? What error or exception are you seeing?
12-22-2009 12:44 AM - edited 12-22-2009 12:46 AM
with your permission, am also adding my query to this post. as am alos facing the same issue. i followed the KB article to play video in the app, i just modified it according my path, i included my video file into the project for the sake of testing.
but i failed to run the app. when i debug, i found the error at the videoControl, as it is not intializing and returning null. hence null pointer exception.
sorry to intercept into your post. the following is my code....
// String supportedformats = javax.microedition.media.Manager.getSupportedConte
// for(int i =0;i<supportedformats.length;i++)
// ms.add(new LabelField(supportedformats[i]));
//Create a new Player pointing to the video file.
//This can use any valid URL.
// player = Manager.createPlayer("file:///SDCard/Pearl.avi");
InputStream is = getClass().getResourceAsStream("video/10.mpeg");
// player = Manager.createPlayer("file:///SDCard/videos/TheLas
player = Manager.createPlayer(is, "video/mpeg");
//Create a new VideoControl.
videoControl = (VideoControl)player.getControl("VideoControl");
//Initialize the video mode using a Field.
//Set the video control to be visible.
catch (Exception ex)
12-22-2009 01:34 AM
i didnt tried with 3gp, but when run this piece of code, it gvives mpeg also as teh supported format. so i think it should work.
String supportedformats = javax.microedition.media.Manager.getSupportedConte
ntTypes(null); for(int i =0;i<supportedformats.length;i++) ms.add(new LabelField(supportedformats[i]));
that to i dont have any 3gp format, right now with me. and anyway i need to play the clients video file of type mpeg. so can you suggest me solution.
12-22-2009 01:59 AM
Thanks friends i can able to play the video now i changed the format to .3gp now its working fine.
@BBdeveloper am working on storm 4.7, with eclipse ide.
does blackberry support mpeg???and i found this in teh supported format list. but my mpeg is not playing...
@saravankumaran what make your app working fine, did you add any additional code for that?