微信同层播放短代码:
腾讯视频短代码:
[qq-video vids=视频ID]
腾讯去广告视频安装方法:
腾讯去广告视频功能需要将以下代码添加到主题页的functions/functions.php
function v_qq_video($atts, $content=null) {
extract(shortcode_atts(array("vids" => ''), $atts));
$url = 'https://vv.video.qq.com/getinfo?vids='.$vids.'&platform=101001&charge=0&otype=json';
$json = file_get_contents($url);
preg_match('/^QZOutputJson=(.*?);$/',$json,$json2);
$tempStr = json_decode($json2[1],true);
$vurl = 'https://ugcws.video.gtimg.com/'.$tempStr['vl']['vi'][0]['fn']."?vkey=".$tempStr['vl']['vi'][0]['fvkey'];
$video = '';
return $video;
}
add_shortcode('qq-video', 'v_qq_video');