From 0788058383c2662651791aa7b943d6bd822bae60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Tue, 19 Mar 2024 15:05:15 +0100 Subject: [PATCH 1/4] Migrate Android Tests to Unit Tests --- .github/workflows/quality.yml | 1 + gradle/libs.versions.toml | 2 - pillarbox-player/build.gradle.kts | 19 +--- .../player/IsPlayingAllTypeOfContentTest.kt | 102 ------------------ .../pillarbox/player/utils/ContentUrls.kt | 19 ---- .../player/IsPlayingAllTypeOfContentTest.kt | 97 +++++++++++++++++ 6 files changed, 99 insertions(+), 141 deletions(-) delete mode 100644 pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt delete mode 100644 pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/utils/ContentUrls.kt create mode 100644 pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 2ec967a45..c072606c8 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -167,6 +167,7 @@ jobs: android-tests: name: Android Tests runs-on: ubuntu-latest + if: ${{ false }} # TODO Remove this line if/when we have Android Tests needs: build env: USERNAME: ${{ github.actor }} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6ab8d929e..175ac74c2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,6 @@ androidx-paging = "3.3.5" androidx-test-core = "1.6.1" androidx-test-ext-junit = "1.2.1" androidx-test-monitor = "1.7.2" -androidx-test-runner = "1.6.2" androidx-tv-material = "1.0.0" coil = "3.0.4" comscore = "6.11.1" @@ -60,7 +59,6 @@ androidx-paging-common = { module = "androidx.paging:paging-common", version.ref androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "androidx-paging" } androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test-core" } androidx-test-monitor = { module = "androidx.test:monitor", version.ref = "androidx-test-monitor" } -androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } androidx-tv-material = { module = "androidx.tv:tv-material", version.ref = "androidx-tv-material" } coil = { group = "io.coil-kt.coil3", name = "coil", version.ref = "coil" } coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" } diff --git a/pillarbox-player/build.gradle.kts b/pillarbox-player/build.gradle.kts index b8321a1cb..361c6d1f2 100644 --- a/pillarbox-player/build.gradle.kts +++ b/pillarbox-player/build.gradle.kts @@ -19,16 +19,6 @@ android { buildFeatures { buildConfig = true } - - // Mockk includes some licenses information, which may conflict with other license files. This block merges all licenses together. - // Mockk excludes all licenses instead: - // https://github.com/mockk/mockk/blob/f879502a044c83c2a5fd52992f20903209eb34f3/modules/mockk-android/build.gradle.kts#L14-L19 - packaging { - resources { - merges += "META-INF/LICENSE.md" - merges += "META-INF/LICENSE-notice.md" - } - } } dependencies { @@ -64,15 +54,8 @@ dependencies { testImplementation(libs.mockk) testImplementation(libs.mockk.dsl) testImplementation(libs.okio) - testRuntimeOnly(libs.robolectric) + testImplementation(libs.robolectric) testImplementation(libs.robolectric.annotations) testImplementation(libs.robolectric.shadows.framework) testImplementation(libs.turbine) - - androidTestImplementation(libs.androidx.test.monitor) - androidTestRuntimeOnly(libs.androidx.test.runner) - androidTestImplementation(libs.junit) - androidTestImplementation(libs.kotlin.test) - androidTestRuntimeOnly(libs.kotlinx.coroutines.android) - androidTestImplementation(libs.mockk) } diff --git a/pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt b/pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt deleted file mode 100644 index 471805226..000000000 --- a/pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) SRG SSR. All rights reserved. - * License information is available from the LICENSE file. - */ -package ch.srgssr.pillarbox.player - -import android.net.Uri -import androidx.media3.common.MediaItem -import androidx.media3.common.PlaybackException -import androidx.media3.common.Player -import androidx.media3.common.util.ConditionVariable -import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation -import ch.srgssr.pillarbox.player.utils.ContentUrls -import org.junit.runner.RunWith -import org.junit.runners.Parameterized -import java.util.concurrent.atomic.AtomicReference -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertNotNull -import kotlin.test.assertTrue - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(Parameterized::class) -class IsPlayingAllTypeOfContentTest { - @Parameterized.Parameter - lateinit var urlToTest: String - - @Test - fun isPlayingTest() { - // Context of the app under test. - val appContext = getInstrumentation().targetContext - val atomicPlayer = AtomicReference() - val waitIsPlaying = WaitIsPlaying() - getInstrumentation().runOnMainSync { - val player = PillarboxExoPlayer(appContext, Default) - atomicPlayer.set(player) - player.addMediaItem(MediaItem.fromUri(urlToTest)) - player.addListener(waitIsPlaying) - player.prepare() - player.play() - } - - waitIsPlaying.block() - - getInstrumentation().runOnMainSync { - val player = atomicPlayer.get() - // Make test flaky because dependant of internet - if (player.playerError != null) { - throw Exception(player.playerError) - } - assertEquals(Player.STATE_READY, player.playbackState) - assertTrue(player.isPlaying) - assertNotNull(player.currentMediaItem) - assertEquals(player.currentMediaItem?.localConfiguration?.uri, Uri.parse(urlToTest)) - player.release() - } - } - - private class WaitIsPlaying : Player.Listener { - private val isPlaying = ConditionVariable() - - override fun onIsPlayingChanged(isPlaying: Boolean) { - if (isPlaying) { - this.isPlaying.open() - } - } - - /** - * Don't block test if a player error occurred - * @param error - */ - override fun onPlayerError(error: PlaybackException) { - isPlaying.open() - } - - fun block() { - isPlaying.block() - } - } - - companion object { - @Parameterized.Parameters(name = "{0}") - @JvmStatic - fun parameters(): Iterable { - return listOf( - ContentUrls.VOD_MP4, - ContentUrls.VOD_HLS, - ContentUrls.AOD_MP3, - ContentUrls.VOD_DASH_H264, - ContentUrls.VOD_DASH_H265, - ContentUrls.LIVE_HLS, - ContentUrls.LIVE_DVR_HLS, - ContentUrls.AUDIO_LIVE_DVR_HLS, - ContentUrls.AUDIO_LIVE_MP3 - ) - } - } -} diff --git a/pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/utils/ContentUrls.kt b/pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/utils/ContentUrls.kt deleted file mode 100644 index b6de3f73d..000000000 --- a/pillarbox-player/src/androidTest/java/ch/srgssr/pillarbox/player/utils/ContentUrls.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) SRG SSR. All rights reserved. - * License information is available from the LICENSE file. - */ -package ch.srgssr.pillarbox.player.utils - -object ContentUrls { - const val VOD_HLS = "https://rts-vod-amd.akamaized.net/ww/14970442/da2b38fb-ca9f-3c76-80c6-e6fa7f3c2699/master.m3u8" - - // From urn:swi:video:48940210 - const val VOD_MP4 = "https://cdn.prod.swi-services.ch/video-projects/141b30ce-3850-424b-9063-a20d5619d342/localised-videos/ENG/renditions/ENG.mp4" - const val VOD_DASH_H264 = "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd" - const val VOD_DASH_H265 = "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd" - const val LIVE_HLS = "https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8?dw=0" - const val LIVE_DVR_HLS = "https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8" - const val AOD_MP3 = "https://srfaudio-a.akamaihd.net/delivery/world/af671f12-6f17-415a-9dd8-b8aee24cce8b.mp3" - const val AUDIO_LIVE_MP3 = "https://stream.srg-ssr.ch/m/la-1ere/mp3_128" - const val AUDIO_LIVE_DVR_HLS = "https://lsaplus.swisstxt.ch/audio/couleur3_96.stream/playlist.m3u8" -} diff --git a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt new file mode 100644 index 000000000..d8d147606 --- /dev/null +++ b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt @@ -0,0 +1,97 @@ +/* + * Copyright (c) SRG SSR. All rights reserved. + * License information is available from the LICENSE file. + */ +package ch.srgssr.pillarbox.player + +import android.net.Uri +import android.os.Looper +import androidx.media3.common.MediaItem +import androidx.media3.common.Player +import androidx.media3.test.utils.FakeClock +import androidx.media3.test.utils.robolectric.TestPlayerRunHelper +import androidx.test.core.app.ApplicationProvider +import org.junit.runner.RunWith +import org.robolectric.ParameterizedRobolectricTestRunner +import org.robolectric.ParameterizedRobolectricTestRunner.Parameters +import org.robolectric.Shadows.shadowOf +import kotlin.test.AfterTest +import kotlin.test.BeforeTest +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertTrue + +@RunWith(ParameterizedRobolectricTestRunner::class) +class IsPlayingAllTypeOfContentTest( + private val urlToTest: String +) { + private lateinit var player: PillarboxExoPlayer + + @BeforeTest + fun setUp() { + player = PillarboxExoPlayer( + context = ApplicationProvider.getApplicationContext(), + type = Default, + ) { + clock(FakeClock(true)) + } + } + + @AfterTest + fun tearDown() { + player.release() + + shadowOf(Looper.getMainLooper()).idle() + } + + @Test + fun `is playing`() { + player.addMediaItem(MediaItem.fromUri(urlToTest)) + player.prepare() + player.play() + + TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY) + + // Make test flaky because dependant of internet + if (player.playerError != null) { + throw IllegalStateException(player.playerError) + } + + assertEquals(Player.STATE_READY, player.playbackState) + assertTrue(player.isPlaying) + assertNotNull(player.currentMediaItem) + assertEquals(player.currentMediaItem?.localConfiguration?.uri, Uri.parse(urlToTest)) + } + + 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/da2b38fb-ca9f-3c76-80c6-e6fa7f3c2699/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 { + 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 58ae5e046ebfdfc378ba1c30dbb6620b4594bba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Wed, 24 Jul 2024 09:44:41 +0200 Subject: [PATCH 2/4] Add `TestPillarboxRunHelper.runUntilIsPlaying` to more closely match the original test implementation --- .../test/utils/TestPillarboxRunHelper.kt | 36 +++++++++++++++++-- .../player/IsPlayingAllTypeOfContentTest.kt | 11 ++---- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/pillarbox-player-testutils/src/main/java/ch/srgssr/pillarbox/player/test/utils/TestPillarboxRunHelper.kt b/pillarbox-player-testutils/src/main/java/ch/srgssr/pillarbox/player/test/utils/TestPillarboxRunHelper.kt index af1f4cceb..38a19c276 100644 --- a/pillarbox-player-testutils/src/main/java/ch/srgssr/pillarbox/player/test/utils/TestPillarboxRunHelper.kt +++ b/pillarbox-player-testutils/src/main/java/ch/srgssr/pillarbox/player/test/utils/TestPillarboxRunHelper.kt @@ -30,7 +30,7 @@ object TestPillarboxRunHelper { * Runs tasks of the main [Looper] until [Player.Listener.onEvents] matches the * expected state or a playback error occurs. * - *

