From 88ddd0702b9349d0340b84b9584d9cf562c04299 Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Wed, 14 Sep 2022 21:58:59 +0200 Subject: [PATCH] demo: update sample to support invalid uri --- examples/basic/src/VideoPlayer.android.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/basic/src/VideoPlayer.android.tsx b/examples/basic/src/VideoPlayer.android.tsx index ef53c752..727a463f 100644 --- a/examples/basic/src/VideoPlayer.android.tsx +++ b/examples/basic/src/VideoPlayer.android.tsx @@ -51,7 +51,7 @@ class VideoPlayer extends Component { require('./broadchurch.mp4'), { description: '(dash) sintel subtitles', - uri: 'https://bitmovin-a.akamaihd.net/content/sintel/sintel.mpd', + uri: 'Https://bitmovin-a.akamaihd.net/content/sintel/sintel.mpd', }, { description: '(mp4) big buck bunny', @@ -67,6 +67,12 @@ class VideoPlayer extends Component { 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0', type: 'mpd', }, + { + description: 'invalid URL', + uri: + 'mmt://www.youtube.com', + type: 'mpd', + }, { description: '(no url) Stopped playback', uri: undefined }, { description: '(no view) no View', @@ -246,8 +252,8 @@ class VideoPlayer extends Component { } onError = (err: any) => { - console.log(JSON.stringify(err)) - this.toast(true, 'error: ' + err?.error?.code) + console.log(JSON.stringify(err?.error.errorCode)) + this.toast(true, 'error: ' + err?.error.errorCode) } onEnd = () => {