Skip to content

Commit

Permalink
新增 支持YouTube
Browse files Browse the repository at this point in the history
优化 移除土豆网
  • Loading branch information
nothingisover committed Jun 9, 2017
1 parent 1042108 commit eb3a5b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ public static function parseCallback($matches){
'http://www.wasu.cn/Play/iframe/id/{video_id}',
),
'www.youtube.com' => array(
'#https?://www\.youtube\.com/watch?v=(?<video_id>[a-z0-9_=\-]+)#i',
'#https?://www\.youtube\.com/watch\?v=(?<video_id>[a-z0-9_=\-]+)#i',
'https://www.youtube.com/embed/{video_id}',
'https://www.youtube.com/watch?v={video_id}',
'https://www.youtube.com/embed/{video_id}?ecver=1',
),
'www.bilibili.com' => array(
'#https?://www\.bilibili\.com/video/av(?<video_id>\d+)#i',
Expand Down Expand Up @@ -151,7 +151,7 @@ public static function parseCallback($matches){
$height = '110px';
$_SERVER['HTTP_USER_AGENT'] = 'iphone';
}
if(self::isMobile()){
if(self::isMobile() || $site == 'www.youtube.com'){
if(in_array($site, $no_html5)){
$html = sprintf(
'<div style="width: %2$s; height: %3$spx; overflow: hidden; position: relative;">
Expand Down

0 comments on commit eb3a5b5

Please # to comment.