mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-03 10:06:30 +08:00
fix time error
This commit is contained in:
@@ -32,7 +32,6 @@ class PlayerFragment : Fragment() {
|
||||
): View {
|
||||
_binding = PlayerBinding.inflate(inflater, container, false)
|
||||
playerView = _binding!!.playerView
|
||||
(activity as MainActivity).playerFragment = this
|
||||
playerView?.viewTreeObserver?.addOnGlobalLayoutListener(object :
|
||||
ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
@@ -86,6 +85,7 @@ class PlayerFragment : Fragment() {
|
||||
if (playerView != null && playerView!!.player?.isPlaying == false) {
|
||||
Log.i(TAG, "replay")
|
||||
playerView!!.player?.prepare()
|
||||
playerView!!.player?.play()
|
||||
} else {
|
||||
Log.i(TAG, "playing")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user