If a playback error occurs it will be thrown wrapped in an [IllegalStateException]. + * If a playback error occurs, it will be thrown wrapped in an [IllegalStateException]. * * @param player The [Player]. * @param expectedEvents The expected [Player.Event]. If empty, waits until the first [Player.Listener.onEvents]. @@ -62,7 +62,7 @@ object TestPillarboxRunHelper { /** * Runs tasks of the main Looper until [Player.Listener.onPlaybackParametersChanged] is called or a playback error occurs. * - *

If a playback error occurs it will be thrown wrapped in an {@link IllegalStateException}. + * If a playback error occurs, it will be thrown wrapped in an [IllegalStateException]. * * @param player The [Player]. * @throws TimeoutException If the [RobolectricUtil.DEFAULT_TIMEOUT_MS] is exceeded. @@ -105,4 +105,36 @@ object TestPillarboxRunHelper { player.currentPosition >= position.inWholeMilliseconds } } + + /** + * Run and wait until [Player.isPlaying] is [isPlaying]. + + * If a playback error occurs, it will be thrown wrapped in an [IllegalStateException]. + * + * @param player The [Player]. + * @param isPlaying The expected value of [Player.isPlaying]. + + * @throws TimeoutException If the [RobolectricUtil.DEFAULT_TIMEOUT_MS] is exceeded. + */ + @Throws(TimeoutException::class) + fun runUntilIsPlaying(player: Player, isPlaying: Boolean) { + verifyMainTestThread(player) + if (player is ExoPlayer) { + verifyPlaybackThreadIsAlive(player) + } + val receivedCallback = AtomicBoolean(false) + val listener = object : Player.Listener { + override fun onIsPlayingChanged(actual: Boolean) { + if (actual == isPlaying) { + receivedCallback.set(true) + } + } + } + player.addListener(listener) + RobolectricUtil.runMainLooperUntil { receivedCallback.get() || player.playerError != null } + player.removeListener(listener) + if (player.playerError != null) { + throw IllegalStateException(player.playerError) + } + } } diff --git a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt index d8d147606..5a788f67f 100644 --- a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt +++ b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt @@ -9,8 +9,8 @@ import android.os.Looper import androidx.media3.common.MediaItem import androidx.media3.common.Player import androidx.media3.test.utils.FakeClock -import androidx.media3.test.utils.robolectric.TestPlayerRunHelper import androidx.test.core.app.ApplicationProvider +import ch.srgssr.pillarbox.player.test.utils.TestPillarboxRunHelper import org.junit.runner.RunWith import org.robolectric.ParameterizedRobolectricTestRunner import org.robolectric.ParameterizedRobolectricTestRunner.Parameters @@ -24,7 +24,7 @@ import kotlin.test.assertTrue @RunWith(ParameterizedRobolectricTestRunner::class) class IsPlayingAllTypeOfContentTest( - private val urlToTest: String + private val urlToTest: String, ) { private lateinit var player: PillarboxExoPlayer @@ -51,12 +51,7 @@ class IsPlayingAllTypeOfContentTest( player.prepare() player.play() - TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY) - - // Make test flaky because dependant of internet - if (player.playerError != null) { - throw IllegalStateException(player.playerError) - } + TestPillarboxRunHelper.runUntilIsPlaying(player, isPlaying = true) assertEquals(Player.STATE_READY, player.playbackState) assertTrue(player.isPlaying) From 375e62db84b4e910319611ae07830315b8844903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Wed, 18 Sep 2024 08:16:17 +0200 Subject: [PATCH 3/4] Completely remove the `android-tests` step, as it is no longer necessary --- .github/workflows/quality.yml | 41 ----------------------------------- 1 file changed, 41 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index c072606c8..0251ebda8 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -163,44 +163,3 @@ jobs: title: Code Coverage pass-emoji: 🟢 fail-emoji: 🔴 - - android-tests: - name: Android Tests - runs-on: ubuntu-latest - if: ${{ false }} # TODO Remove this line if/when we have Android Tests - needs: build - env: - USERNAME: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - strategy: - matrix: - api-level: [ 26 ] - steps: - - name: Enable KVM - # https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Java - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 - with: - cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }} - - name: Run Android Tests - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: x86_64 - # Supported tasks per module - # :pillarbox-analytics:connectedDebugAndroidTest - # :pillarbox-core-business:connectedDebugAndroidTest - # :pillarbox-player:connectedDebugAndroidTest - # :pillarbox-ui:connectedDebugAndroidTest - script: ./gradlew :pillarbox-player:connectedDebugAndroidTest From 96790453eac1a421381972a61ccd62b69ad35b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Wed, 18 Sep 2024 08:17:07 +0200 Subject: [PATCH 4/4] Fix `IsPlayingAllTypeOfContentTest` compilation --- .../player/IsPlayingAllTypeOfContentTest.kt | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt index 5a788f67f..5656efc1b 100644 --- a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt +++ b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt @@ -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 @@ -35,6 +36,7 @@ class IsPlayingAllTypeOfContentTest( type = Default, ) { clock(FakeClock(true)) + coroutineContext(EmptyCoroutineContext) } } @@ -47,7 +49,7 @@ class IsPlayingAllTypeOfContentTest( @Test fun `is playing`() { - player.addMediaItem(MediaItem.fromUri(urlToTest)) + player.setMediaItem(MediaItem.fromUri(urlToTest)) player.prepare() player.play() @@ -60,32 +62,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/da2b38fb-ca9f-3c76-80c6-e6fa7f3c2699/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 { 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/da2b38fb-ca9f-3c76-80c6-e6fa7f3c2699/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", ) } }