Vue + videojs play rtmp / flvビデオタイプ



Vue Videojs Play Rtmp Flv Video Type



HTML

JS



npm install --save videojs-flash npm install video.js // need to install import videojs from 'video.js' import 'video.js/dist/video-js.css' import 'vue-video-player/src/custom-theme.css' import 'videojs-flash' // vue mount hook function // can not be created hook function, dom node does not completely mounted. ID can not be found mounted() { // Google browser to specialized flash player to open, view, and package code to run after the need to re-set the flash to allow state // set the flash path for discovering videojs browser does not support HTML5 player automatically when evoking flash player videojs.options.flash.swf = 'https://cdn.bootcss.com/videojs-swf/5.4.1/video-js.swf' var player = videojs ( 'my-player') // my-player video element for the page id player.play () // Play }