Rename some class from Impl to Default

This commit is contained in:
Benoit Marty 2024-05-31 09:45:34 +02:00
parent cf4497d323
commit 45598a885e
26 changed files with 59 additions and 58 deletions

View file

@ -43,7 +43,7 @@ import kotlin.time.Duration.Companion.seconds
*/
@ContributesBinding(RoomScope::class)
@SingleIn(RoomScope::class)
class MediaPlayerImpl @Inject constructor(
class DefaultMediaPlayer @Inject constructor(
private val player: SimplePlayer,
) : MediaPlayer {
private val listener = object : SimplePlayer.Listener {

View file

@ -55,13 +55,13 @@ object SimplePlayerModule {
@Provides
fun simplePlayerProvider(
@ApplicationContext context: Context,
): SimplePlayer = SimplePlayerImpl(ExoPlayer.Builder(context).build())
): SimplePlayer = DefaultSimplePlayer(ExoPlayer.Builder(context).build())
}
/**
* Default implementation of [SimplePlayer] backed by a media3 [Player].
*/
class SimplePlayerImpl(
class DefaultSimplePlayer(
private val p: Player
) : SimplePlayer {
override fun addListener(listener: SimplePlayer.Listener) {

View file

@ -19,7 +19,7 @@ package io.element.android.libraries.mediaplayer.impl
import kotlinx.coroutines.test.runTest
import org.junit.Test
class MediaPlayerImplTest {
class DefaultMediaPlayerTest {
@Test
fun `default test`() = runTest {
// TODO