ubuntu9.10 totem-pps totem看網路電視
sudo vi /etc/sources.list 加入:
deb http://ppa.launchpad.net/portis25/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/portis25/ppa/ubuntu karmic main
sudo apt-get update
sudo install totem-pps iuchuang@lenovo-thinkpad:~$ sudo apt-get install totem-pps
正在讀取軟體包清單… 完成
正在分析軟體包的依賴關系樹
正在讀取狀態資訊… 完成
將會安裝下列額外的軟體包:
gst-plugins-pps libpps libppswrapper
下列【新】軟體包將被安裝:
gst-plugins-pps libpps libppswrapper totem-pps
共升級了 0 個軟體包,新安裝了 4 個軟體包,要卸載 0 個軟體包,有 4 個軟體未被升級。
需要下載 1,023kB 的軟體包。
解壓縮后會消耗掉 2,867kB 的額外空間。
您希望繼續執行嗎?[Y/n]y
【警告】:下列的軟體包不能通過驗證!
libpps libppswrapper gst-plugins-pps totem-pps
不經驗證就安裝這些軟體包么?[y/N] y
取得:4 http://ppa.launchpad.net karmic/main totem-pps 0.0.18-0.1 [68.0kB]
下載 1,023kB,耗時 8 秒 (120kB/s)
選中了曾被取消選擇的軟體包 libpps。
(正在讀取資料庫 … 系統目前總計安裝有 124820 個檔案和目錄。)
正在解壓縮 libpps (從 …/libpps_0.1.940-0_i386.deb) …
選中了曾被取消選擇的軟體包 libppswrapper。
正在解壓縮 libppswrapper (從 …/libppswrapper_0.0.18.1-0_i386.deb) …
選中了曾被取消選擇的軟體包 gst-plugins-pps。
正在解壓縮 gst-plugins-pps (從 …/gst-plugins-pps_0.0.18-0_i386.deb) …
選中了曾被取消選擇的軟體包 totem-pps。
正在設定 totem-pps (0.0.18-0.1) …
正在處理用于 libc-bin 的觸發器…
ldconfig deferred processing now taking place
liuchuang@lenovo-thinkpad:~$
使用方法:
totem—>編輯—>外掛程式–>ppstream
8.04需在編輯->外掛程式->PPStream 首選項裡啟用兼容舊的 totem
Firefox下看PPS線上電視
Firefox下的Greasemonkey外掛程式,這個是用來將客戶的js代碼嵌入網頁的外掛程式,非常神奇。
totem-plugin,讓Firefox能夠使用totem。一般的Ubuntu系統都是預設安裝的。
然后,在Greasemonkey裡增加這個腳本就可以了:
單擊此處直接安裝:
// ==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.opaci ty = “1″;
}
}
function GmOnMouseOut(evt)
{
if(document.getElementById(’GmShowBig’).value == “影院模式”)
{
document.getElementById(’GmShowBlack’).style.opaci ty = “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-b order-radius:40px;width:650px;height:534px;backgrou nd:rgba(0,0,0,0.4);z-index:1000;opacity:0.1;’>”;
s += “<div id=’GmShowLeft’ style=’position:absolute;left:30px;width:50px;heig ht: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-ind ex: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 g* = document.getElementById(’GmShowLeft’);
g*.addEventListener(”mouseover”,GmOnMouseOver,fals e);
g*.addEventListener(”mouseout”,GmOnMouseOut,false) ;
document.getElementById(’GmShowBig’).addEventListe ner(”click”,GmOnClick,false);
document.getElementById(’GmShowCon’).addEventListe ner(”click”,GmConOnClick,false);