日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > php >内容正文

php

视频播放页php,html jquery简易视频播放器

發(fā)布時(shí)間:2025/4/16 php 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 视频播放页php,html jquery简易视频播放器 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

html jquery js 簡(jiǎn)易視頻播放器 直接上代碼:html>

Document

#durationbar{

width:?500px;

height:?20px;

}

#durationbar?progress{

width:?100%;

height:?100%;

}

總時(shí)長(zhǎng):00:00:00??當(dāng)前時(shí)長(zhǎng):00:00:00

開始

停止

2倍速度

function?test(time_distance){

//?天時(shí)分秒換算

/*var?int_day?=?Math.floor(time_distance/86400000)

time_distance?-=?int_day?*?86400000;?*/

var?int_hour?=?Math.floor(time_distance/3600)

time_distance?=?time_distance?-?int_hour?*?3600;

var?int_minute?=?Math.floor(time_distance/60)

time_distance?=?time_distance?-?int_minute?*?60;

var?int_second?=?Math.floor(time_distance)

//?時(shí)分秒為單數(shù)時(shí)、前面加零

/*if(int_day?

int_day?=?"0"?+?int_day;

}?*/

if(int_hour?

int_hour?=?"0"?+?int_hour;

}

if(int_minute?

int_minute?=?"0"?+?int_minute;

}

if(int_second?

int_second?=?"0"?+?int_second;

}

return?int_hour+':'+int_minute+':'+int_second;

}

window.οnlοad=function(){

var?oStart?=?document.getElementById('start');

var?oEnd?=?document.getElementById('end');

var?oPause?=?document.getElementById('pause');

var?oSpeed?=?document.getElementById('speed');

var?oVideo?=?document.getElementById('videoSource');

//?開始函數(shù)

oStart.οnclick=function(e){

console.log(oVideo.paused);

if(oVideo.paused==true){

$('#start').text('暫停');

oVideo.play();

}else{

$('#start').text('播放');

oVideo.pause();

}

}

//?暫停函數(shù)

/*oPause.οnclick=function(){

oVideo.pause();

}?*/

//?停止函數(shù)

oEnd.οnclick=function(){

oVideo.pause();

oVideo.currentTime=0;

}

//?加速函數(shù)

oSpeed.οnclick=function(){

oVideo.play();oVideo.playbackRate?=?1.5;//注意這里速度大于4的時(shí)候,就沒有聲音了,聲音得不到同步

}

var?aa?=?test(oVideo.duration);

$("#zsc").text(aa);

//oVideo.currentTime=30;

var?i?=?0;

//?這個(gè)事件是在視頻播放中一直執(zhí)行的事件

oVideo.οntimeupdate=function(){

var?oPositionBar?=?document.getElementById('positionBar');

oPositionBar.value=?(oVideo.currentTime/oVideo.duration*100);

console.log('播放時(shí)長(zhǎng):'+oVideo.duration);

console.log('播放進(jìn)度:'+oVideo.currentTime);

var?bb?=?test(parseInt(oVideo.currentTime));

$("#dqsc").text(bb);

/*if(parseInt(oVideo.currentTime)==3?&&?i==0){

oVideo.pause();

i++;

alert("觀看超市");

location.href='http://www.baidu.com';

}*/

}

}

html jquery js 簡(jiǎn)易視頻播放器? ?快試試吧!

總結(jié)

以上是生活随笔為你收集整理的视频播放页php,html jquery简易视频播放器的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。