一、播放器選型
-
video.js
video.js是一個比較完整和成熟的播放器框架,包含了整套的UI、彈幕、快捷鍵、清晰度切換等外掛功能,無論用來做點播還是直播都是非常合適的。
-
hls.js
hls.js是非常小巧的適合於hls型別的直播和點播
-
flv.js
flv.js是B站開源的flv格式的播放器,適合於flv型別的直播
二、開發
1.全域性安裝eslint
npm install eslint -g
2.開發目錄下初始化一個package.json
npm init
3.配置eslint
eslint --init
配置選項如下:
? How would you like to configure ESLint? Use a popular style guide
? Which style guide do you want to follow? Standard (https://github.com/standard/standard)
? What format do you want your config file to be in? JavaScript
Checking peerDependencies of eslint-config-standard@latest
Local ESLint installation not found.
The config that you`ve selected requires the following dependencies:
eslint-config-standard@latest eslint@>=5.0.0 eslint-plugin-import@>=2.13.0 eslint-plugin-node@>=7.0.0 eslint-plugin-promise@>=4.0.0 eslint-plugin-standard@>=4.0.0
? Would you like to install them now with npm? Yes
如果安裝後出現警告說eslint-config-standard需要一個大於等於某個版本號的eslint,但是沒有安裝的,需要手動安裝:
npm install eslint@>=版本號