0
我跟着諾基亞的維基關於使用J2Me創建視頻播放器。一般來說,代碼是這樣的J2ME RTSP視頻流,但沒有音頻
player = Manager.createPlayer("rtsp://v1.cache5.c.youtube.com/CjYLENy73wIaLQm8E_KpEOI9cxMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYLm0hv_ig5HRTww=/0/0/0/video.3gp");
//A player listener is needed so that we know, when the video has reached the END_OF_MEDIA position
player.addPlayerListener(this);
player.realize();
player.prefetch();
//The duration of the video
duration = player.getDuration();
//The video control instance is created and attached to this Canvas in Full SCreen mode
vc = (VideoControl)player.getControl("VideoControl");
voc = (VolumeControl)player.getControl("VolumeControl");
voc.setLevel(100);
voc.setMute(false);
vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
vc.setDisplaySize(240, 196);
//vc.setDisplayFullScreen(true);
vc.setVisible(true);
// vc.setDisplayFullScreen(true);
//next time the above operations will be skipped
firstPlay = false;
//A new thread handles the move of the cursor while the video progresses.
//The thread is distroyed when the video is stopped.
thread = new Thread(this);
thread.start();
目前我對諾基亞311阿莎開發如果我剛打開的rtsp地址,瀏覽器通過本地視頻播放器會彈出並流與音頻視頻,以及與此代碼視頻流順暢,但沒有聲音。
我做錯了什麼?感謝您的幫助
問候