yWeb: dont zap on channel change

This commit is contained in:
Jacek Jendrzej
2014-04-09 17:02:05 +02:00
parent f1028f0d16
commit 74e1cb7f14

View File

@@ -16,6 +16,7 @@ var Mode = "tv";
var AudioChannel = 0;
var isSubs=false;
var g_intervall=null;
var current_channel = 0;
/*resize,init*/
function do_onload(){
if(Mode != "tv" && Mode != "radio")
@@ -193,8 +194,12 @@ function do_play_state(_state, _options){
var mrl = "";
if(Mode == "tv" && isUDP)
mrl = "udp://@:31330";
else
if(current_channel)
mrl = "http://" + window.location.host + ":31339/id=" + current_channel;
else
mrl = loadSyncURL("/control/build_live_url");
V2.set_actual_mrl(mrl);
V2.play();
V2.next();
@@ -236,8 +241,10 @@ function change_channel(){
var dd = id('channels');
var channel = -1;
var sel = dd.selectedIndex;
if(sel != -1)
if(sel != -1){
channel = dd[sel].value;
current_channel = channel;
}
do_stop();
AudioChannel = 0;
window.setTimeout("change_channel_zapto(\""+channel+"\")",100);
@@ -246,14 +253,16 @@ function change_sub_channel(){
var dd = id('subs');
var channel = -1;
var sel = dd.selectedIndex;
if(sel != -1)
if(sel != -1){
channel = dd[sel].value;
current_channel = channel;
}
do_stop();
AudioChannel = 0;
window.setTimeout("change_channel_zapto(\""+channel+"\")",100);
}
function change_channel_zapto(channel){
dbox_zapto(channel);
//dbox_zapto(channel);
window.setTimeout("change_channel_play()",500);
}
function build_subchannels(){