<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/ DTD/wml_1.1.xml">

<wml>
<head>
<meta http-equiv="cache-control" content="max-age=180,private" />
</head>
<card title="在ubuntu Linux 下通? Firefox 网?直接播放 PPStream">
<p>
作者:<a href="index.php?action=showuser&amp;userid=1&amp;hash=">fiyour</a><br />时间:2009-11-24 08:56<br />分类:<a href="index.php?action=list&amp;cid=4&amp;hash=">?件程序</a><br />内容:
http://kan.pps.tv/ 网?在?播放，效果如下


 




影院模式


 




好了，如果大家感?趣的?，?往下看：

首先，我?需要准?如下?件：

1、可以播放rmvb文件和wmv文件的totem解?器，我想大家大概都有?个。

2、totem-pps，就是那个运行在totem里的pps插件，我想?个是?不?的。安装方法?参照：http://forum.ubuntu.org.cn/viewtopic.php?f=74&amp;t=223582


3、Firefox下的Greasemonkey插件，?个是用来将客?的js代?嵌入网?的插件，非常神奇。

firefox搜索安装Greasemonkey插件 https://addons.mozilla.org/zh-CN/firefox/addon/748


4、totem-plugin，?Firefox能?使用totem。一般的Ubuntu系?都是默?安装的。

然后，在Greasemonkey里添加?个脚本就可以了：

??此?直接安装：http://userscripts.org/scripts/source/59991.user.js


最新更新??里


http://forum.ubuntu.org.cn/viewtopic.php?f=74&amp;t=232435


以下是代?：




