H5 ビデオ プレーヤー (livePlayer.js)

1.公式サイト

LivePlayer H5播放器 |

2.インストールして使用する(インストール)

1. インストール: npm install @liveqing/liveplayer

2.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.依存関係jsを導入する

Index.html に以下を導入します。

  <script src="<%= BASE_URL %>js/liveplayer-lib.min.js"></script>

4.使用する

......

import LivePlayer from '@liveqing/liveplayer'

......
  components: {
    LivePlayer
  }
......

<LivePlayer :videoUrl="videoUrl" fluent autoplay live stretch></LivePlayer>

おすすめ

転載: blog.csdn.net/weixin_51258044/article/details/130638397