| Reply | « Previous Thread | Next Thread » |
|
Hello. I am a new guy in J2ME.
I want to do a sample about reading video files, and I always get a null pointer error. The following code is to download a video from URL and play it. InputStream is = HttpConn.urlToStream("http://myserver/video.mpg"); String contentType = "video/mpeg"; if (is == null) { //error return; } Player player = Manager.createPlayer(is, contentType); if (player == null) { //error return; } //This class extends Canvas implements CommandListener&PlayerListener player.addPlayerListener(this); player.prefetch(); player.realize(); VideoControl videoControl = (VideoControl)(player.getControl("VideoControl")); Then I get a null videoControl.Why? I am sure is and player are not null, and I can play the video if I open it in website. Thanks in advance. ![]()
Last edited by souhomura : 2009-07-28 at 16:00.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Please its veru urgent on nokia 3250 | siva_guduru | Mobile Java General | 8 | 2008-05-01 11:24 |
| Video playback with sound but nothing on Screen | abdullah829 | Mobile Java Media (Graphics & Sounds) | 5 | 2007-11-30 15:04 |
| InConsistency in Uploading video files | kumar_sai123 | Symbian Networking & Messaging | 0 | 2007-11-08 11:14 |
| RecordEnumeration throwing null pointer exception | kralvarado | Mobile Java General | 2 | 2006-04-13 05:07 |