mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-22 20:33:05 +00:00
Merge branch 'develop' into feature/singleApp
This commit is contained in:
commit
952d751f93
3 changed files with 17 additions and 8 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.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(
|
||||
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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue