Skip to content

Commit

Permalink
Merge pull request #26 from AAkira/dev/0.12.0
Browse files Browse the repository at this point in the history
Release 0.12.0
  • Loading branch information
AAkira authored May 31, 2018
2 parents 27de379 + 480f444 commit 034aae0
Show file tree
Hide file tree
Showing 9 changed files with 701 additions and 406 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This is written in Kotlin.
## Requirements

* Kotlin 1.1.0 or above
* ExoPlayer 2.6 or above
* ExoPlayer 2.8 or above
* Android SDK version 4.1 or above (ExoPlayer requirements)

## Usage
Expand Down Expand Up @@ -145,8 +145,8 @@ buildscript {
}
dependencies {
implementation 'com.github.aakira:exoplayer-manager:0.11.0@aar'
implementation 'com.github.aakira:exoplayer-manager-ima:0.11.0@aar' // if you use an IMA SDK
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
}
```
## Using libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import android.os.Bundle
import android.widget.Button
import com.github.aakira.playermanager.DataSourceCreator
import com.github.aakira.playermanager.ExoPlayerManager
import com.google.android.exoplayer2.Format
import com.google.android.exoplayer2.SimpleExoPlayer
import com.google.android.exoplayer2.ui.PlayerView
import com.google.android.exoplayer2.upstream.DataSpec
import com.google.android.exoplayer2.util.Util
import kotterknife.bindView
import timber.log.Timber
import java.io.IOException

/**
* An activity that plays media using [SimpleExoPlayer].
Expand Down Expand Up @@ -64,16 +61,12 @@ class PlayerActivity : Activity() {
playerManager.setPlaybackParameters(it, 1f)
}
}
playerManager.addOnAudioCapabilitiesChangedListener {
playerManager.addOnVideoSizeChangedListener { eventTime, width, height, unappliedRotationDegrees,
pixelWidthHeightRatio ->

}
playerManager.addOnVideoSizeChangedListener { width, height, unappliedRotationDegrees, pixelWidthHeightRatio ->

}
playerManager.addOnMediaSourceLoadErrorListener { dataSpec: DataSpec?, dataType: Int, trackType: Int,
trackFormat: Format?, trackSelectionReason: Int, trackSelectionData: Any?,
mediaStartTimeMs: Long, mediaEndTimeMs: Long, elapsedRealtimeMs: Long,
loadDurationMs: Long, bytesLoaded: Long, error: IOException?, wasCanceled: Boolean ->
playerManager.addOnMediaSourceLoadErrorListener { eventTime, loadEventInfo, mediaLoadData,
error, wasCanceled ->

}
playerManager.addOnStateChangedListener { playWhenReady: Boolean, playbackState: Int ->
Expand Down Expand Up @@ -124,4 +117,4 @@ class PlayerActivity : Activity() {
private fun updatePlayBackSpeedString(speed: Float) {
playBackSpeedButton.text = String.format("x %.1f", speed)
}
}
}
8 changes: 4 additions & 4 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 = 11
ext.LIBRARY_VERSION_NAME = "0.11.0"
ext.LIBRARY_VERSION_CODE = 12
ext.LIBRARY_VERSION_NAME = "0.12.0"

// App information
ext.COMPILE_SDK_VERSION = 27
Expand All @@ -16,7 +16,7 @@ buildscript {

// Base libraries
ext.KOTLIN_VERSION = "1.2.30"
ext.EXO_PLAYER_VERSION = "2.7.3"
ext.EXO_PLAYER_VERSION = "2.8.1"
ext.IMA_VERSION = "3.7.2"

// Others
Expand Down Expand Up @@ -50,4 +50,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class AdPlayerController private constructor(
callback.onError()
}
}
playerManager.addOnMediaSourceLoadErrorListener { _, _, _, _, _, _, _, _, _, _, _, _, _ ->
playerManager.addOnMediaSourceLoadErrorListener { _, _, _, _, _ ->
if (!isAdDisplayed) return@addOnMediaSourceLoadErrorListener

for (callback in adCallbacks) {
Expand Down Expand Up @@ -309,4 +309,4 @@ class AdPlayerController private constructor(
isAdPlaying = true
pauseContentListener?.onPauseContentRequested()
}
}
}
Loading

0 comments on commit 034aae0

Please sign in to comment.