Skip to content

Instantly share code, notes, and snippets.

@nazmulidris
Created March 8, 2018 22:40
Show Gist options
  • Select an option

  • Save nazmulidris/8e1e8b3cf67ae9b563e4dbe699847d01 to your computer and use it in GitHub Desktop.

Select an option

Save nazmulidris/8e1e8b3cf67ae9b563e4dbe699847d01 to your computer and use it in GitHub Desktop.
class VideoActivity : AppCompatActivity() {
lateinit var playerHolder: PlayerHolder
val state = PlayerState()
override fun onCreate(savedInstanceState: Bundle?) {
...
playerHolder = PlayerHolder(this, exoplayerview_activity_video, state)
}
override fun onStart() {
super.onStart()
playerHolder.start()
}
override fun onStop() {
super.onStop()
playerHolder.stop()
}
override fun onDestroy() {
super.onDestroy()
playerHolder.release()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment