Live Stream not working for me - even after "Live Stream started successfully"
已完成public void startVideoStream() {
ILiveStreamManager liveStreamManager = LiveStreamManager.getInstance();
RtmpSettings rtmpSettings = new RtmpSettings.Builder()
.setUrl("rtmp://My-IP-Adress")
.build();
LiveStreamSettings liveStreamSettings = new LiveStreamSettings.Builder()
.setLiveStreamType(LiveStreamType.RTMP)
.setRtmpSettings(rtmpSettings)
.build();
LiveStreamType retrievedRtmpSettings = liveStreamSettings.getLiveStreamType();
liveStreamManager.setLiveStreamSettings(liveStreamSettings);
liveStreamManager.setVideoChannelType(VideoChannelType.PRIMARY_STREAM_CHANNEL);
CommonCallbacks.CompletionCallback callback = new CommonCallbacks.CompletionCallback() {
@Override
public void onSuccess() {
runOnUiThread(new Runnable() {
public void run() {
Log.d("LiveStream", "Live stream started successfully. Stream Settings: " + retrievedRtmpSettings);
}
});
}
@Override
public void onFailure(IDJIError error) {
runOnUiThread(new Runnable() {
public void run() {
Log.d("LiveStream", "Failed to start live stream: " + error.description());
}
});
}
};
// Start the stream
liveStreamManager.startStream(callback);
Log.d("LiveStream", String.valueOf(liveStreamManager.isStreaming()));
}
Hello
I have this function that I run in my onCreate of the ux sample DefaultLayoutActivity
Everything seems to work and it says "Live Stream started successfully".
The problem is that I can't view the stream on my computer
I tried live streaming from the SDKv5 sample app and it works there.
any idea what is happening?
-
Have you tried using other streaming addresses? For example: http://114.55.103.238:8080/players/rtc_player.html
请先登录再写评论。
评论
3 条评论