Skip to content

Commit

Permalink
Fix IsPlayingAllTypeOfContentTest compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed Sep 26, 2024
1 parent 159f1d5 commit dad7763
Showing 1 changed file with 13 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.junit.runner.RunWith
import org.robolectric.ParameterizedRobolectricTestRunner
import org.robolectric.ParameterizedRobolectricTestRunner.Parameters
import org.robolectric.Shadows.shadowOf
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
Expand All @@ -33,6 +34,7 @@ class IsPlayingAllTypeOfContentTest(
player = PillarboxExoPlayer(
context = ApplicationProvider.getApplicationContext(),
clock = FakeClock(true),
coroutineContext = EmptyCoroutineContext,
)
}

Expand All @@ -45,7 +47,7 @@ class IsPlayingAllTypeOfContentTest(

@Test
fun `is playing`() {
player.addMediaItem(MediaItem.fromUri(urlToTest))
player.setMediaItem(MediaItem.fromUri(urlToTest))
player.prepare()
player.play()

Expand All @@ -58,32 +60,21 @@ class IsPlayingAllTypeOfContentTest(
}

companion object {
// From urn:swi:video:48940210
private const val VOD_MP4 =
"https://cdn.prod.swi-services.ch/video-projects/141b30ce-3850-424b-9063-a20d5619d342/localised-videos/ENG/renditions/ENG.mp4"
private const val VOD_HLS = "https://rts-vod-amd.akamaized.net/ww/14970442/7510ee63-05a4-3d48-8d26-1f1b3a82f6be/master.m3u8"
private const val AOD_MP3 = "https://srfaudio-a.akamaihd.net/delivery/world/af671f12-6f17-415a-9dd8-b8aee24cce8b.mp3"
private const val VOD_DASH_H264 = "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd"
private const val VOD_DASH_H265 = "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd"
private const val LIVE_HLS = "https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8?dw=0"
private const val LIVE_DVR_HLS = "https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8"
private const val AUDIO_LIVE_MP3 = "https://stream.srg-ssr.ch/m/la-1ere/mp3_128"
private const val AUDIO_LIVE_DVR_HLS = "https://lsaplus.swisstxt.ch/audio/couleur3_96.stream/playlist.m3u8"

@JvmStatic
@Suppress("unused")
@Parameters(name = "{index}: {0}")
fun parameters(): Iterable<Any> {
return listOf(
VOD_MP4,
VOD_HLS,
AOD_MP3,
VOD_DASH_H264,
VOD_DASH_H265,
LIVE_HLS,
LIVE_DVR_HLS,
AUDIO_LIVE_MP3,
AUDIO_LIVE_DVR_HLS,
// From urn:swi:video:48940210
"https://cdn.prod.swi-services.ch/video-projects/141b30ce-3850-424b-9063-a20d5619d342/localised-videos/ENG/renditions/ENG.mp4",
"https://rts-vod-amd.akamaized.net/ww/14970442/7510ee63-05a4-3d48-8d26-1f1b3a82f6be/master.m3u8",
"https://srfaudio-a.akamaihd.net/delivery/world/af671f12-6f17-415a-9dd8-b8aee24cce8b.mp3",
"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd",
"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd",
"https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8?dw=0",
"https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8",
"https://stream.srg-ssr.ch/m/la-1ere/mp3_128",
"https://lsaplus.swisstxt.ch/audio/couleur3_96.stream/playlist.m3u8",
)
}
}
Expand Down

0 comments on commit dad7763

Please sign in to comment.