WowzaMediaSystems / gocoder-sdk-samples-android

A sample app for Android that demonstrates the capabilities of the Wowza GoCoder™ SDK.
https://www.wowza.com/products/gocoder/sdk
Other
53 stars 51 forks source link

How to play RTSP stream? #12

Closed iceteahh closed 4 years ago

iceteahh commented 6 years ago

I tried to build an live video chat Android application using Wowza Streaming Engine and Gocoder sdk. I have successfully published myStream to the Wowza server. Now I want to receive it and play it on my Android device.

I found class WZPlayerView in you sdk bundle. But i'm not sure how to use it. Below is what I have tried.

private void playStream() {
        WZPlayerConfig playerConfig = new WZPlayerConfig();
        playerConfig.setHostAddress("192.168.1.163");
        playerConfig.setPortNumber(1935);
        playerConfig.setApplicationName("videochat");
        playerConfig.setStreamName("myStream");

        playerView.play(playerConfig, new WZStatusCallback() {
            @Override
            public void onWZStatus(WZStatus wzStatus) {
                Log.e("player", wzStatus.getState() + "");
            }

            @Override
            public void onWZError(WZStatus wzStatus) {
                Log.e("player error", wzStatus.getLastError().getErrorDescription());
            }
        });
    }

It seems to be not working. Please help.

wowza-mbrinker commented 6 years ago

The WZPlayer requires a different license, and is currently under beta. The beta also only supports wowz protocol playback only. Pulling RTSP playback into a request for enhancement (284273).