package com.maniu.gamelive;

        import android.app.Activity;
        import android.content.Intent;
        import android.os.Bundle;

        import android.view.View;

public class MainActivity extends Activity {
    private ScreenLive mScreenLive;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    @Override
    protected void onActivityResult(int requestCode, int resultCode,  Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        mScreenLive.onActivityResult(requestCode, resultCode, data);
    }

    //开始直播
    public void startLive(View view) {
        mScreenLive = new ScreenLive();
        // mScreenLive.startLive(this,
        // "rtmp://sendtc3a.douyu.com/live/9338883rQNmgLvPt?wsSecret=ca6c5ac18a560e7a2eaf4aac9a9b9a29&wsTime=5faf8714&wsSeek=off&wm=0&tw=0&roirecognition=0&record=flv");
        mScreenLive.startLive(this,
                "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_1824323810_11580412&key=1cfe633df146006a329fa24521bc59b4&schedule=rtmp");
    }
    //结束直播
    public void stopLive(View view) {
        mScreenLive.stoptLive();
    }

}
