内嵌media player循环播放

问题描述

Ihavetroublewithjavascripthttps://chrome.google.com/extensions/detail/bamkbfdmckphehgiafpenehgebjgdlliIwantadd:wmp_p.settings.setMode("loop",True);butnoeffect,howtouse?

解决方案

解决方案二:
(function(){varpage_links=document.links;for(vari=0;i<page_links.length;i++){if(page_links[i].href.match(/(wmv$)|(mpg$)|(wav$)|(mkv$)|(mp4$)|(avi$)|(mpeg$)|(mlv$)|(mpe$)|(asf$)|(flv$)|(mp3$)|(flv$)|(wma$)|(ogg$)|(oga$)|(ogv$)|(aac$)/i)){varspan=document.createElement("span");vartoggle=document.createElement("a");toggle.title="togPlay"+i;toggle.innerHTML="<imgsrc='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADdgAAA3YBfdWCzAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGsSURBVDiNpZM/SyNBGMafmdsdljWXRq4QJaIHZkVsDItR7kMogoK94hUWV1x39V1xjSjBQg4/gfgZJI0QUttaBPHiJdlsloWZzLtjIRuzmHABB95i/ry/eZ73nWHGGLxnsK39/S8Afn/M5cr5fH6ipDAM0YuiWwDfLQAnRwcHpQ3fxwfOJwJQkuC2ViufX1ycWI7jlLxiEX87HSRJMhGAcw7P8+C6bskSQiCIIgzXQiqFp8dHzBUKYyExY3AcB5yIoLUGEQ2iLyXOKhVcX10h6vUye2mkORYAaK0zdK01pJS4qVZRq9exs72NldVVMMbeKLGMMSMBSikAgFIKfy4v4RWL2NvdRW6oU8aYFwVElK0yEaSUg7kQApu+j9mZGbTDMKtgnIVUwbrv4+vhIWKl0Gy3M+eMMaMtEBGmXBffjo/xeWkJrSB4432ggDEGrXWmQMK2UTk9xb8gwFOrNTIxbbtl2za63S5c1wUfeokPzebYW5MkQRzHEELAWpyfv2s0GsujWvS/sVAo3Fn+2tpPIvrR6nQWZL8/oAzjXhdZatF8mp6+55z/Yu/9zs+e29iUS1YO2wAAAABJRU5ErkJggg%3D%3D'alt='Openvideoinlineplayer'title='Openvideoinlineplayer'>";toggle.style.cursor="pointer";toggle.style.border="none";varmp3_url=page_links[i].href;varautostart="false"varwidth=640varheight=480varplayer=document.getElementById("wmp_p");//player.settings.setMode("loop",true);embed_code='<embedstyle="FILTER:xray()"type="application/x-mplayer2"id="wmp_p"src="'+mp3_url+'"width="640"height="100"ShowControls="1"ShowStatusBar="1"ShowDisplay="1"autostart="false"loop="true"/>'span.innerHTML="<br/>"span.innerHTML+=embed_code;span.style.display="none";span.id="togPlay"+i;//toggle.innerHTML=span;toggle.addEventListener("click",togglePlayer,true);page_links[i].parentNode.insertBefore(span,page_links[i].nextSibling)page_links[i].parentNode.insertBefore(toggle,page_links[i].nextSibling)}}functiontogglePlayer(event){player=document.getElementById(this.title);if(player.style.display=="none"){player.style.display="inline";this.innerHTML="<imgsrc='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHmSURBVDiNpZM9S1tRGMd/5+Tcm+RiQ1C6KnYxQkAwBKPtVPwADbUlKHQT+gW6dW6HLm4d3ApCaId8BJGSEglIwcG1Q5YOJU2MCTf3Oed2iObFFir4n87zPDz/l3M4Ko5j7gP1bHf3CfDhwdxcKZPJ3Gmp2+1y2es1gDcGOHi9v1/YLBZJaH0nAuscjWaz9PHw8MCkUqlCbmWFn+02zjkARAQAY8w/a601uVyOIAgKxvd9fvd63NyFiPC5WiWZTFIulwGo1WqEYcjLSmVM0leKVCqFsdaOFUSEL9Uq38/PR3UUAdA8OwPAWcuLKRJrLWbaohMhEiG6Xvx2ejqTPRLBiSBTPRPH8ZgAoFKp4BlDvdGYWX5cKvF8Zwd3LQQQx/HIgbV2ouIcYu3YxQ3EWsIoQt96qZkIsbXUajW+1uvcxvHJCSJCuVxGJRITB9MRPGOYz2YZDocAvNrbA+DT0REA89ksOpEgmopslFKICEoprLU83d4mHQQE6TT5tTUAgnSa/mDA5tYWgzAcqwMYz/PodDoEQYDWmksRihsbOOfoDwYArObzo9nVFcBo1u/j+z7m0dLSRavVWlVK/ZX7f1heXLwwxfX1d9bat7/a7eUwisYs03ST5ujke178cGHhh9b6vbrvd/4DZPfoqld/9XkAAAAASUVORK5CYII%3D'alt='Openvideoinlineplayer'title='Closevideoinlineplayer'>";//player.settings.setMode("loop",true);//player.settings.setMode("autoRewind",false);player.controls.play();}else{player.style.display="none";this.innerHTML="<imgsrc='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADdgAAA3YBfdWCzAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGsSURBVDiNpZM/SyNBGMafmdsdljWXRq4QJaIHZkVsDItR7kMogoK94hUWV1x39V1xjSjBQg4/gfgZJI0QUttaBPHiJdlsloWZzLtjIRuzmHABB95i/ry/eZ73nWHGGLxnsK39/S8Afn/M5cr5fH6ipDAM0YuiWwDfLQAnRwcHpQ3fxwfOJwJQkuC2ViufX1ycWI7jlLxiEX87HSRJMhGAcw7P8+C6bskSQiCIIgzXQiqFp8dHzBUKYyExY3AcB5yIoLUGEQ2iLyXOKhVcX10h6vUye2mkORYAaK0zdK01pJS4qVZRq9exs72NldVVMMbeKLGMMSMBSikAgFIKfy4v4RWL2NvdRW6oU8aYFwVElK0yEaSUg7kQApu+j9mZGbTDMKtgnIVUwbrv4+vhIWKl0Gy3M+eMMaMtEBGmXBffjo/xeWkJrSB4432ggDEGrXWmQMK2UTk9xb8gwFOrNTIxbbtl2za63S5c1wUfeokPzebYW5MkQRzHEELAWpyfv2s0GsujWvS/sVAo3Fn+2tpPIvrR6nQWZL8/oAzjXhdZatF8mp6+55z/Yu/9zs+e29iUS1YO2wAAAABJRU5ErkJggg%3D%3D'alt='Openvideoinlineplayer'title='Openvideoinlineplayer'>";player.controls.stop();}}})();

解决方案三:
上面是代码帮忙看看

时间: 2024-12-22 18:11:20

内嵌media player循环播放的相关文章

net 页面怎样内嵌media player视频窗口

页面 <script language=javascript defer> var volv=phx.settings.volume; setInterval("if(phx.playState==3){time.innerText=phx.controls.currentPositionString+'|'+ phx.currentMedia.durationString}",1000); setInterval("if(phx.playState==3){it

网页播放器的参数含义 Windows Media Player 网页播放器 参数含义_网页播放器

(默认0为否,-1或1为是)<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="286" height="225">   <param name="AudioStream" value="-1">   <param name="A

【新手求助】如何用C#程序解析.wav格式文件并用windows media player 进行播放

问题描述 万分感谢~~ 解决方案 解决方案二:mark解决方案三:送20分

网页内嵌Windows Media Player播放器的多文件播放方法

网页内嵌Media Player播放器很简单,以下代码即可完成一个简单的播放器 : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <

filename-在网页中嵌入windows media player播放器的问题

问题描述 在网页中嵌入windows media player播放器的问题 clsid为22D6F312-B0F6-11D0-94AB-0080C74C7E95,FileName属性设置为通过servlet向java后台请求的连接串(http://ip:port/ServletService?actionParames=go),java后台servlet通过ServletOutputStream将视频文件内容写到前台.每次页面调用wmp播放器的时候,servlet总是向后台请求两次,导致后台直接

在Web页面中使用Media Player

 在Web页中嵌入Media Player的方法比较简单,只要用HTML中的<Object></Object>可以了,如下所示. <OBJECT ID="WMPlay" WIDTH=320 HEIGHT=240 CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" CODEBASE=" nsmp2inf.cab#Version=6,4,5,715" STANDBY=

Win8系统 Windows Media Player入门

使用 Windows Media Player,可以播放数字媒体文件,组织数字媒体集,将喜爱的音乐刻录成 CD,从 CD 翻录音乐,将数字媒体文件同步到便携设备,以及从在线商店购买数字媒体内容. 启动 Windows Media Player 从屏幕右边缘向中间轻扫,然后点击"搜索". (如果使用鼠标,则指向屏幕右上角,然后将指针向下移动,再单击"搜索".) 在搜索框中输入"Windows Media Player",点击或单击"应用&

Windows Server 2008 R2安装windows media player的方法

大家都知道Windows Server 2008/R2系统自带Windows Media Player 11 播放器, 但默认不安装,现在把开启方法共享出来供大家参考: 1.打开"服务器管理器"; 2.依次单击"功能"→ "添加功能"; 3.勾选"桌面体验"和"优质Windows音频视频体验"; 4.单击"安装"按钮 5.安装完毕,根据提示重新启动计算机即可

VLC media player v1.1.10发布 VideoLAN计划多媒体播放器

VLC多媒体播放器(最初命名为VideoLAN客户端)是VideoLAN计划的多媒体播放器.它支持众多音频与视频解码器及文件格式,并支持DVD影音光盘,VCD影音光盘及各类流式协议.它也能作为unicast 或 multicast的流式服务器在IPv4 或 IPv6的高速网络连接下使用.它融合了FFmpeg计划的解码器与libdvdcss程序库使其有播放多媒体文件及加密DVD影碟的功能. VLC Media Player 可以播放 MPEG-1.MPEG-2.MPEG-4.DivX.DVD/VC