Skip to content

Commit

Permalink
Merge branch 'main' into update_dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ authored Feb 23, 2024
2 parents 1246f3c + cc7ecb5 commit c63618d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.content.Context
import android.util.Pair
import androidx.media3.common.ErrorMessageProvider
import androidx.media3.common.PlaybackException
import androidx.media3.datasource.DataSourceException
import ch.srgssr.pillarbox.core.business.exception.BlockReasonException
import ch.srgssr.pillarbox.core.business.exception.DataParsingException
import ch.srgssr.pillarbox.core.business.exception.ResourceNotFoundException
Expand Down Expand Up @@ -37,6 +38,10 @@ class SRGErrorMessageProvider(private val context: Context) : ErrorMessageProvid
Pair.create(0, cause.message)
}

is DataSourceException -> {
Pair.create(cause.reason, cause.message)
}

is IOException -> {
Pair.create(0, context.getString(R.string.NoInternet))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ data class DemoItem(

val OnDemandVideoMP4 = DemoItem(
title = "VOD - MP4",
description = "The dig",
uri = "https://media.swissinfo.ch/media/video/dddaff93-c2cd-4b6e-bdad-55f75a519480/rendition/154a844b-de1d-4854-93c1-5c61cd07e98c.mp4"
description = "Swiss wheelchair athlete wins top award",
uri = "https://cdn.prod.swi-services.ch/video-projects/94f5f5d1-5d53-4336-afda-9198462c45d9/localised-videos/ENG/renditions/ENG.mp4"
)

val OnDemandVideoUHD = DemoItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ data class Playlist(val title: String, val items: List<DemoItem>, val descriptio
imageUrl = "https://www.rts.ch/2022/08/18/12/38/13317144.image/16x9"
),
DemoItem(
title = "The dig",
uri = "https://media.swissinfo.ch/media/video/dddaff93-c2cd-4b6e-bdad-55f75a519480/rendition/154a844b-de1d-4854-93c1-5c61cd07e98c.mp4",
description = "VOD - MP4",
imageUrl = "https://www.swissinfo.ch/resource/image/47686506/landscape_ratio3x2/280/187/347ee14103b1b86184659b2fd04c69ba/8C028539EC620EFACC0BF2F61591E2F8/img_8527.jpg"
title = "Swiss wheelchair athlete wins top award",
uri = "https://cdn.prod.swi-services.ch/video-projects/94f5f5d1-5d53-4336-afda-9198462c45d9/localised-videos/ENG/renditions/ENG.mp4",
description = "VOD - MP4 (urn:swi:video:48498670)",
imageUrl = "https://cdn.prod.swi-services.ch/video-delivery/images/94f5f5d1-5d53-4336-afda-9198462c45d9/_.1hAGinujJ.yERGrrGNzBGCNSxmhKZT/16x9"
),
DemoItem(
title = "Couleur 3 en vidéo (live)",
Expand Down Expand Up @@ -444,7 +444,7 @@ data class Playlist(val title: String, val items: List<DemoItem>, val descriptio
),
DemoItem(
title = "Couleur 3 en direct",
uri = "http://stream.srg-ssr.ch/m/couleur3/mp3_128",
uri = "https://stream.srg-ssr.ch/m/couleur3/mp3_128",
description = "Audio livestream (unbuffered)",
imageUrl = "https://img.rts.ch/articles/2017/image/cxsqgp-25867841.image?w=320&h=320"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.media3.common.util.ConditionVariable
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
import ch.srgssr.pillarbox.player.data.MediaItemSource
import ch.srgssr.pillarbox.player.utils.ContentUrls
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
Expand All @@ -29,7 +30,7 @@ class MediaItemSourceTest {
// Context of the app under test.
val appContext = getInstrumentation().targetContext
val customTag = "TagForTest"
val url = "https://media.swissinfo.ch/media/video/dddaff93-c2cd-4b6e-bdad-55f75a519480/rendition/154a844b-de1d-4854-93c1-5c61cd07e98c.mp4"
val url = ContentUrls.VOD_MP4
val atomicPlayer = AtomicReference<PillarboxPlayer>()
val waitForReady = WaitReadyListener()
getInstrumentation().runOnMainSync {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package ch.srgssr.pillarbox.player.utils

object ContentUrls {
const val VOD_HLS = "https://swi-vod.akamaized.net/videoJson/47603186/master.m3u8"
const val VOD_MP4 =
"https://media.swissinfo.ch/media/video/dddaff93-c2cd-4b6e-bdad-55f75a519480/rendition/154a844b-de1d-4854-93c1-5c61cd07e98c.mp4"
// 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"
Expand Down

0 comments on commit c63618d

Please sign in to comment.