1. Official website
2. Install and use (Install)
1. Installation: npm install @liveqing/liveplayer
2. Edit webpack.xxx.config.js
const CopyWebpackPlugin = require('copy-webpack-plugin');
......
plugins: [
new CopyWebpackPlugin([
{ from: 'node_modules/@liveqing/liveplayer/dist/component/crossdomain.xml' },
{ from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer.swf' },
{ from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer-lib.min.js', to: 'js/' }
])
]
......
3. Introduce dependency js
Introduce in index.html:
<script src="<%= BASE_URL %>js/liveplayer-lib.min.js"></script>
4. use
......
import LivePlayer from '@liveqing/liveplayer'
......
components: {
LivePlayer
}
......
<LivePlayer :videoUrl="videoUrl" fluent autoplay live stretch></LivePlayer>