vue-video7

1.0.3 • Public • Published

vue-video7 播放器

NPM version GitHub stars GitHub issues GitHub forks

  • 😊 基于 Vue + video.js 7 开发;
  • 😂 支持现代浏览器;
  • 😂 不支持FLV, flv请用基于flv.js的控件;

NPM/YARN安装

npm i vue-video7 --save
yarn add vue-video7

使用

全局使用

// main.js
import Vue from 'vue'
import App from './App.vue'

import VideoPlayer from 'vue-video7'
Vue.use(VideoPlayer)
<template>
  <div id="app">
    <video-player :autoplay="true" :controls="true" :muted="true" ref="myPlayer" :sources="sources" />
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      sources: ["http://vjs.zencdn.net/v/oceans.mp4"]
    };
  }
};
</script>

局部使用

<template>
  <div id="app">
    <vue-video7 :autoplay="true" :controls="true" :muted="true" ref="myPlayer" :sources="sources" />
  </div>
</template>

<script>
import VideoPlayer from 'vue-video7'

export default {
  name: 'App',
  components: {
    VideoPlayer,
  },
  data() {
    return {
      sources: ["http://vjs.zencdn.net/v/oceans.mp4"]
    };
  }
};
</script>

Package Sidebar

Install

npm i vue-video7

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

5.02 MB

Total Files

9

Last publish

Collaborators

  • stayknight