
function setProgress(percent){
    $('input[type="range"]').val(percent).change();
}

function doAction(func){
    callFunc(func, '');
}

function queryVideoList(){
    console.log("视屏："+curVideo);
    //alert(curVideo);
    if(!curVideo) {
        var videos = $.checkTask.video_id.split(',');
        curVideo = videos[0];
        //alert(curVideo);
    }
    // alert(curVideo);
    if(curVideo) {
        s1 = $.checkTask.start_time.replace(/-/g,"/");
        var startTime = new Date(s1).getTime()/1000;
        s1 = $.checkTask.end_time.replace(/-/g,"/");
        var endTime = new Date(s1).getTime()/1000;
        // alert(curVideo);
        var str = curVideo+'|'+startTime+'|'+endTime;
        callFunc("findvideolist",str);
    }else{

    }
}

function playVideo(id){
    callFunc("playvideo", id);
}

function setProcessValue(max){
    console.log(value);
    $("#ex11").slider({step: 5, min: 0, max: max});
}

function setVideoProcess(value){
    console.log(value);
    callFunc("playvideo", id);
}

function callFunc(func, param){
    event = document.createEvent('MessageEvent');
    var origin = window.location.protocol + '//' + window.location.host;
    event.initMessageEvent (func, true, true, param, origin, 1234, window, null);
    document.dispatchEvent (event);
}