Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0.10.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Video Players committed Nov 29, 2018
2 parents 8ddeb42 + 04b7f9e commit 73d8791
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion clappr/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apply plugin: 'org.jetbrains.dokka-android'
apply from: 'versioning.gradle'

group = 'io.clappr.player'
version = '0.10.3'
version = '0.10.4'

def publishAttrs = buildPublishAttrs(version)

Expand Down
14 changes: 8 additions & 6 deletions clappr/src/main/kotlin/io/clappr/player/Player.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ import io.clappr.player.plugin.PluginConfig
*
* Once instantiated it should be [configured][configure] and added to a view hierarchy before playback can begin.
*/
open class Player(private val base: BaseObject = BaseObject()) : Fragment(), EventInterface by base {
companion object {
val playbackEventsToListen = mutableSetOf<String>()
val containerEventsToListen = mutableSetOf<String>()
open class Player(private val base: BaseObject = BaseObject(),
private val playbackEventsToListen : MutableSet<String> = mutableSetOf<String>(),
private val containerEventsToListen : MutableSet<String> = mutableSetOf<String>()) : Fragment(), EventInterface by base {

companion object {
init {
PluginConfig.register()

Loader.registerPlayback(NoOpPlayback::class)
Loader.registerPlayback(ExoPlayerPlayback::class)

Event.values().forEach { playbackEventsToListen.add(it.value) }
}

/**
Expand All @@ -43,6 +41,10 @@ open class Player(private val base: BaseObject = BaseObject()) : Fragment(), Eve
}
}

init {
Event.values().forEach { playbackEventsToListen.add(it.value) }
}

/**
* Player state
*/
Expand Down
2 changes: 1 addition & 1 deletion doc/clappr/io.clappr.player/-player/-init-.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# &lt;init&gt;

`Player(base: `[`BaseObject`](../../io.clappr.player.base/-base-object/index.md)` = BaseObject())`
`Player(base: `[`BaseObject`](../../io.clappr.player.base/-base-object/index.md)` = BaseObject(), playbackEventsToListen: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = mutableSetOf<String>(), containerEventsToListen: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = mutableSetOf<String>())`

Main Player class.

Expand Down
9 changes: 1 addition & 8 deletions doc/clappr/io.clappr.player/-player/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Once instantiated it should be [configured](configure.md) and added to a view hi

| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | `Player(base: `[`BaseObject`](../../io.clappr.player.base/-base-object/index.md)` = BaseObject())`<br>Main Player class. |
| [&lt;init&gt;](-init-.md) | `Player(base: `[`BaseObject`](../../io.clappr.player.base/-base-object/index.md)` = BaseObject(), playbackEventsToListen: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = mutableSetOf<String>(), containerEventsToListen: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = mutableSetOf<String>())`<br>Main Player class. |

### Properties

Expand All @@ -44,13 +44,6 @@ Once instantiated it should be [configured](configure.md) and added to a view hi
| [seek](seek.md) | `fun seek(position: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Move current playback position. |
| [stop](stop.md) | `fun stop(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Stop media playing. Media playback is ended. |

### Companion Object Properties

| Name | Summary |
|---|---|
| [containerEventsToListen](container-events-to-listen.md) | `val containerEventsToListen: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` |
| [playbackEventsToListen](playback-events-to-listen.md) | `val playbackEventsToListen: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` |

### Companion Object Functions

| Name | Summary |
Expand Down

0 comments on commit 73d8791

Please sign in to comment.