Skip to content

Commit

Permalink
Merge pull request #27 from AAkira/dev/0.13.0
Browse files Browse the repository at this point in the history
Release 0.13.0
  • Loading branch information
AAkira authored Jun 12, 2018
2 parents 034aae0 + 2423064 commit 3b782c6
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 245 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,18 @@ This is written in Kotlin.
// inject from xml
val playerView: PlayerView by bindView(R.id.playerView)

val playerManager: ExoPlayerManager = ExoPlayerManager(context)
val playerManager: ExoPlayerManager = ExoPlayerManager.Builder(context).run {
build(
renderersFactory = createRenderersFactory(), // You can set your RenderersFactory
loadControl = createDefaultLoadControl( // You can set your LoadControl
minBufferMs = 15000,
maxBufferMs = 50000,
bufferForPlaybackMs = 2500,
bufferForPlaybackAfterRebufferMs = 5000
),
drmSessionManager = null // You can set your drmSessionManager
)
}

// inject PlayerView
playerManager.injectView(playerView)
Expand Down Expand Up @@ -145,8 +156,8 @@ buildscript {
}
dependencies {
implementation 'com.github.aakira:exoplayer-manager:0.12.0@aar'
implementation 'com.github.aakira:exoplayer-manager-ima:0.12.0@aar' // if you use an IMA SDK
implementation 'com.github.aakira:exoplayer-manager:0.13.0@aar'
implementation 'com.github.aakira:exoplayer-manager-ima:0.13.0@aar' // if you use an IMA SDK
}
```
## Using libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class AdActivity : Activity() {

private val adUiContainer: FrameLayout by bindView(R.id.adUiContainer)
private val playerView: PlayerView by bindView(R.id.player_view)
private val playerManager: ExoPlayerManager by lazy(LazyThreadSafetyMode.NONE) { ExoPlayerManager(this) }
private val playerManager: ExoPlayerManager by lazy(LazyThreadSafetyMode.NONE) {
ExoPlayerManager.Builder(this).build()
}
private val adPlayerController: AdPlayerController by lazy(LazyThreadSafetyMode.NONE) {
AdPlayerController.Builder(
context = this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ class PlayerActivity : Activity() {
private val reconnectButton: Button by bindView(R.id.reconnectButton)
private val stopButton: Button by bindView(R.id.stopButton)

private val playerManager: ExoPlayerManager by lazy(LazyThreadSafetyMode.NONE) { ExoPlayerManager(this) }
private val playerManager: ExoPlayerManager by lazy(LazyThreadSafetyMode.NONE) {
ExoPlayerManager.Builder(this).run {
build(
renderersFactory = createRenderersFactory(),
loadControl = createDefaultLoadControl(
minBufferMs = 15000,
maxBufferMs = 50000
)
)
}
}

public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
buildscript {

// This library version
ext.LIBRARY_VERSION_CODE = 12
ext.LIBRARY_VERSION_NAME = "0.12.0"
ext.LIBRARY_VERSION_CODE = 13
ext.LIBRARY_VERSION_NAME = "0.13.0"

// App information
ext.COMPILE_SDK_VERSION = 27
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AdPlayerController private constructor(
val companionHeight: Int = 0
) {
fun create(): AdPlayerController {
val playerManager = playerManager ?: ExoPlayerManager(context)
val playerManager = playerManager ?: ExoPlayerManager.Builder(context).build()
playerManager.injectView(playerView)
val sdkFactory: ImaSdkFactory = ImaSdkFactory.getInstance()
return AdPlayerController(context, language, userAgent,
Expand Down

This file was deleted.

Loading

0 comments on commit 3b782c6

Please sign in to comment.