手机微网站客户端微信公众平台微官网网站添加播放视频链接地址教程
发布时间:2017-09-13, 11:26:02 分类:HTML | 编辑 off 网址 | 辅助
图集1/9
正文 559字数 585,179阅读
以下以腾讯视频为例,其他视频网站类似操作打开视频播放页面
鼠标滑动/点击分享视频按钮,如上图
复制得到如下代码
<iframe frameborder="0" width="640" height="498" src="https://v.qq.com/iframe/player.html?vid=x0549hca3w8&tiny=0&auto=0" allowfullscreen></iframe>
Run code
Cut to clipboard
==新 ↓↓↓ ==在编辑器里面添加====
end
====以下旧版本修改,可不填===
复制 src="复制我" 中间部分
https://v.qq.com/iframe/player.html?vid=x0549hca3w8&tiny=0&auto=0
Run code
Cut to clipboard
以上部分就是需要复制的代码,粘贴到后台编辑器的视频链接输入框即可
(支付宝)给作者钱财以资鼓励 (微信)→
有过 5 条评论 »
1.用浏览器打开公众号文章,在空白处点击右键 点击查找网页源代码
进入源代码页面后 Ctrl+f 右上角小框 在小框内输入 v.qq.vom 找到视频的网址 将https-----; 这段网址进行复制
复制网址之后粘贴到记事本中
记视频链接一
2.进入腾讯视频 随便打开一个视频 复制这个视频的链接地址
将随便找的视频地址复制到记事本中
记视频链接2
将 视频链接一 的 vid=**** 和 视频链接2 的 vid=**** 进行替换 得到一个新的链接地址(记视频链接三)
将替换后的新地址(记视频链接三)在浏览器中打开 在视频播放器底部分享处复制引用iframe框架html网址链接即可 按上面教程
<iframe class="video_iframe js_asyningdom wx_video_iframe" data-vidtype="2" allowfullscreen="" frameborder="0" width="556" height="auto" src="https://v.qq.com/iframe/preview.html?vid=f1321gelc26&width=556&height=auto&auto=0"></iframe>
<?php namespace Addons\WeiSite\Controller; use Addons\WeiSite\Controller\BaseController; class CmsController extends BaseController { var $model; function _initialize() { $this->model = $this->getModel ( 'custom_reply_news' ); parent::_initialize (); } // 通用插件的列表模型 public function lists() { // 使用提示 $normal_tips = '文章的数据来源官方自定义回复插件中的图文回复,如有异常请确认自定义回复插件是否已经安装'; $this->assign ( 'normal_tips', $normal_tips ); $map ['token'] = get_token (); session ( 'common_condition', $map ); $list_data = $this->_get_model_list ( $this->model ); // 分类数据 $map ['is_show'] = 1; $list = M ( 'weisite_category' )->where ( $map )->field ( 'id,title' )->select (); $cate [0] = ''; foreach ( $list as $vo ) { $cate [$vo ['id']] = $vo ['title']; } foreach ( $list_data ['list_data'] as &$vo ) { $vo ['cate_id'] = intval ( $vo ['cate_id'] ); $vo ['cate_id'] = $cate [$vo ['cate_id']]; } $this->assign ( $list_data ); // dump ( $list_data ); $templateFile = $this->model ['template_list'] ? $this->model ['template_list'] : ''; $this->display ( $templateFile ); } // 通用插件的编辑模型 public function edit() { $model = $this->model; $id = I ( 'id' ); if (IS_POST) { //dump($_POST);exit; $_POST['content']=str_ireplace('<iframe src="','#iframesrc#',$_POST['content']); $_POST['content']=str_ireplace('" width="100%" height="300" scrolling="no" frameborder="0"></iframe>','#/iframesrc#',$_POST['content']); $Model = D ( parse_name ( get_table_name ( $model ['id'] ), 1 ) ); // 获取模型的字段信息 $Model = $this->checkAttr ( $Model, $model ['id'] ); if ($Model->create () && $Model->save ()) { D ( 'Common/Keyword' )->set ( $_POST ['keyword'], _ADDONS, $id, $_POST ['keyword_type'], 'custom_reply_news' ); $this->success ( '保存' . $model ['title'] . '成功!', U ( 'lists?model=' . $model ['name'] ) ); } else { $this->error ( $Model->getError () ); } } else { $fields = get_model_attribute ( $model ['id'] ); $extra = $this->getCateData (); if (! empty ( $extra )) { foreach ( $fields [1] as &$vo ) { if ($vo ['name'] == 'cate_id') { $vo ['extra'] .= "\r\n" . $extra; } } } // 获取数据 $data = M ( get_table_name ( $model ['id'] ) )->find ( $id ); $data || $this->error ( '数据不存在!' ); $token = get_token (); if (isset ( $data ['token'] ) && $token != $data ['token'] && defined ( 'ADDON_PUBLIC_PATH' )) { $this->error ( '非法访问!' ); } $this->assign ( 'fields', $fields ); $data['content']=str_ireplace('#iframesrc#','<iframe src="',$data['content']); $data['content']=str_ireplace('#/iframesrc#','" width="100%" height="300" scrolling="no" frameborder="0"></iframe>',$data['content']); $this->assign ( 'data', $data ); //dump($data);exit; $this->meta_title = '编辑' . $model ['title']; $this->display (); } } // 通用插件的增加模型 public function add() { $model = $this->model; $Model = D ( parse_name ( get_table_name ( $model ['id'] ), 1 ) ); if (IS_POST) { // 获取模型的字段信息 $Model = $this->checkAttr ( $Model, $model ['id'] ); if ($Model->create () && $id = $Model->add ()) { D ( 'Common/Keyword' )->set ( $_POST ['keyword'], _ADDONS, $id, $_POST ['keyword_type'], 'custom_reply_news' ); $this->success ( '添加' . $model ['title'] . '成功!', U ( 'lists?model=' . $model ['name'] ) ); } else { $this->error ( $Model->getError () ); } } else { $fields = get_model_attribute ( $model ['id'] ); $extra = $this->getCateData (); if (! empty ( $extra )) { foreach ( $fields [1] as &$vo ) { if ($vo ['name'] == 'cate_id') { $vo ['extra'] .= "\r\n" . $extra; } } } $this->assign ( 'fields', $fields ); $this->meta_title = '新增' . $model ['title']; $this->display (); } } // 通用插件的删除模型 public function del() { parent::common_del ( $this->model ); } // 获取所属分类 function getCateData() { //$map ['is_show'] = 1; $map ['token'] = get_token (); $list = M ( 'weisite_category' )->where ( $map )->select (); foreach ( $list as $v ) { $extra .= $v ['id'] . ':' . $v ['title'] . "\r\n"; } return $extra; } }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <script type="text/javascript" src="../internal.js"></script> <style type="text/css"> .warp {width: 320px;height: 153px;margin-left:5px;padding: 20px 0 0 15px;position: relative;} #url {width: 290px; margin-bottom: 2px; margin-left: -6px; margin-left: -2px\9;*margin-left:0;_margin-left:0; } .format span{display: inline-block; width: 58px;text-align: center; zoom:1;} table td{padding:5px 0;} #align{width: 65px;height: 23px;line-height: 22px;} </style> </head> <body> <div class="warp"> <table width="300" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" class="format"> <span style=" width: auto; ">填写复制通用代码</span><!-- <var id="lang_input_address"></var> --> <!-- <input style="width:200px" id="url" type="text" value=""/> --> <textarea style=" width: 100%; height: 119px; " id="url" ></textarea> </td> </tr> <tr style="display:none;"> <td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px" type="text" id="width"/> px</td> </tr> <tr style="display:none;"> <td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px" type="text" id="height"/> px</td> </tr> <tr style="display:none;"> <td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/> </td> <td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/> </td> </tr> <tr style="display:none;"> <td colspan="2"><span><var id="lang_input_alignMode"></var></span> <select id="align"> <option value=""></option> <option value="left"></option> <option value="right"></option> </select> </td> </tr> </table> </div> <script type="text/javascript"> var iframe = editor._iframe; if(iframe){ $G("url").value = iframe.getAttribute("src")||""; var str = $G("url").value; $G("url").value = (str.match(/<iframe .*?src=\"(.+?)\"/)[1]); $G("width").value = iframe.getAttribute("width")||iframe.style.width.replace("px","")||""; $G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px","") ||""; $G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false; $G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false; $G("align").value = iframe.align ? iframe.align : ""; } function queding(){ var url = ($G("url").value.match(/<iframe .*?src=\"(.+?)\"/)[1]),//$G("url").value.replace(/^\s*|\s*$/ig,""), width = '100%',//$G("width").value, height = '300',//$G("height").value, scroll = $G("scroll"), frameborder = $G("frameborder"), //float = $G("align").value, newIframe = editor.document.createElement("iframe"), div; if(!url){ alert(lang.enterAddress); return false; } newIframe.setAttribute("src",/http:\/\/|https:\/\//ig.test(url) ? url : "http://"+url); // /^[1-9]+[.]?\d*$/g.test( width ) ? newIframe.setAttribute("width",width) : ""; newIframe.setAttribute("width",width); // /^[1-9]+[.]?\d*$/g.test( height ) ? newIframe.setAttribute("height",height) : ""; newIframe.setAttribute("height",height) scroll.checked ? newIframe.setAttribute("scrolling","yes") : newIframe.setAttribute("scrolling","no"); frameborder.checked ? newIframe.setAttribute("frameborder","1",0) : newIframe.setAttribute("frameborder","0",0); //float ? newIframe.setAttribute("align",float) : newIframe.setAttribute("align",""); if(iframe){ iframe.parentNode.insertBefore(newIframe,iframe); domUtils.remove(iframe); }else{ div = editor.document.createElement("div"); div.appendChild(newIframe); editor.execCommand("inserthtml",div.innerHTML); } editor._iframe = null; dialog.close(); } dialog.onok = queding; $G("url").onkeydown = function(evt){ evt = evt || event; if(evt.keyCode == 13){ queding(); } }; $focus($G( "url" )); </script> </body> </html>
//获取视频数据的地址 ,getMovieUrl:URL+"php/getMovie.php" //视频数据获取地址 //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义 , toolbars: [["fullscreen","source","undo","redo","insertunorderedlist","insertorderedlist","unlink","link","cleardoc","selectall","print","searchreplace","preview","help","insertimage","snapscreen","emotion","horizontal","anchor","spechars","blockquote","insertcode","bold","italic","underline","strikethrough","forecolor","backcolor","superscript","subscript","justifyleft","justifycenter","justifyright","justifyjustify","touppercase","tolowercase","directionalityltr","directionalityrtl","indent","removeformat","formatmatch","autotypeset","customstyle","paragraph","rowspacingbottom","rowspacingtop","lineheight","fontfamily","fontsize","imagenone","imageleft","imageright","imagecenter","inserttable","deletetable","mergeright","mergedown","splittorows","splittocols","splittocells","mergecells","insertcol","insertrow","deletecol","deleterow","insertparagraphbeforetable","insertframe"]] //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
<script> var str = '<iframe frameborder="0" width="640" height="498" src="https://v.qq.com/iframe/player.html?vid=b0516dp12du&tiny=0&auto=0" allowfullscreen></iframe>'; alert(str.match(/<iframe .*?src=\"(.+?)\"/)[1]);</script>