Some hls livestreams not prepared by webapis.avplay.prepareAsync()

Hey All,

Recently I’ve run into trouble with supporting livestreams on the tizen avplay video player. Some livestreams such as

work fine, while other livestreams such as

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")


global.webapis.avplay.setStreamingProperty("ADAPTIVE_INFO", BitRateString);

console.log("set streaming prop")


console.log("set display method")


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");



setIsLive(temp === "0" ? false : true);



function errorCallback() {

console.log('The media has failed to prepare');



console.log("added listener")


I figured it out.

The hls stream that was causing the prepareAsync() method to hang was sending initial resolutions lower than HD. Once we upped the profile to only send HD (1280x720) and FHD (1920x1080) this mysterious error stopped happening.

1 Like