type: "video/mp4",src: require("../assets/Index/video1.mp4"), //视频url地址 },],poster: require("../assets/Index/video01.png"), //你的封面地址 // width: document.documentElement.clientWidth,notSupportedMessage: "此视频暂
type:"video/mp4", src:"/video/video2.mp4"//url地址}, ], }, 注意这里的url对应的路径是 5、完整示例代码 <template> <el-dialog title="视频监控":visible.sync="videoOpen"width="800px"height="600px"append-to-body @close="videoClose"class="video_box"> <!--视频窗口展示--> <div id="...
{ sources: [ { type: 'video/mp4', src: 'path/to/video.mp4' }, { type: 'video/webm', src: 'path/to/video.webm' }, { type: 'video/ogg', src: 'path/to/video.ogg' } ], controls: true, autoplay: false, preload: 'auto' }); return { playerOptions }; } }); </...
type:'video/mp4',//类型src: 'https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4',//url地址,若为后端返回,需为文件流}, ], poster:'',//封面地址,不设置会默认第一帧为封面notSupportedMessage: '此视频暂无法播放,请稍后再试',//允许覆盖Video.js无法播放媒体...
{ type: 'application/x-mpegURL', src: "http://video.com/newhls/live3/index.m3u8", }, ], autoplay: true, muted: true, language: 'zh-CN', // fluid: true, controls: true, notSupportedMessage: '此视频暂无法播放,请稍后再试', controlBar: { timeDivider: false, durationDisplay: false,...
sources要指定type为application/x-mpegURL 代码如下: <template> <section> <video-player :options="options"></video-player> </section> </template> <script> import { videoPlayer } from 'vue-video-player' import videojs from 'video.js'
sources: [{src: '', // 路径type: 'video/mp4' // 类型}],poster: "", // 封面地址notSupportedMessage: '此视频暂无法播放,请稍后再试', // 允许覆盖 Video.js 无法播放媒体源时显示的默认信息。controlBar: {timeDivider: true, // 时间分割线durationDisplay: true, // 总时间remainingTimeDisplay...
sources: [{type: "",src: "https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4", //url地址},],poster: "", //你的封面地址// width: document.documentElement.clientWidth,notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体...
type :"", src :'http://www.html5videoplayer.net/videos/madagascar3.mp4'//url地址} ], poster :"",//你的封面地址// width: document.documentElement.clientWidth,notSupportedMessage :'此视频暂无法播放,请稍后再试',//允许覆盖Video.js无法播放媒体源时显示的默认信息。controlBar : { ...
type: "video/mp4", src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4' }] }, ] } }, computed: { player() { return this.$refs.videoPlayer.player; // 获取视频播放器对象 }, }, mounted() { }, methods: { onChange(index) { ...