tizentizen-web-app

Exit from application on Internet Error


I am using webapi-avplay to play video on samsung tizen tv web app. I am facing issue when I disconnect Internet from TV.

In web app, video is playing fine when there is no internet interruption. whereas when I disconnect internet from TV during video play then video buffers and instead of showing error popup it exit from application. I have written code for popup in 'error' section of avplay.

One more interesting thing is that sometime it works properly. Moreover we have no cable connection in TV.


Solution

  • Have you tried using NetworkStateChangedCallback ?

    You have to use NetworkStateChangeListener for that.Try detecting the change in network state and take step accordingly.

    function addNetworkStateChangeListener() {
        var onChange = function(data) {
            alert("Network State Changed");
            //do your code or show error popup
     }
      listenerID = webapis.network.addNetworkStateChangeListener(onChange);
    }
    

    For details implementation : Samsung D Forum : Tizen API Guide

    Thank you.