php player baidu,BaiduPlayer.php
/**
* BaiduPlayer.php
*
* @author Di Zhang
*/
require(dirname(__FILE__).'/BasePlayer.php');
/**
* Class BaiduPlayer
*
* 百度影音播放器
*
* @property $url string 視頻地址,如:bdhd://301568740|FCDAC749BD2BB0C009A32ABB4AF428D7|宮鎖心玉01.rmvb
*/
class BaiduPlayer extends BasePlayer
{
/**
* @var array 播放器選項,參數(shù)見:{@link http://player.baidu.com/diaoyongnew.html}
*/
public $options = array(
'time' => 0, // 緩沖廣告展示時間(如果設(shè)為0,則根據(jù)緩沖進度自動控制廣告展示時間)
'buffer' => 'http://player.baidu.com/lib/show.html?buffer', // 貼片廣告網(wǎng)頁地址
'pause' => 'http://player.baidu.com/lib/show.html?pause', // 暫停廣告網(wǎng)頁地址
'end' => 'http://player.baidu.com/lib/show.html?end', // 影片播放完成后加載的廣告
'download' => 'http://player.baidu.com/yingyin.html', // 播放器下載地址
'tn' => '12345678', // 播放器下載地址渠道號
'width' => 800, // 播放器寬度(只能為數(shù)字)
'height' => 550, // 播放器高度(只能為數(shù)字)
'showclient' => 1, // 是否顯示拉起拖盤按鈕(1為顯示 0為隱藏)
'url' => '', // 當(dāng)前播放任務(wù)播放地址
'nextcacheurl' => '', // 下一集播放地址(沒有請留空)
'lastwebpage' => '', // 上一集網(wǎng)頁地址(沒有請留空)
'nextwebpage' => '', // 下一集網(wǎng)頁地址(沒有請留空)
);
public function init()
{
parent::init();
$this->options['url'] = $this->url;
$options = array();
foreach ($this->options as $key => $value) {
if (is_int($value)) {
$options[] = "BdPlayer['{$key}']={$value}";
} else {
$options[] = "BdPlayer['{$key}']='{$value}'";
}
}
$optionsString = implode("\n", $options);
echo <<
var BdPlayer = new Array();
{$optionsString}
EOF
;
}
public function run()
{
echo '';
}
}
一鍵復(fù)制
編輯
Web IDE
原始數(shù)據(jù)
按行查看
歷史
總結(jié)
以上是生活随笔為你收集整理的php player baidu,BaiduPlayer.php的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 考研复试—软件工程(一)
- 下一篇: PHP获取十月九号星期几,php日期获取