demo: update sample to support invalid uri
This commit is contained in:
parent
f4f9e28fb1
commit
88ddd0702b
@ -51,7 +51,7 @@ class VideoPlayer extends Component {
|
|||||||
require('./broadchurch.mp4'),
|
require('./broadchurch.mp4'),
|
||||||
{
|
{
|
||||||
description: '(dash) sintel subtitles',
|
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',
|
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',
|
'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',
|
type: 'mpd',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description: 'invalid URL',
|
||||||
|
uri:
|
||||||
|
'mmt://www.youtube.com',
|
||||||
|
type: 'mpd',
|
||||||
|
},
|
||||||
{ description: '(no url) Stopped playback', uri: undefined },
|
{ description: '(no url) Stopped playback', uri: undefined },
|
||||||
{
|
{
|
||||||
description: '(no view) no View',
|
description: '(no view) no View',
|
||||||
@ -246,8 +252,8 @@ class VideoPlayer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onError = (err: any) => {
|
onError = (err: any) => {
|
||||||
console.log(JSON.stringify(err))
|
console.log(JSON.stringify(err?.error.errorCode))
|
||||||
this.toast(true, 'error: ' + err?.error?.code)
|
this.toast(true, 'error: ' + err?.error.errorCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnd = () => {
|
onEnd = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user