mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-22 20:33:05 +00:00
fix: match parameters of free and nonFree CastServiceImpl
This commit is contained in:
parent
d1877dd924
commit
23510aa9b6
3 changed files with 19 additions and 10 deletions
|
@ -7,10 +7,14 @@ import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.
|
||||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Recording
|
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Recording
|
||||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl
|
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl
|
||||||
import de.nicidienase.chaosflix.common.userdata.entities.progress.PlaybackProgress
|
import de.nicidienase.chaosflix.common.userdata.entities.progress.PlaybackProgress
|
||||||
|
import de.nicidienase.chaosflix.common.userdata.entities.progress.PlaybackProgressDao
|
||||||
import de.nicidienase.chaosflix.touch.browse.streaming.StreamingItem
|
import de.nicidienase.chaosflix.touch.browse.streaming.StreamingItem
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
class CastServiceImpl : CastService {
|
class CastServiceImpl(
|
||||||
|
playbackProgressDao: PlaybackProgressDao,
|
||||||
|
scope: CoroutineScope) : CastService(playbackProgressDao, scope) {
|
||||||
|
|
||||||
override val connected: Boolean = false
|
override val connected: Boolean = false
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,18 @@ import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.
|
||||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Recording
|
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Recording
|
||||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl
|
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl
|
||||||
import de.nicidienase.chaosflix.common.userdata.entities.progress.PlaybackProgress
|
import de.nicidienase.chaosflix.common.userdata.entities.progress.PlaybackProgress
|
||||||
|
import de.nicidienase.chaosflix.common.userdata.entities.progress.PlaybackProgressDao
|
||||||
import de.nicidienase.chaosflix.touch.browse.streaming.StreamingItem
|
import de.nicidienase.chaosflix.touch.browse.streaming.StreamingItem
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
|
||||||
interface CastService {
|
abstract class CastService(
|
||||||
val connected: Boolean
|
val playbackProgressDao: PlaybackProgressDao,
|
||||||
|
val scope: CoroutineScope
|
||||||
|
) {
|
||||||
|
abstract val connected: Boolean
|
||||||
|
|
||||||
fun attachToActivity(activity: AppCompatActivity)
|
abstract fun attachToActivity(activity: AppCompatActivity)
|
||||||
fun castStream(streamingItem: StreamingItem, streamUrl: StreamUrl, contentKey: String)
|
abstract fun castStream(streamingItem: StreamingItem, streamUrl: StreamUrl, contentKey: String)
|
||||||
fun loadMediaAndPlay(recording: Recording, event: Event, progress: PlaybackProgress?)
|
abstract fun loadMediaAndPlay(recording: Recording, event: Event, progress: PlaybackProgress?)
|
||||||
fun addMediaRouteMenuItem(menu: Menu)
|
abstract fun addMediaRouteMenuItem(menu: Menu)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ import pl.droidsonroids.casty.Casty
|
||||||
import pl.droidsonroids.casty.MediaData
|
import pl.droidsonroids.casty.MediaData
|
||||||
|
|
||||||
class CastServiceImpl(
|
class CastServiceImpl(
|
||||||
private val playbackProgressDao: PlaybackProgressDao,
|
playbackProgressDao: PlaybackProgressDao,
|
||||||
private val scope: CoroutineScope
|
scope: CoroutineScope
|
||||||
) : LifecycleObserver, CastService {
|
) : LifecycleObserver, CastService(playbackProgressDao, scope) {
|
||||||
|
|
||||||
private var currentEvent: Event? = null
|
private var currentEvent: Event? = null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue