Merge branch 'develop' into feature/singleApp

This commit is contained in:
Felix 2020-06-11 21:51:24 +02:00
commit 952d751f93
3 changed files with 17 additions and 8 deletions

View file

@ -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.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

View file

@ -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(
private val playbackProgressDao: PlaybackProgressDao,
private 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)
}

View file

@ -27,7 +27,7 @@ import pl.droidsonroids.casty.MediaData
class CastServiceImpl(
private val playbackProgressDao: PlaybackProgressDao,
private val scope: CoroutineScope
) : LifecycleObserver, CastService {
) : LifecycleObserver, CastService(playbackProgressDao, scope) {
private var currentEvent: Event? = null