Hi!
My application should be able to play a number of videos, and some of them are from YouTube. I'm getting mp4 urls from YouTube API, but Roku is only able to show streams with low quality.
That's example code (actually it is from Roku samples, I just specified another url):
this.player.SetContentList([{
Stream: {
quality: true
url: "http://r8---sn-n3toxu-axqe.googlevideo.com/videoplayback?itag=22&mn=sn-n3toxu-axqe&cnr=14&signature=9A9E9052BF12F7CDA68C124344AFDD34B404E111.C3A0F27722821D752BB7EE7161B6B952DDD9EBAD&key=yt6&ms=au&mv=m&mt=1464891262&dur=1861.590&sver=3&lmt=1461051538955103&ip=188.242.217.203&fexp=9405824%2C9416126%2C9416891%2C9418403%2C9418777%2C9422596%2C9422842%2C9425619%2C9428398%2C9431012%2C9432025%2C9432564%2C9432684%2C9433096%2C9433380%2C9433457%2C9433946%2C9435138%2C9435398%2C9435527%2C9435697%2C9435876%2C9435944%2C9436061%2C9437066%2C9437079%2C9437158%2C9437424%2C9437553%2C9437948%2C9437955&expire=1464913144&id=o-AJMBGGWdHjXllrg-2eatT_OGvNBh4tt8raTNujubGm7s&upn=sRjfQCpMbo8&initcwndbps=3315000&source=youtube&sparams=cnr%2Cdur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Csource%2Cupn%2Cexpire&pl=24&mm=31&ratebypass=yes&ipbits=0&mime=video%2Fmp4"
}
StreamFormat: "mp4"
SwitchingStrategy: "full-adaptation"
isHD: true
}])
this.player.Play()
Error log:
Stream started <Component: roAssociativeArray> =
{
IsUnderrun: false
MeasuredBitrate: 3895
StreamBitrate: 0
Url: http://r8---sn-n3toxu-axqe.googlevideo.com/videoplayback?itag=22&mn=sn-n3toxu-axqe&cnr=14&signature=9A9E9052BF12F7CDA68C124344AFDD34B404E111.C3A0F27722821D752BB7EE7161B6B952DDD9EBAD&key=yt6&ms=au&mv=m&mt=1464891262&dur=1861.590&sver=3&lmt=1461051538955103&ip=188.242.217.203&fexp=9405824%2C9416126%2C9416891%2C9418403%2C9418777%2C9422596%2C9422842%2C9425619%2C9428398%2C9431012%2C9432025%2C9432564%2C9432684%2C9433096%2C9433380%2C9433457%2C9433946%2C9435138%2C9435398%2C9435527%2C9435697%2C9435876%2C9435944%2C9436061%2C9437066%2C9437079%2C9437158%2C9437424%2C9437553%2C9437948%2C9437955&expire=1464913144&id=o-AJMBGGWdHjXllrg-2eatT_OGvNBh4tt8raTNujubGm7s&upn=sRjfQCpMbo8&initcwndbps=3315000&source=youtube&sparams=cnr%2Cdur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Csource%2Cupn%2Cexpire&pl=24&mm=31&ratebypass=yes&ipbits=0&mime=video/mp4
}
Event: [ 33], index [ 1]: Format Detected
Event info:<Component: roAssociativeArray> =
{
audio: NONE
captions: NONE
video: NONE
}
Event: [ 11], index [ 0]: Content contains no playable tracks.
Event: [ 9], index [-5]: malformed data
Event info:<Component: roAssociativeArray> =
{
MediaFormat: <Component: roAssociativeArray>
}
Media format:<Component: roAssociativeArray> =
{
}
YouTube API returns several urls for different formats, and for other urls playback works fine, but they have much worse quality.
Such HD urls are working fine in browsers and mobile applications (Android and iOS). Why Roku app doesn't want to play it and is it a way to fix this?