首页 > 代码库 > 视频播放功能
视频播放功能
HTML代码:
<div> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="960" height="472" id="cc_8F6EE4CA8E8900349C33DC5901307461"> <param name="movie" value="http://p.bokecc.com/flash/single/F26B5136373BAF7D_3B6247971B35F50E9C33DC5901307461_false_21DFD364E7B3CCF9_1/player.swf"> <param name="allowFullScreen" value="http://www.mamicode.com/true"> <param name="allowScriptAccess" value="http://www.mamicode.com/always"> <param value="http://www.mamicode.com/transparent" name="wmode"> <embed id="player" name="player" src="http://p.bokecc.com/flash/single/F26B5136373BAF7D_3B6247971B35F50E9C33DC5901307461_false_21DFD364E7B3CCF9_1/player.swf" width="960" height="472" name="cc_8F6EE4CA8E8900349C33DC5901307461" allowfullscreen="true" allowscriptaccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></object> </div>
javascript代码:
function isIE() { if (window.navigator.userAgent.toString().toLowerCase().indexOf("msie") >= 1) return true; else return false;}
function on_spark_player_start() { bflag = jQuery("#userInfoflag").attr("value"); if (bflag == "False") { jQuery(".warn-tc").css("display", "block"); showBg(); on_spark_player_resume(); jQuery(".videostartvalidation").bind("click", function () { javascript: location.reload(); }) } else { var errorcountcurrent = parseInt(jQuery(".errorcount").attr("data_errorcount")); if (errorcountcurrent >= maxerrorcount) { return; } loopfunction = setInterval("play_time()", 1000); }}function on_spark_player_resume() { if (!isIE()) { document.getElementById("player").spark_player_pause(); } else { document.getElementById("cc_8F6EE4CA8E8900349C33DC5901307461").spark_player_pause(); }}
function play_time() { var currentTime; var totaltime if (!isIE()) { currentTime = parseInt(document.getElementById("player").spark_player_position()); totaltime = parseInt(document.getElementById("player").spark_player_duration()); //document.getElementById("player").spark_player_pause(); } else { currentTime = parseInt(document.getElementById("cc_8F6EE4CA8E8900349C33DC5901307461").spark_player_position()); totaltime = parseInt(document.getElementById("cc_8F6EE4CA8E8900349C33DC5901307461").spark_player_duration()); // document.getElementById("cc_8F6EE4CA8E8900349C33DC5901307461").spark_player_pause(); } if (currentTime == totaltime) { clearInterval(loopfunction); showBg(); jQuery(".questionsdialog").css("display", "block"); }}
视频播放功能
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。