Hey All,
Recently I’ve run into trouble with supporting livestreams on the tizen avplay video player. Some livestreams such as
https://cbsn-us.cbsnstream.cbsnews.com/out/v1/55a8648e8f134e82a470f83d562deeca/master_11.m3u8
work fine, while other livestreams such as
https://gideommd.mmdlive.lldns.net/gideommd/543df477273b4e4f9baa8eef475dddca/manifest.m3u8
don’t work at all.
in fact, the behavior that the latter live stream exhibits when being loaded into the video player is strange. The prepare() method just crashes and the prepareAsync(successCallback, errorCallback) begins to execute but never calls either callback and doesn’t log any information. I’ve tested on my app as well as two other sample apps that are only meant to showcase the avplay code, so I don’t think it’s an issue with my code, it’s probably something with the stream, but I can’t figure out exactly what it is and how to avoid it.
Is there anyway you could test with those two streams and let me know what you figure out, or if you can’t test if you have any advice as to how to fix? Not sure how to handle this in the app when the success and error callback are never called from within prepareAsync(). There is no error when using open() or prepareAsync() but the success callback doesn’t execute and video buffering never starts. Obviously i can’t change what happens in the prepareAsync() code, but more information would be nice.
Note: the stream i supplied that isn’t working is also a church live stream, so it might not be live when you’re testing. if that’s the case, let me know and i can get a dummy test up so you can see what I mean.
Here is my code for reference:
/* this is never called on some streams for some reason but works perfectly with others*/
function successCallback() {
console.log("prepare entered")
letBitRateString = "BITRATES=1000~10000|STARTBITRATE=LOWEST|SKIPBITRATE=LOWEST|STARTFRAGMENT=0";
global.webapis.avplay.setStreamingProperty("ADAPTIVE_INFO", BitRateString);
console.log("set streaming prop")
global.webapis.avplay.setDisplayMethod("PLAYER_DISPLAY_MODE_FULL_SCREEN");
console.log("set display method")
console.log("prepared")
global.webapis.avplay.play();
letText = 'AVAILABLE_BITRATE: ' + global.webapis.avplay.getStreamingProperty ("AVAILABLE_BITRATE") ;
Text += 'CURRENT_BANDWIDTH: ' + global.webapis.avplay.getStreamingProperty ("CURRENT_BANDWIDTH") + '';
Text += 'IS_LIVE: ' + global.webapis.avplay.getStreamingProperty ("IS_LIVE") +'';
lettemp = global.webapis.avplay.getStreamingProperty ("IS_LIVE");
console.log(Text);
console.log(temp);
setIsLive(temp === "0" ? false : true);
setKey(Math.random());
}
function errorCallback() {
console.log('The media has failed to prepare');
}
global.webapis.avplay.open(url);
global.webapis.avplay.setListener(listener);
console.log("added listener")
global.webapis.avplay.prepareAsync(successCallback,errorCallback);