XML/HTML代?


    // ==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(&rsquo;GmShowBig&rsquo;).value == &ldquo;影院模式&rdquo;)  

    {  

    document.getElementById(&rsquo;GmShowBlack&rsquo;).style.opacity = &ldquo;1&Prime;;  

    }  

    }  

    function GmOnMouseOut(evt)  

    {  

    if(document.getElementById(&rsquo;GmShowBig&rsquo;).value == &ldquo;影院模式&rdquo;)  

    {  

    document.getElementById(&rsquo;GmShowBlack&rsquo;).style.opacity = &ldquo;0.1&Prime;;  

    }  

    }  

    function GmOnClick(evt)  

    {  

    var t = document.getElementById(&rsquo;GmShowBlack&rsquo;);  

    if(evt.target.value == &ldquo;影院模式&rdquo;)  

    {  

    evt.target.value = &ldquo;恢?&rdquo;  

    t.style.left = &lsquo;-70px&rsquo;;  

    t.style.top = &lsquo;-200px&rsquo;;  

    t.style.width = &lsquo;1140px&rsquo;;  

    t.style.height = &lsquo;900px&rsquo;;  

    t.style.background = &lsquo;rgba(0,0,0,0.6)&rsquo;;  

      

    document.getElementById(&rsquo;GmShowPlayBorder&rsquo;).style.left = &lsquo;104px&rsquo;;  

    document.getElementById(&rsquo;GmShowPlay&rsquo;).style.width = &lsquo;712px&rsquo;;  

      

    document.getElementById(&rsquo;GmShowLeft&rsquo;).style.top = &lsquo;200px&rsquo;;  

      

    document.getElementById(&rsquo;onlineSee&rsquo;).style.display = &lsquo;none&rsquo;;  

    }  

    else  

    {  

    evt.target.value = &ldquo;影院模式&rdquo;  

    t.style.left = &lsquo;60px&rsquo;;  

    t.style.top = &lsquo;26px&rsquo;;  

    t.style.width = &lsquo;650px&rsquo;;  

    t.style.height = &lsquo;520px&rsquo;;  

    t.style.background = &lsquo;rgba(0,0,0,0.4)&rsquo;;  

      

    document.getElementById(&rsquo;GmShowPlayBorder&rsquo;).style.left = &lsquo;180px&rsquo;;  

    document.getElementById(&rsquo;GmShowPlay&rsquo;).style.width = &lsquo;500px&rsquo;;  

      

    document.getElementById(&rsquo;GmShowLeft&rsquo;).style.top = &lsquo;0px&rsquo;;  

      

    document.getElementById(&rsquo;onlineSee&rsquo;).style.display = &rdquo;;  

    }  

    }  

    function GmConOnClick(evt)  

    {  

    if(evt.target.value == &ldquo;?藏控制&rdquo;)  

    {  

    evt.target.value = &ldquo;?示控制&rdquo;  

    document.getElementById(&rsquo;GmShowPlayBorder&rsquo;).style.height = &ldquo;424px&rdquo;;  

    }  

    else  

    {  

    evt.target.value = &ldquo;?藏控制&rdquo;  

    document.getElementById(&rsquo;GmShowPlayBorder&rsquo;).style.height = &ldquo;auto&rdquo;;  

    }  

    }  

      

    var o = document.getElementById(&rsquo;showplayer&rsquo;);  

    var pps = o.innerHTML.match(/pps:\/\/.*?rmvb|pps:\/\/.*?wmv/);  

    var s = &ldquo;&lt;div id=&rsquo;GmShowBlack&rsquo; style=&rsquo;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;&rsquo;&gt;&rdquo;;  

    s += &ldquo;&lt;div id=&rsquo;GmShowLeft&rsquo; style=&rsquo;position:absolute;left:30px;width:50px;height:442px;z-index:1001;padding:190px 180px 0px 0px;&rsquo;&gt;&rdquo;;  

    s += &ldquo;&lt;input Id=&rsquo;GmShowBig&rsquo; type=&rsquo;button&rsquo; value=&rsquo;影院模式&rsquo; style=&rsquo;height:65px;width:65px;background:rgba(0,0,0,0.4);-moz-border-radius:10px;color:#FFFFFF;border:1px outset #000000;margin:10px;&rsquo;/&gt;&rdquo;;  

    s += &ldquo;&lt;input Id=&rsquo;GmShowCon&rsquo; type=&rsquo;button&rsquo; value=&rsquo;?藏控制&rsquo; style=&rsquo;height:65px;width:65px;background:rgba(0,0,0,0.4);-moz-border-radius:10px;color:#FFFFFF;border:1px outset #000000;margin:10px;&rsquo;/&gt;&rdquo;;  

    s += &ldquo;&lt;/div&gt;&lt;/div&gt;&rdquo;;  

    s += &ldquo;&lt;div id=&rsquo;GmShowPlayBorder&rsquo; style=&rsquo;position:absolute;top:64px;left:180px;z-index:1001;overflow-y:hidden;height:auto;&rsquo;&gt;&rdquo;;  

    s += &ldquo;&lt;object id=&rsquo;GmShowPlay&rsquo; data=&rsquo;&rdquo;+pps+&rdquo;&lsquo; type=&rsquo;application/x-mplayer2&prime; width=&rsquo;500&prime; height=&rsquo;451&prime; scr=&rsquo;&rdquo;+pps+&rdquo;&lsquo; ShowControls=&rsquo;true&rsquo; autostart=&rsquo;true&rsquo; ShowTracker=&rsquo;true&rsquo; style=&rsquo;z-index:1002;&rsquo;&gt;&lt;param name=&rsquo;playcount&rsquo; value=&rsquo;infinite&rsquo;&gt;&lt;/object&gt;&rdquo;;  

    s += &ldquo;&lt;/div&gt;&rdquo;;  

    o.innerHTML = s;  

      

    var g* = document.getElementById(&rsquo;GmShowLeft&rsquo;);  

    g*.addEventListener(&rdquo;mouseover&rdquo;,GmOnMouseOver,false);  

    g*.addEventListener(&rdquo;mouseout&rdquo;,GmOnMouseOut,false);  

      

    document.getElementById(&rsquo;GmShowBig&rsquo;).addEventListener(&rdquo;click&rdquo;,GmOnClick,false);  

    document.getElementById(&rsquo;GmShowCon&rsquo;).addEventListener(&rdquo;click&rdquo;,GmConOnClick,false);  





</p><p>
<a href="index.php?action=login&amp;hash=">立即登陆发表评论</a><br />
</p>
<p><a href="index.php?action=list&amp;hash=">返回日志列表</a><br /><a href="index.php?action=index&amp;hash=">返回主页</a></p>
</card>
</wml>
