diff --git a/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSession.kt b/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSession.kt index c88e1a03..0a76f0eb 100644 --- a/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSession.kt +++ b/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSession.kt @@ -14,7 +14,6 @@ import java.util.UUID internal sealed class StreamingSession private constructor( val id: UUID, - val versionedCdmCalculator: VersionedCdm.Calculator, val configuration: Configuration, ) { @@ -86,19 +85,11 @@ internal sealed class StreamingSession private constructor( ) } - class Explicit( - id: UUID, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - ) : - StreamingSession(id, versionedCdmCalculator, configuration) + class Explicit(id: UUID, configuration: Configuration) : + StreamingSession(id, configuration) - class Implicit( - id: UUID, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - ) : - StreamingSession(id, versionedCdmCalculator, configuration) + class Implicit(id: UUID, configuration: Configuration) : + StreamingSession(id, configuration) sealed class Creator private constructor( private val factory: T, @@ -145,36 +136,25 @@ internal sealed class StreamingSession private constructor( sealed class Factory private constructor( protected val uuidWrapper: UUIDWrapper, - protected val versionedCdmCalculator: VersionedCdm.Calculator, protected val configuration: Configuration, ) { abstract fun create(): StreamingSession - class Explicit( - uuidWrapper: UUIDWrapper, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - ) : - Factory(uuidWrapper, versionedCdmCalculator, configuration) { + class Explicit(uuidWrapper: UUIDWrapper, configuration: Configuration) : + Factory(uuidWrapper, configuration) { override fun create(): StreamingSession = Explicit( uuidWrapper.randomUUID, - versionedCdmCalculator, configuration, ) } - class Implicit( - uuidWrapper: UUIDWrapper, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - ) : - Factory(uuidWrapper, versionedCdmCalculator, configuration) { + class Implicit(uuidWrapper: UUIDWrapper, configuration: Configuration) : + Factory(uuidWrapper, configuration) { override fun create(): StreamingSession = Implicit( uuidWrapper.randomUUID, - versionedCdmCalculator, configuration, ) } diff --git a/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/player/di/MediaSourcererModule.kt b/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/player/di/MediaSourcererModule.kt index ae50235f..93ffd1fb 100644 --- a/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/player/di/MediaSourcererModule.kt +++ b/player/playback-engine/src/main/kotlin/com/tidal/sdk/player/playbackengine/player/di/MediaSourcererModule.kt @@ -58,7 +58,6 @@ import com.tidal.sdk.player.playbackengine.mediasource.TidalMediaSourceCreator import com.tidal.sdk.player.playbackengine.mediasource.loadable.PlaybackInfoLoadableFactory import com.tidal.sdk.player.playbackengine.mediasource.loadable.PlaybackInfoLoadableLoaderCallbackFactory import com.tidal.sdk.player.playbackengine.mediasource.streamingsession.StreamingSession -import com.tidal.sdk.player.playbackengine.mediasource.streamingsession.VersionedCdm import com.tidal.sdk.player.playbackengine.model.AssetTimeoutConfig import com.tidal.sdk.player.playbackengine.offline.OfflineDrmHelper import com.tidal.sdk.player.playbackengine.offline.OfflinePlayDataSourceFactoryHelper @@ -491,11 +490,8 @@ internal object MediaSourcererModule { @Provides @Reusable - fun explicitStreamingSessionFactory( - uuidWrapper: UUIDWrapper, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - ) = StreamingSession.Factory.Explicit(uuidWrapper, versionedCdmCalculator, configuration) + fun explicitStreamingSessionFactory(uuidWrapper: UUIDWrapper, configuration: Configuration) = + StreamingSession.Factory.Explicit(uuidWrapper, configuration) @Provides @Reusable @@ -511,11 +507,8 @@ internal object MediaSourcererModule { @Provides @Reusable - fun implicitStreamingSessionFactory( - uuidWrapper: UUIDWrapper, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - ) = StreamingSession.Factory.Implicit(uuidWrapper, versionedCdmCalculator, configuration) + fun implicitStreamingSessionFactory(uuidWrapper: UUIDWrapper, configuration: Configuration) = + StreamingSession.Factory.Implicit(uuidWrapper, configuration) @Provides @Reusable diff --git a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ExplicitStreamingSessionFactoryTest.kt b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ExplicitStreamingSessionFactoryTest.kt index b6d22781..aca19f25 100644 --- a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ExplicitStreamingSessionFactoryTest.kt +++ b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ExplicitStreamingSessionFactoryTest.kt @@ -6,11 +6,7 @@ import com.tidal.sdk.player.common.UUIDWrapper internal class ExplicitStreamingSessionFactoryTest : StreamingSessionFactoryTest() { override val streamingSessionFactoryF = - { - uuidWrapper: UUIDWrapper, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - -> - StreamingSession.Factory.Explicit(uuidWrapper, versionedCdmCalculator, configuration) + { uuidWrapper: UUIDWrapper, configuration: Configuration -> + StreamingSession.Factory.Explicit(uuidWrapper, configuration) } } diff --git a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ImplicitStreamingSessionFactoryTest.kt b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ImplicitStreamingSessionFactoryTest.kt index 0ce1229b..4ec38d17 100644 --- a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ImplicitStreamingSessionFactoryTest.kt +++ b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/ImplicitStreamingSessionFactoryTest.kt @@ -6,11 +6,7 @@ import com.tidal.sdk.player.common.UUIDWrapper internal class ImplicitStreamingSessionFactoryTest : StreamingSessionFactoryTest() { override val streamingSessionFactoryF = - { - uuidWrapper: UUIDWrapper, - versionedCdmCalculator: VersionedCdm.Calculator, - configuration: Configuration, - -> - StreamingSession.Factory.Implicit(uuidWrapper, versionedCdmCalculator, configuration) + { uuidWrapper: UUIDWrapper, configuration: Configuration -> + StreamingSession.Factory.Implicit(uuidWrapper, configuration) } } diff --git a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSessionFactoryTest.kt b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSessionFactoryTest.kt index 1fe7480f..889fd041 100644 --- a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSessionFactoryTest.kt +++ b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/mediasource/streamingsession/StreamingSessionFactoryTest.kt @@ -16,16 +16,15 @@ import org.mockito.kotlin.whenever internal abstract class StreamingSessionFactoryTest { private val uuidWrapper = mock() - private val versionedCdmCalculator = mock() private val configuration = mock() protected abstract val streamingSessionFactoryF: - (UUIDWrapper, VersionedCdm.Calculator, Configuration) -> StreamingSession.Factory + (UUIDWrapper, Configuration) -> StreamingSession.Factory private val streamingSessionFactory by lazy { - streamingSessionFactoryF(uuidWrapper, versionedCdmCalculator, configuration) + streamingSessionFactoryF(uuidWrapper, configuration) } @AfterEach - fun tearDown() = verifyNoMoreInteractions(uuidWrapper, versionedCdmCalculator, configuration) + fun tearDown() = verifyNoMoreInteractions(uuidWrapper, configuration) @Test fun createCreatesInstanceWithProvidedData() {