├── demo ├── assets │ └── logo.png ├── public │ └── favicon.ico ├── main.js └── App.vue ├── .gitmodules ├── src ├── styles │ ├── icon │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ ├── iconfont.woff2 │ │ ├── index.css │ │ └── iconfont.css │ ├── keyframes.scss │ ├── flex.scss │ ├── popover.scss │ └── index.scss ├── directives │ └── drag.js ├── index.js ├── utils │ ├── drag │ │ ├── style.css │ │ └── index.js │ └── uuid.js ├── components │ ├── loading.vue │ ├── toolbar.vue │ └── contextmenu.vue ├── multipath-player.vue └── player.vue ├── .npmignore ├── server ├── type.d.ts ├── README.md ├── index.js └── stream-channel.js ├── .gitignore ├── index.html ├── .eslintrc.js ├── jsconfig.json ├── LICENSE ├── .prettierrc.js ├── vite.demo.config.js ├── package-dev.json ├── package.json ├── vite.config.js ├── 更新日志.md └── README.md /demo/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vCloudSail/jsmpeg-player/HEAD/demo/assets/logo.png -------------------------------------------------------------------------------- /demo/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vCloudSail/jsmpeg-player/HEAD/demo/public/favicon.ico -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/jsmpeg"] 2 | path = src/jsmpeg 3 | url = https://github.com/vCloudSail/jsmpeg.git 4 | -------------------------------------------------------------------------------- /src/styles/icon/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vCloudSail/jsmpeg-player/HEAD/src/styles/icon/iconfont.ttf -------------------------------------------------------------------------------- /src/styles/icon/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vCloudSail/jsmpeg-player/HEAD/src/styles/icon/iconfont.woff -------------------------------------------------------------------------------- /src/styles/icon/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vCloudSail/jsmpeg-player/HEAD/src/styles/icon/iconfont.woff2 -------------------------------------------------------------------------------- /src/styles/keyframes.scss: -------------------------------------------------------------------------------- 1 | @keyframes omission { 2 | 0% { 3 | content: ''; 4 | } 5 | 6 | 25% { 7 | content: '.'; 8 | } 9 | 10 | 50% { 11 | content: '..'; 12 | } 13 | 14 | 75% { 15 | content: '...'; 16 | } 17 | } 18 | 19 | @keyframes breathing { 20 | 50% { 21 | opacity: 0; 22 | } 23 | } -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .git 3 | .idea/ 4 | .git/ 5 | *.map 6 | *.html 7 | 8 | dist/*.html 9 | 10 | test 11 | npm-debug.log 12 | .DS_Store 13 | node_modules/ 14 | examples/ 15 | packages/ 16 | public/ 17 | src/ 18 | demo/ 19 | simple-server/ 20 | 21 | .eslintrc.js 22 | .gitignore 23 | .npmignore 24 | .prettierrc.js 25 | babel.config.js 26 | jsconfig.json 27 | package-lock.json 28 | vue.config.js -------------------------------------------------------------------------------- /server/type.d.ts: -------------------------------------------------------------------------------- 1 | export interface ServerOptions { 2 | streamPort: number 3 | websocketPort: number 4 | recordStream: boolean 5 | } 6 | 7 | export interface StreamChannelOptions { 8 | name: string 9 | source: string 10 | maxClient: number 11 | timeout: number 12 | ffmpegOptions: { 13 | resolution: string 14 | bitrate: string 15 | } 16 | serverOptions: ServerOptions 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | /package-lock.json 5 | /pnpm-lock.yaml 6 | /report.html 7 | 8 | # local env files 9 | .env.local 10 | .env.*.local 11 | 12 | # Log files 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw* 25 | *.lock 26 | /.history 27 | -------------------------------------------------------------------------------- /demo/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import JsmpegPlayer from '@' 4 | // import JsmpegPlayer from 'vue-jsmpeg-player' 5 | 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | Vue.use(JsmpegPlayer) 10 | Vue.use(ElementUI) 11 | 12 | Vue.config.productionTip = false 13 | 14 | new Vue({ 15 | render: (h) => h(App) 16 | }).$mount('#app') 17 | -------------------------------------------------------------------------------- /src/styles/icon/index.css: -------------------------------------------------------------------------------- 1 | @import './iconfont.css'; 2 | 3 | /* * [class*='jm-icon-'] + span { 4 | margin-left: 5px; 5 | } */ 6 | 7 | [class*='jm-icon-'], 8 | [class^='jm-icon-'] { 9 | font-family: 'jsmpeg-player' !important; 10 | speak: none; 11 | font-style: normal; 12 | font-weight: normal; 13 | font-variant: normal; 14 | text-transform: none; 15 | line-height: 1; 16 | vertical-align: baseline; 17 | display: inline-block; 18 | -webkit-font-smoothing: antialiased; 19 | } 20 | -------------------------------------------------------------------------------- /src/directives/drag.js: -------------------------------------------------------------------------------- 1 | import { dragIn } from '@/utils/drag' 2 | 3 | /** 4 | * @type {import('vue').DirectiveOptions} 5 | * @description 使元素支持拖入文件,并触发绑定事件 6 | * @author cloudsail 7 | */ 8 | const vDragIn = { 9 | bind(el, binding, vnode) {}, 10 | inserted(el, binding, vnode) { 11 | dragIn.bind(el, { 12 | callback: binding.value 13 | }) 14 | }, 15 | update(el, binding, vnode) { 16 | dragIn.update(el, { 17 | callback: binding.value 18 | }) 19 | }, 20 | unbind(el, binding, vnode) { 21 | dragIn.unbind(el) 22 | } 23 | } 24 | 25 | export { vDragIn } 26 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 |