做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

Vue 瑩石攝像頭直播視頻實例代碼

來源:懂視網 責編:小采 時間:2020-11-27 22:08:42
文檔

Vue 瑩石攝像頭直播視頻實例代碼

Vue 瑩石攝像頭直播視頻實例代碼:Vue 瑩石攝像頭直播視頻代碼。 HTML代碼: <div class=mainClass v-show=rtmp_url!=''> <video id=myPlayer controls playsinline webkit-playsinline autoplay> <source type=
推薦度:
導讀Vue 瑩石攝像頭直播視頻實例代碼:Vue 瑩石攝像頭直播視頻代碼。 HTML代碼: <div class=mainClass v-show=rtmp_url!=''> <video id=myPlayer controls playsinline webkit-playsinline autoplay> <source type=

Vue 瑩石攝像頭直播視頻代碼。

HTML代碼:

<div class="mainClass" v-show="rtmp_url!=''">
 <video id="myPlayer" controls playsinline webkit-playsinline autoplay>
 <source type="application/x-mpegURL" :src="http_url"/>
 <source :src="rtmp_url"/>
 </video> 
</div>

直播地址是調用接口獲取的。

<script>
export default {
 data(){
 return{
 player:"",
 rtmp_url:"",
 http_url:"",
 message:'加載中...',
 }
 },
 mounted(){ 
 this.GetLiveUrl();
 },
 methods:{
 GetLiveUrl(){
 //異步獲取直播地址,并賦值給rtmp_url,http_url
 }
 },
 updated() {
 if(this.rtmp_url!=""){
 //如果在mounted中聲明,直播地址還未取到,導致視頻不顯示。所以放在了這里
 this.player = new EZUIPlayer('myPlayer'); 
 }
 }
}
</script>

補充:vue H5項目調用手機攝像頭錄像并上傳

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
 <meta http-equiv="X-UA-Compatible" content="ie=edge">
 <title>上傳文件</title>
 <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
 <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
 <style>
 input.file 
 {
 position: relative;
 -moz-opacity:0 ;
 filter:alpha(opacity: 0);
 opacity: 0;
 z-index: 2;
 } 
 .wrapper{
 color: #fff;
 background-color: #31b0d5;
 border-color: #269abc;
 margin-top: 5px;
 margin-bottom: 5px;
 display: inline-block;
 padding: 6px 12px;
 margin-bottom: 0;
 font-size: 14px;
 font-weight: 400;
 line-height: 1.42857143;
 text-align: center;
 white-space: nowrap;
 vertical-align: middle;
 -ms-touch-action: manipulation;
 touch-action: manipulation;
 cursor: pointer;
 -webkit-user-select: none;
 -moz-user-select: none;
 -ms-user-select: none;
 user-select: none;
 background-image: none;
 border: 1px solid transparent;
 border-radius: 4px;
 }
 </style>
</head>
<body>
 <div id="app" v-cloak>
 <h4>上傳視頻demo</h4>
 <div>
 <span type="primary" class="wrapper">
 <label class="btn" for="fileUpload">上傳視頻demo</label>
 </span>
 <input type="file" accept="video/*" id="fileUpload" style="position:absolute; clip:rect(0 0 0 0);" @change="uploadVideo($event)">
 </div>
 </div>
 <script>
 var app = new Vue({
 el: '#app',
 data: {
 },
 methods: {
 uploadVideo(e) {
 //e.target.value文件名
 var file = e.target.files[0];
 var formdata = new FormData();
 formdata.append('fileStream', file);
 console.log('正在上傳視頻...')
 this.doUpload(formdata);
 },
 doUpload(formdata) {
 axios.post('/teacher/doUpload', formdata).then(res => {
 if (res.data.success) {
 console.log('上傳成功');
 } else {
 console.log('上傳失敗');
 }
 }).catch(err => {
 console.log(err);
 })
 }
 }
 });
 </script>
</body>
</html>

總結

以上所述是小編給大家介紹的Vue 瑩石攝像頭直播視頻實例代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

Vue 瑩石攝像頭直播視頻實例代碼

Vue 瑩石攝像頭直播視頻實例代碼:Vue 瑩石攝像頭直播視頻代碼。 HTML代碼: <div class=mainClass v-show=rtmp_url!=''> <video id=myPlayer controls playsinline webkit-playsinline autoplay> <source type=
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 建昌县| 曲阜市| 桦南县| 贵南县| 边坝县| 惠东县| 黑河市| 抚顺县| 和平县| 武山县| 旌德县| 汉中市| 承德市| 陈巴尔虎旗| 宾阳县| 稻城县| 财经| 收藏| 富蕴县| 永昌县| 金沙县| 德钦县| 墨脱县| 曲靖市| 永靖县| 惠水县| 兖州市| 巴林右旗| 乌兰察布市| 山西省| 故城县| 屏山县| 金沙县| 定远县| 乌兰察布市| 宁晋县| 英吉沙县| 且末县| 德江县| 丹江口市| 沁源县|