Skip to content

Tizen API: TVChannel

zuzu_yun edited this page Mar 21, 2017 · 4 revisions

For converting TVChannel API of tizen to TOAST API, please refer to the followings.

If you want more information, please refer to toast.tvchannel

tune

  • Before

    tizen.tvchannel.tune({
        major: 7,
        minor: 1
    },{
        onsuccess: function() {},
        onnosignal: function() {},
        onprograminforeceived: function() {}
    }, function() {}, 'MAIN');
  • After

    toast.tvchannel.tune({
        major: 7,
        minor: 1
    },{
        onsuccess: function() {},
        onnosignal: function() {},
        onprograminforeceived: function() {}
    }, function() {});

tuneUp

  • Before

    tizen.tvchannel.tuneUp({
        onsuccess: function() {},
        onnosignal: function() {},
        onprograminforeceived: function() {}
    }, function() {}, 'ALL', 'MAIN');
  • After

    toast.tvchannel.tuneUp({
        onsuccess: function() {},
        onnosignal: function() {},
        onprograminforeceived: function() {}
    }, function() {});

tuneDown

  • Before

    tizen.tvchannel.tuneDown({
        onsuccess: function() {},
        onnosignal: function() {},
        onprograminforeceived: function() {}
    }, function() {}, 'ALL', 'MAIN');
  • After

    toast.tvchannel.tuneDown({
        onsuccess: function() {},
        onnosignal: function() {},
        onprograminforeceived: function() {}
    }, function() {});
    });

findChannel

  • Before

    tizen.tvchannel.findChannel(7, 1, function() {}, function() {});
  • After

    toast.tvchannel.findChannel(7, 1, function() {}, function() {});

getChannelList

  • Before

    tizen.tvchannel.getChannelList(function() {}, function() {}, 'ALL', 0, 10);
  • After

    toast.tvchannel.getChannelList(function() {}, function() {}, 'ALL', 0, 10);

getCurrentChannel

  • Before

    var channelInfo = tizen.tvchannel.getCurrentChannel('MAIN');
  • After

    toast.tvchannel.getCurrentChannel(function() {}, function() {});

getProgramList

  • Before

    var channelInfo = tizen.tvchannel.getCurrentChannel('MAIN');
    tizen.tvchannel.getProgramList(channelInfo, tizen.time.getCurrentDateTime(), function() {}, function() {}, 3);
  • After

    toast.tvchannel.getCurrentChannel(function(channelInfo) {
        toast.tvchannel.getProgramList(channelInfo, new Date(), function() {}, function() {}, 3);
    }, function() {});

getCurrentProgram

  • Before

    var programInfo = tizen.tvchannel.getCurrentProgram('MAIN');
  • After

    toast.tvchannel.getCurrentProgram(function() {}, function() {});

addChannelChangeListener

  • Before

    var channelListenerID = tizen.tvchannel.addChannelChangeListener(function() {}, 'MAIN');
  • After

    var testFunc = function() {};
    toast.tvchannel.addChannelChangeListener(testFunc);   

removeChannelChangeListener

  • Before

    var channelListenerID = tizen.tvchannel.addChannelChangeListener(function() {});
    tizen.tvchannel.removeChannelChangeListener(channelListenerID);
  • After

    var testFunc = function() {};
    toast.tvchannel.addChannelChangeListener(testFunc);
    toast.tvchannel.removeChannelChangeListener(testFunc);   
Clone this wiki locally