http://kan.pps.tv/ 网页在线播放,效果如下
影院模式
好了,如果大家感兴趣的话,请往下看:
首先,我们需要准备如下软件:
1、可以播放rmvb文件和wmv文件的totem解码器,我想大家大概都有这个。
2、totem-pps,就是那个运行在totem里的pps插件,我想这个是绕不开的。安装方法请参照:
3、Firefox下的Greasemonkey插件,这个是用来将客户的js代码嵌入网页的插件,非常神奇。
firefox搜索安装Greasemonkey插件
4、totem-plugin,让Firefox能够使用totem。一般的Ubuntu系统都是默认安装的。
然后,在Greasemonkey里添加这个脚本就可以了:
单击此处直接安装:
{zx1}更新见这里
以下是代码:
// ==UserScript==
// @name? ? ? ? ? ?PPS for Firefox
// @namespace? ? ? liu.wanfang@gmail.com
// @description? ? pps for firefox in the totem-pps
// @include? ? ? ? http://kan.pps.tv/play/*
// ==/UserScript==function GmOnMouseOver(evt)
{
if(document.getElementById(‘GmShowBig’).value == “影院模式”)
{
document.getElementById(‘GmShowBlack’).style.opacity = “1″;
}
}
function GmOnMouseOut(evt)
{
if(document.getElementById(‘GmShowBig’).value == “影院模式”)
{
document.getElementById(‘GmShowBlack’).style.opacity = “0.1″;
}
}
function GmOnClick(evt)
{
var t = document.getElementById(‘GmShowBlack’);
if(evt.target.value == “影院模式”)
{
evt.target.value = “恢复”
t.style.left = ‘-70px’;
t.style.top = ‘-200px’;
t.style.width = ‘1140px’;
t.style.height = ‘900px’;
t.style.background = ‘rgba(0,0,0,0.6)’;
document.getElementById(‘GmShowPlayBorder’).style.left = ‘104px’;
document.getElementById(‘GmShowPlay’).style.width = ‘712px’;document.getElementById(‘GmShowLeft’).style.top = ‘200px’;
document.getElementById(‘onlineSee’).style.display = ‘none’;
}
else
{
evt.target.value = “影院模式”
t.style.left = ‘60px’;
t.style.top = ‘26px’;
t.style.width = ‘650px’;
t.style.height = ‘520px’;
t.style.background = ‘rgba(0,0,0,0.4)’;document.getElementById(‘GmShowPlayBorder’).style.left = ‘180px’;
document.getElementById(‘GmShowPlay’).style.width = ‘500px’;document.getElementById(‘GmShowLeft’).style.top = ‘0px’;
document.getElementById(‘onlineSee’).style.display = ”;
}
}
function GmConOnClick(evt)
{
if(evt.target.value == “隐藏控制”)
{
evt.target.value = “显示控制”
document.getElementById(‘GmShowPlayBorder’).style.height = “424px”;
}
else
{
evt.target.value = “隐藏控制”
document.getElementById(‘GmShowPlayBorder’).style.height = “auto”;
}
}var o = document.getElementById(’showplayer’);
var pps = o.innerHTML.match(/pps:\/\/.*?rmvb|pps:\/\/.*?wmv/);
var s = “<div id=’GmShowBlack’ style=’position:absolute;top:26px;left:60px;-moz-border-radius:40px;width:650px;height:534px;background:rgba(0,0,0,0.4);z-index:1000;opacity:0.1;’>”;
s += “<div id=’GmShowLeft’ style=’position:absolute;left:30px;width:50px;height:442px;z-index:1001;padding:190px 180px 0px 0px;’>”;
s += “<input Id=’GmShowBig’ type=’button’ value=’影院模式’ style=’height:65px;width:65px;background:rgba(0,0,0,0.4);-moz-border-radius:10px;color:#FFFFFF;border:1px outset #000000;margin:10px;’/>”;
s += “<input Id=’GmShowCon’ type=’button’ value=’隐藏控制’ style=’height:65px;width:65px;background:rgba(0,0,0,0.4);-moz-border-radius:10px;color:#FFFFFF;border:1px outset #000000;margin:10px;’/>”;
s += “</div></div>”;
s += “<div id=’GmShowPlayBorder’ style=’position:absolute;top:64px;left:180px;z-index:1001;overflow-y:hidden;height:auto;’>”;
s += “<object id=’GmShowPlay’ data=’”+pps+”‘ type=’application/x-mplayer2′ width=’500′ height=’451′ scr=’”+pps+”‘ ShowControls=’true’ autostart=’true’ ShowTracker=’true’ style=’z-index:1002;’><param name=’playcount’ value=’infinite’></object>”;
s += “</div>”;
o.innerHTML = s;var gsb = document.getElementById(‘GmShowLeft’);
gsb.addEventListener(“mouseover”,GmOnMouseOver,false);
gsb.addEventListener(“mouseout”,GmOnMouseOut,false);document.getElementById(‘GmShowBig’).addEventListener(“click”,GmOnClick,false);
document.getElementById(‘GmShowCon’).addEventListener(“click”,GmConOnClick,false);
文章的脚注信息由WordPress的自动生成