var AudioTrack={};

//переключение
AudioTrack.CheckExtAudioTrack = function () {
    if (Player.SefPlugin){
        var allTrack = Player.SefPlugin.Execute('GetTotalNumOfStreamID', 1);
        if (allTrack > 1){
           Display.showSize("AD/SUBT - Audio Track");
           setTimeout("Display.hideSize();", 3000);
        }
    }
}

AudioTrack.SetNextAudioTrack = function (){
    if (Player.state != Player.STOPPED && 
        Player.SefPlugin){

        var allTrack = Player.SefPlugin.Execute('GetTotalNumOfStreamID', 1) - 1;
        var nexTrack = Player.SefPlugin.Execute('GetCurrentStreamID', 1) + 1;

        if (nexTrack > allTrack || nexTrack < 0){
            nexTrack = 0;
        }

        Player.SefPlugin.Execute('SetStreamID', 1, nexTrack);
        Display.showSize("Audio Track #" + nexTrack.toString());
        setTimeout("Display.hideSize();", 3000);
            
    }
}
 