Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
AAkira committed Mar 7, 2018
1 parent 7c67ae8 commit 034f7e4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ This is written in Kotlin.
```Kotlin

// inject from xml
val simpleExoPlayerView: SimpleExoPlayerView by bindView(R.id.playerView)
val playerView: PlayerView by bindView(R.id.playerView)

val playerManager: ExoPlayerManager = ExoPlayerManager(context)

// inject SimpleExoPlayerView
// https://github.com/google/ExoPlayer/blob/release-v2/library/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
playerManager.injectView(simpleExoPlayerView)
// inject PlayerView
playerManager.injectView(playerView)

val dataSource = DataSourceCreator.UrlBuilder(
url = HLS_SAMPLE_URL,
Expand Down Expand Up @@ -95,7 +94,7 @@ playerManager.addOnPlayerErrorListener {
android:layout_height="match_parent"
android:keepScreenOn="true">

<com.google.android.exoplayer2.ui.SimpleExoPlayerView
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/playerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -111,7 +110,7 @@ playerManager.addOnPlayerErrorListener {

val adPlayerController: AdPlayerController = AdPlayerController.Builder(
context = this,
simpleExoPlayerView = simpleExoPlayerView,
playerView = playerView,
adUiContainer = adUiContainer,
language = "us",
userAgent = Util.getUserAgent(this, "UserAgent"),
Expand Down

0 comments on commit 034f7e4

Please sign in to comment.