Canlı bir akıştan video oynayabilecek bir Android tabanlı uygulama geliştirmeye çalışıyorum. Bu canlı yayın Wowza Media Server kullanılarak üretilmiştir.Bir Android uygulamasında RTSP akışı oynatma
URL:
rtsp://tv.hindiworldtv.com:1935/live/getpun
ben ecliplse kod aşağıdaki denedi: İlk başta
package com.kalloh.wpa;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.net.Uri;
import android.os.Bundle;
import android.view.Window;
import android.widget.MediaController;
import android.widget.VideoView;
public class a extends Activity {
VideoView videoView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
//Create a VideoView widget in the layout file
//use setContentView method to set content of the activity to the layout file which contains videoView
this.setContentView(R.layout.videoplayer);
videoView = (VideoView)this.findViewById(R.id.videoView);
//add controls to a MediaPlayer like play, pause.
MediaController mc = new MediaController(this);
videoView.setMediaController(mc);
//Set the path of Video or URI
videoView.setVideoURI(Uri.parse("rtsp://tv.hindiworldtv.com:1935/live/getpnj"));
//
//Set the focus
videoView.requestFocus();
}
}
, işe yaramıyordu.
Şimdi çalışmaya başladı, ancak 20 ila 30 saniye sonra durur. Bu sorunu nasıl giderebilirim?
Vlc'yi kullanarak aynı sorunu yaşıyorum ve burada bir çözüm buldum (çözüm değil, yardımcı bilgiler): http://code.google.com/p/android/issues/detail?id=15229 – hungson175
Artık Verilen url, Android 4 ve üzeri üzerinde çalışıyor. Ancak sorun şu ki ses sürekli değil. 2 saniye oyundan sonra 1 sn gecikme gibi bir şey .. – SJSSoft
Bu sorunu nasıl çözüyorsunuz? –