package com.mayi.demo;

import android.content.pm.ActivityInfo;
import android.os.Bundle;

import com.mayi.fastdevelop.base.BaseActivity;
import com.mayi.fastdevelop.view.AppPlayerView;

public class PlayerActivtiy2 extends BaseActivity {

    private AppPlayerView appPlayerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);//强制竖屏
        setContentView(R.layout.activity_player2);
        appPlayerView=findViewById(R.id.player);
    }

    @Override
    protected void onResume() {
        super.onResume();
        appPlayerView.setUrl("http://player.youku.com/embed/XMzU3MDIzMjkyMA==?_time=6.001",true);

    }

    @Override
    protected void onPause() {
        super.onPause();
        appPlayerView.releasePlayer();
    }
}
