WordPress上好用又免费的视频链接插件Smartideo。
因为代码已有2年未更新,对腾讯视频解析依旧输出早已过时的FLASH链接,当然是无法播放的了。
我们来升级一下代码,找到插件目录“wp-content/plugins/smartideo/”下的smartideo.php:
“public function smartideo_embed_handler_qq( $matches, $attr, $url, $rawattr ) {
$matches[‘video_id’] = $matches[‘video_id1’] == ” ? $matches[‘video_id2’] : $matches[‘video_id1’];
$embed = $this->get_iframe(“//v.qq.com/iframe/player.html?vid={$matches[‘video_id’]}&auto=0”, $url);
return apply_filters( ’embed_qq’, $embed, $matches, $attr, $url, $rawattr );
}”
将解析输出“//v.qq.com/iframe/player.html”,替换为“//v.qq.com/txp/iframe/player.html”,保存文件。如果有缓存或者CDN还需要刷新一下,搞定!