Last active
September 27, 2020 21:18
-
-
Save prateek54/f72d7353115a58348a4f47ceb7ecead8 to your computer and use it in GitHub Desktop.
ExoPlayerDemo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onStart() { | |
super.onStart() | |
if (Util.SDK_INT >= 24) { | |
initPlayer() | |
} | |
} | |
override fun onStop() { | |
super.onStop() | |
if (Util.SDK_INT >= 24) { | |
releasePlayer() | |
} | |
} | |
override fun onResume() { | |
super.onResume() | |
if (Util.SDK_INT < 24) { | |
initPlayer() | |
} | |
} | |
override fun onPause() { | |
super.onPause() | |
if (Util.SDK_INT < 24) { | |
releasePlayer() | |
} | |
} | |
override fun onDestroy() { | |
super.onDestroy() | |
releasePlayer() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment