package com.cheng.blzb.ui.activity

import android.annotation.SuppressLint
import android.os.Bundle
import com.cheng.blzb.ui.fragment.video.VideoPlayerFragment
import com.example.base.ui.BaseActivity

class VideoPlayerActivity : BaseActivity() {
    private var fragment: VideoPlayerFragment? = null

    override fun getFragment() = fragment!!

    @SuppressLint("SourceLockedOrientationActivity")
    override fun onCreate(savedInstanceState: Bundle?) {
        val title = intent.getStringExtra("title") ?: ""
        val url = intent.getStringExtra("url") ?: ""
        fragment = VideoPlayerFragment.newInstance(url, title)
        fragment!!.setFullScreenChangedListener {
//            requestedOrientation = it
        }
        super.onCreate(savedInstanceState)
    }
}