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
bd77a7bc22
3 changed files with 20 additions and 10 deletions
|
@ -7,10 +7,15 @@ 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.streaming.StreamUrl
|
||||
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 kotlinx.coroutines.CoroutineScope
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
class CastServiceImpl : CastService {
|
||||
class CastServiceImpl(
|
||||
playbackProgressDao: PlaybackProgressDao,
|
||||
scope: CoroutineScope
|
||||
) : CastService(playbackProgressDao, scope) {
|
||||
|
||||
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.streaming.StreamUrl
|
||||
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 kotlinx.coroutines.CoroutineScope
|
||||
|
||||
interface CastService {
|
||||
val connected: Boolean
|
||||
abstract class CastService(
|
||||
val playbackProgressDao: PlaybackProgressDao,
|
||||
val scope: CoroutineScope
|
||||
) {
|
||||
abstract val connected: Boolean
|
||||
|
||||
fun attachToActivity(activity: AppCompatActivity)
|
||||
fun castStream(streamingItem: StreamingItem, streamUrl: StreamUrl, contentKey: String)
|
||||
fun loadMediaAndPlay(recording: Recording, event: Event, progress: PlaybackProgress?)
|
||||
fun addMediaRouteMenuItem(menu: Menu)
|
||||
abstract fun attachToActivity(activity: AppCompatActivity)
|
||||
abstract fun castStream(streamingItem: StreamingItem, streamUrl: StreamUrl, contentKey: String)
|
||||
abstract fun loadMediaAndPlay(recording: Recording, event: Event, progress: PlaybackProgress?)
|
||||
abstract fun addMediaRouteMenuItem(menu: Menu)
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@ import pl.droidsonroids.casty.Casty
|
|||
import pl.droidsonroids.casty.MediaData
|
||||
|
||||
class CastServiceImpl(
|
||||
private val playbackProgressDao: PlaybackProgressDao,
|
||||
private val scope: CoroutineScope
|
||||
) : LifecycleObserver, CastService {
|
||||
playbackProgressDao: PlaybackProgressDao,
|
||||
scope: CoroutineScope
|
||||
) : LifecycleObserver, CastService(playbackProgressDao, scope) {
|
||||
|
||||
private var currentEvent: Event? = null
|
||||
|
||||
|
|
Loading…
Reference in a new issue