├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── logo.png ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js └── prod.env.js ├── demo ├── App.vue └── main.js ├── docs ├── index.html └── static │ ├── css │ ├── app.449224f9e13970a5d2ca41065f9fb7d1.css │ └── app.449224f9e13970a5d2ca41065f9fb7d1.css.map │ └── js │ ├── app.9bf36f53a031d26684f2.js │ ├── app.9bf36f53a031d26684f2.js.map │ ├── manifest.ed8e4574d6519d5582fa.js │ ├── manifest.ed8e4574d6519d5582fa.js.map │ ├── vendor.e52409fa20f2e59d83b7.js │ └── vendor.e52409fa20f2e59d83b7.js.map ├── index.html ├── package.json ├── src ├── index.js └── vue-camera.vue └── static └── .gitkeep /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | 7 | # Editor directories and files 8 | .idea 9 | .vscode 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-camera 2 | vue-camera,一个自己写的vue插件,getusermedia调用摄像头拍照与生成canvas, 毕设做完会继续填坑~~ 3 | 4 | ### 演示(demo) 5 | [demo](https://pollux2015.github.io/vue-camera/) 6 | 7 | ### Install 8 | ```javascript 9 | npm install vue-camera 10 | ``` 11 | 12 | ### How to use 13 | 14 | 组件调用 15 | ```javascript 16 | 21 | 22 | import camera from 'vue-camera' 23 | export default { 24 | name: 'app', 25 | components: { 26 | Camera 27 | } 28 | } 29 | ``` 30 | 31 | Props 32 | ```javascript 33 | props: { 34 | ow: { 35 | type: [Number, String], 36 | default: 400 37 | }, 38 | oh: { 39 | type: [Number, String], 40 | default: 300 41 | }, 42 | fillColor: { 43 | type: String, 44 | default: '#000' 45 | }, 46 | placement: { 47 | type: String, 48 | default: '请点击打开摄像头' 49 | }, 50 | maxView: { 51 | type: Number, 52 | default: 10 53 | } 54 | } 55 | ``` 56 | 57 | ### $emit 58 | ```javascript 59 | this.$emit('error', err); // 错误 60 | this.$emit('tocanvas', dataUrl) // 拍照生成canvas 61 | ``` 62 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pollux2015/vue-camera/2a1d04f46777bea6538ae5af5fd8f5e110bf4204/build/logo.png -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './demo/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | 'vue$': 'vue/dist/vue.esm.js', 29 | '@': resolve('src'), 30 | } 31 | }, 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.vue$/, 36 | loader: 'vue-loader', 37 | options: vueLoaderConfig 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'babel-loader', 42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 43 | }, 44 | { 45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 46 | loader: 'url-loader', 47 | options: { 48 | limit: 10000, 49 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 50 | } 51 | }, 52 | { 53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | { 61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 62 | loader: 'url-loader', 63 | options: { 64 | limit: 10000, 65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 66 | } 67 | } 68 | ] 69 | }, 70 | node: { 71 | // prevent webpack from injecting useless setImmediate polyfill because Vue 72 | // source contains it (although only uses it if it's native). 73 | setImmediate: false, 74 | // prevent webpack from injecting mocks to Node native modules 75 | // that does not make sense for the client 76 | dgram: 'empty', 77 | fs: 'empty', 78 | net: 'empty', 79 | tls: 'empty', 80 | child_process: 'empty' 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | minify: { 68 | removeComments: true, 69 | collapseWhitespace: true, 70 | removeAttributeQuotes: true 71 | // more options: 72 | // https://github.com/kangax/html-minifier#options-quick-reference 73 | }, 74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 75 | chunksSortMode: 'dependency' 76 | }), 77 | // keep module.id stable when vendor modules does not change 78 | new webpack.HashedModuleIdsPlugin(), 79 | // enable scope hoisting 80 | new webpack.optimize.ModuleConcatenationPlugin(), 81 | // split vendor js into its own file 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'vendor', 84 | minChunks (module) { 85 | // any required modules inside node_modules are extracted to vendor 86 | return ( 87 | module.resource && 88 | /\.js$/.test(module.resource) && 89 | module.resource.indexOf( 90 | path.join(__dirname, '../node_modules') 91 | ) === 0 92 | ) 93 | } 94 | }), 95 | // extract webpack runtime and module manifest to its own file in order to 96 | // prevent vendor hash from being updated whenever app bundle is updated 97 | new webpack.optimize.CommonsChunkPlugin({ 98 | name: 'manifest', 99 | minChunks: Infinity 100 | }), 101 | // This instance extracts shared chunks from code splitted chunks and bundles them 102 | // in a separate chunk, similar to the vendor chunk 103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 104 | new webpack.optimize.CommonsChunkPlugin({ 105 | name: 'app', 106 | async: 'vendor-async', 107 | children: true, 108 | minChunks: 3 109 | }), 110 | 111 | // copy custom static assets 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.resolve(__dirname, '../static'), 115 | to: config.build.assetsSubDirectory, 116 | ignore: ['.*'] 117 | } 118 | ]) 119 | ] 120 | }) 121 | 122 | if (config.build.productionGzip) { 123 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 124 | 125 | webpackConfig.plugins.push( 126 | new CompressionWebpackPlugin({ 127 | asset: '[path].gz[query]', 128 | algorithm: 'gzip', 129 | test: new RegExp( 130 | '\\.(' + 131 | config.build.productionGzipExtensions.join('|') + 132 | ')$' 133 | ), 134 | threshold: 10240, 135 | minRatio: 0.8 136 | }) 137 | ) 138 | } 139 | 140 | if (config.build.bundleAnalyzerReport) { 141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 143 | } 144 | 145 | module.exports = webpackConfig 146 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.2.8 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true, 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../docs/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../docs'), 45 | assetsSubDirectory: 'static', 46 | // assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /demo/App.vue: -------------------------------------------------------------------------------- 1 | 19 | 30 | 74 | -------------------------------------------------------------------------------- /demo/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | 6 | Vue.config.productionTip = false 7 | 8 | /* eslint-disable no-new */ 9 | new Vue({ 10 | el: '#app', 11 | template: '', 12 | components: { App } 13 | }) 14 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | vue-camera
-------------------------------------------------------------------------------- /docs/static/css/app.449224f9e13970a5d2ca41065f9fb7d1.css: -------------------------------------------------------------------------------- 1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}.camera-main[data-v-cf4f2676]{margin-right:2px}.camera-main[data-v-cf4f2676],.canvas-main[data-v-cf4f2676]{position:relative;float:left}.camera-main .camera-placement[data-v-cf4f2676],.camera-main video[data-v-cf4f2676]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1}.camera-placement[data-v-cf4f2676]{display:table}.camera-placement-inner[data-v-cf4f2676]{display:table-cell;color:#fff;font-size:18px;vertical-align:middle}.camera-control[data-v-cf4f2676]{position:absolute;z-index:10;left:0;right:0;bottom:0;text-align:center;padding:10px;min-height:40px}.camera-main[data-v-cf4f2676]:after{position:absolute;content:"";display:block;width:100%;height:50%;z-index:9;left:0;bottom:0;max-height:100px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.8))}.camera-btn[data-v-cf4f2676]{cursor:pointer;color:#fff;padding:8px 12px;font-size:14px;outline:none;background-color:hsla(0,0%,100%,.3);transition:all .3s;border:none;box-shadow:0 2px 0 0 rgba(45,140,240,.8);margin:0 5px}.camera-btn[data-v-cf4f2676]:hover{background-color:rgba(45,140,240,.6);box-shadow:0 2px 0 0 #2d8cf0}.camera-btn[data-v-cf4f2676]:active{background-color:rgba(45,140,240,.2)}.camera-canvas-group[data-v-cf4f2676]{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;bottom:0;left:0;right:0}.camera-canvas-item[data-v-cf4f2676]{cursor:pointer;opacity:.8;-webkit-box-flex:1;-ms-flex:1;flex:1;max-width:100px;height:100%;overflow:hidden;clear:both;margin-bottom:-1px;transition:all .2s}.camera-canvas-item img[data-v-cf4f2676]{float:left;width:100%;background-color:#000;border:1px solid #fff}.camera-canvas-item[data-v-cf4f2676]:hover{opacity:1;position:relative;box-shadow:0 0 10px 0 rgba(0,0,0,.8)} 2 | /*# sourceMappingURL=app.449224f9e13970a5d2ca41065f9fb7d1.css.map */ -------------------------------------------------------------------------------- /docs/static/css/app.449224f9e13970a5d2ca41065f9fb7d1.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["app.449224f9e13970a5d2ca41065f9fb7d1.css"],"names":[],"mappings":"AACA,KACE,8CAAoD,AACpD,mCAAoC,AACpC,kCAAmC,AACnC,kBAAmB,AACnB,cAAe,AACf,eAAiB,CAClB,AAED,8BACE,gBAAkB,CACnB,AACD,4DAEE,kBAAmB,AACnB,UAAY,CACb,AACD,oFAEE,kBAAmB,AACnB,OAAQ,AACR,MAAO,AACP,WAAY,AACZ,YAAa,AACb,SAAW,CACZ,AACD,mCACE,aAAe,CAChB,AACD,yCACE,mBAAoB,AACpB,WAAY,AACZ,eAAgB,AAChB,qBAAuB,CACxB,AACD,iCACE,kBAAmB,AACnB,WAAY,AACZ,OAAQ,AACR,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,aAAc,AACd,eAAiB,CAClB,AACD,oCACE,kBAAmB,AACnB,WAAY,AACZ,cAAe,AACf,WAAY,AACZ,WAAY,AACZ,UAAW,AACX,OAAQ,AACR,SAAU,AACV,iBAAkB,AAElB,mEAAmF,CACpF,AACD,6BACE,eAAgB,AAEhB,WAAY,AACZ,iBAAkB,AAClB,eAAgB,AAChB,aAAc,AACd,oCAA2C,AAE3C,mBAAqB,AACrB,YAAa,AAEL,yCAA8C,AACtD,YAAc,CACf,AACD,mCACE,qCAA0C,AAElC,4BAA4C,CACrD,AACD,oCACE,oCAA0C,CAC3C,AACD,sCACE,oBAAqB,AACrB,oBAAqB,AACrB,aAAc,AACd,kBAAmB,AACnB,SAAU,AACV,OAAQ,AACR,OAAS,CACV,AACD,qCACE,eAAgB,AAChB,WAAa,AACb,mBAAoB,AAChB,WAAY,AACR,OAAQ,AAChB,gBAAiB,AACjB,YAAa,AACb,gBAAiB,AACjB,WAAY,AACZ,mBAAoB,AAEpB,kBAAqB,CACtB,AACD,yCACE,WAAY,AACZ,WAAY,AACZ,sBAAuB,AACvB,qBAAuB,CACxB,AACD,2CAEE,UAAW,AACX,kBAAmB,AAEX,oCAA0C,CACnD","file":"app.449224f9e13970a5d2ca41065f9fb7d1.css","sourcesContent":["\n#app {\n font-family: 'Avenir', Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: center;\n color: #2c3e50;\n margin-top: 60px;\n}\n\n.camera-main[data-v-cf4f2676] {\n margin-right: 2px;\n}\n.camera-main[data-v-cf4f2676],\n.canvas-main[data-v-cf4f2676] {\n position: relative;\n float: left;\n}\n.camera-main video[data-v-cf4f2676],\n.camera-main .camera-placement[data-v-cf4f2676] {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n}\n.camera-placement[data-v-cf4f2676] {\n display: table;\n}\n.camera-placement-inner[data-v-cf4f2676] {\n display: table-cell;\n color: #fff;\n font-size: 18px;\n vertical-align: middle;\n}\n.camera-control[data-v-cf4f2676] {\n position: absolute;\n z-index: 10;\n left: 0;\n right: 0;\n bottom: 0;\n text-align: center;\n padding: 10px;\n min-height: 40px;\n}\n.camera-main[data-v-cf4f2676]:after {\n position: absolute;\n content: '';\n display: block;\n width: 100%;\n height: 50%;\n z-index: 9;\n left: 0;\n bottom: 0;\n max-height: 100px;\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.8)));\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));\n}\n.camera-btn[data-v-cf4f2676] {\n cursor: pointer;\n border: none;\n color: #fff;\n padding: 8px 12px;\n font-size: 14px;\n outline: none;\n background-color: rgba(255, 255, 255, 0.3);\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n border: none;\n -webkit-box-shadow: 0 2px 0 0 rgba(45, 140, 240, 0.8);\n box-shadow: 0 2px 0 0 rgba(45, 140, 240, 0.8);\n margin: 0 5px;\n}\n.camera-btn[data-v-cf4f2676]:hover {\n background-color: rgba(45, 140, 240, 0.6);\n -webkit-box-shadow: 0 2px 0 0 rgba(45, 140, 240, 1);\n box-shadow: 0 2px 0 0 rgba(45, 140, 240, 1);\n}\n.camera-btn[data-v-cf4f2676]:active {\n background-color: rgba(45, 140, 240, 0.2);\n}\n.camera-canvas-group[data-v-cf4f2676] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.camera-canvas-item[data-v-cf4f2676] {\n cursor: pointer;\n opacity: 0.8;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n max-width: 100px;\n height: 100%;\n overflow: hidden;\n clear: both;\n margin-bottom: -1px;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n}\n.camera-canvas-item img[data-v-cf4f2676] {\n float: left;\n width: 100%;\n background-color: #000;\n border: 1px solid #fff;\n}\n.camera-canvas-item[data-v-cf4f2676]:hover {\n position: relative;\n opacity: 1;\n position: relative;\n -webkit-box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.8);\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.8);\n}\n.camera-canvas-item[data-v-cf4f2676]:hover {\n}\n\n"]} -------------------------------------------------------------------------------- /docs/static/js/app.9bf36f53a031d26684f2.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{dtwL:function(t,a){},iXgl:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var s=e("O534"),n=e("lFKW"),i={props:{ow:{type:[Number,String],default:400},oh:{type:[Number,String],default:300},fillColor:{type:String,default:"#000"},placement:{type:String,default:"请点击打开摄像头"},maxView:{type:Number,default:10}},data:function(){return{cameraon:!1,videoEl:null,msg:this.placement,canvasGroup:[]}},computed:{style:function(){return{width:this.ow+"px",height:this.oh+"px","background-color":this.fillColor}}},mounted:function(){this.videoEl=this.$el.querySelector("video"),this.canvasEl=this.$el.querySelector("canvas"),this.context=this.canvasEl.getContext("2d")},methods:{cameraOn:function(){var t=this;n(function(a,e){a?(console.log(a),t.msg=a.name,t.$emit("error",a)):(t.cameraon=!0,t.stream=e,void 0!==t.videoEl.mozSrcObject?t.videoEl.mozSrcObject=e:void 0!==t.videoEl.srcObject?t.videoEl.srcObject=e:t.videoEl.src=e)})},cameraOff:function(){this.stream&&(this.cameraon=!1,this.msg=this.placement,this.context.fillStyle="#000",this.context.fillRect(0,0,this.ow,this.oh),this.stream.getVideoTracks()[0].stop(),this.canvasGroup=[])},previewCanvas:function(t){return this.context.fillStyle="#000",this.context.fillRect(0,0,this.ow,this.oh),this.context.drawImage(t.target||t,0,0,this.ow,this.oh),this.canvasEl.toDataURL()},toCanvas:function(){var t=this.previewCanvas(this.videoEl);this.$emit("takeshot",t),0!=this.maxView&&(this.canvasGroup.length+1>this.maxView&&this.canvasGroup.pop(),this.canvasGroup.unshift(this.canvasEl.toDataURL()))}}},c={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"camera-outer"},[e("div",{staticClass:"camera-main",style:t.style},[e("div",{staticClass:"camera-control"},[e("button",{directives:[{name:"show",rawName:"v-show",value:!t.cameraon,expression:"!cameraon"}],staticClass:"camera-btn",on:{click:t.cameraOn}},[t._v("打开摄像头")]),t._v(" "),t.cameraon?e("button",{staticClass:"camera-btn",on:{click:t.cameraOff}},[t._v("关闭摄像头")]):t._e(),t._v(" "),t.cameraon?e("button",{staticClass:"camera-btn",on:{click:function(a){t.toCanvas("video")}}},[t._v("生成Canvas")]):t._e()]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.cameraon,expression:"!cameraon"}],staticClass:"camera-placement",attrs:{slot:"placement"},on:{click:t.cameraOn},slot:"placement"},[e("p",{staticClass:"camera-placement-inner"},[t._v("\n "+t._s(t.msg)+"\n ")])]),t._v(" "),e("video",{directives:[{name:"show",rawName:"v-show",value:t.cameraon,expression:"cameraon"}],staticClass:"camera-video",style:t.style})]),t._v(" "),e("div",{staticClass:"canvas-main",style:t.style},[e("canvas",{staticClass:"camera-canvas",style:t.style,attrs:{width:t.ow,height:t.oh}}),t._v(" "),e("div",{staticClass:"camera-canvas-group"},t._l(t.canvasGroup,function(a){return e("div",{staticClass:"camera-canvas-item",on:{click:t.previewCanvas}},[e("img",{attrs:{src:a}})])}))])])},staticRenderFns:[]};var o={name:"app",components:{Camera:e("ngHh")(i,c,!1,function(t){e("dtwL")},"data-v-cf4f2676",null).exports}},r={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{attrs:{id:"app"}},[a("Camera")],1)},staticRenderFns:[]};var l=e("ngHh")(o,r,!1,function(t){e("r8Ae")},null,null).exports;s.a.config.productionTip=!1,new s.a({el:"#app",template:"",components:{App:l}})},r8Ae:function(t,a){}},["iXgl"]); 2 | //# sourceMappingURL=app.9bf36f53a031d26684f2.js.map -------------------------------------------------------------------------------- /docs/static/js/app.9bf36f53a031d26684f2.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/camera.vue","webpack:///./src/camera.vue?ba74","webpack:///./src/camera.vue","webpack:///demo/App.vue","webpack:///./demo/App.vue?bd47","webpack:///./demo/App.vue","webpack:///./demo/main.js"],"names":["getUserMedia","__webpack_require__","camera","String","Number","placement","fillColor","_this","this","err","name","stream","oh","stop","toDataURL","videoEl","dataUrl","pop","selectortype_template_index_0_src_camera","render","_vm","_h","$createElement","_c","_self","staticClass","style","directives","rawName","value","cameraon","expression","on","click","cameraOn","_v","cameraOff","_e","$event","toCanvas","attrs","slot","_s","msg","width","ow","height","_l","item","previewCanvas","src","staticRenderFns","App","Camera","normalizeComponent","ssrContext","selectortype_template_index_0_demo_App","id","demo_App","App_normalizeComponent","vue_esm","config","productionTip","el","template","components"],"mappings":"0IAyBAA,EAAAC,EAAA,QACAC,2BAIAC,gBAEA,sBAEAA,gBAEA,qBAEAA,eAEA,wBAEAA,eAEA,0BAEAC,eAGA,sCAGA,UACA,cACAC,4HAMAC,oEAIA,8CACA,gDACA,oCAGA,IAAAC,EAAAC,oCAGAC,WACAC,qBACAD,iBAEA,WACAE,yDAEAA,mDAEAA,gBAEAA,wDAOA,gBACAN,iCACA,8CACAO,oCACAC,qFAKA,8CACAD,wDACAA,kBACAE,+DAGAC,+BACAC,8EAKAC,6CAEAH,iBC9GAI,GADiBC,OAFjB,WAA0B,IAAAC,EAAAZ,KAAaa,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBE,YAAA,iBAA2BF,EAAA,OAAYE,YAAA,cAAAC,MAAAN,EAAA,QAA4CG,EAAA,OAAYE,YAAA,mBAA6BF,EAAA,UAAeI,aAAajB,KAAA,OAAAkB,QAAA,SAAAC,OAAAT,EAAAU,SAAAC,WAAA,cAA0EN,YAAA,aAAAO,IAA+BC,MAAAb,EAAAc,YAAsBd,EAAAe,GAAA,WAAAf,EAAAe,GAAA,KAAAf,EAAA,SAAAG,EAAA,UAA4DE,YAAA,aAAAO,IAA6BC,MAAAb,EAAAgB,aAAuBhB,EAAAe,GAAA,WAAAf,EAAAiB,KAAAjB,EAAAe,GAAA,KAAAf,EAAA,SAAAG,EAAA,UAAqEE,YAAA,aAAAO,IAA6BC,MAAA,SAAAK,GAAyBlB,EAAAmB,SAAA,aAAwBnB,EAAAe,GAAA,cAAAf,EAAAiB,OAAAjB,EAAAe,GAAA,KAAAZ,EAAA,OAAwDI,aAAajB,KAAA,OAAAkB,QAAA,SAAAC,OAAAT,EAAAU,SAAAC,WAAA,cAA0EN,YAAA,mBAAAe,OAAwCC,KAAA,aAAmBT,IAAKC,MAAAb,EAAAc,UAAqBO,KAAA,cAAkBlB,EAAA,KAAUE,YAAA,2BAAqCL,EAAAe,GAAA,aAAAf,EAAAsB,GAAAtB,EAAAuB,KAAA,gBAAAvB,EAAAe,GAAA,KAAAZ,EAAA,SAA8EI,aAAajB,KAAA,OAAAkB,QAAA,SAAAC,MAAAT,EAAA,SAAAW,WAAA,aAAwEN,YAAA,eAAAC,MAAAN,EAAA,UAA+CA,EAAAe,GAAA,KAAAZ,EAAA,OAA0BE,YAAA,cAAAC,MAAAN,EAAA,QAA4CG,EAAA,UAAeE,YAAA,gBAAAC,MAAAN,EAAA,MAAAoB,OAAqDI,MAAAxB,EAAAyB,GAAAC,OAAA1B,EAAAR,MAAgCQ,EAAAe,GAAA,KAAAZ,EAAA,OAAwBE,YAAA,uBAAkCL,EAAA2B,GAAA3B,EAAA,qBAAA4B,GAAyC,OAAAzB,EAAA,OAAiBE,YAAA,qBAAAO,IAAqCC,MAAAb,EAAA6B,iBAA2B1B,EAAA,OAAYiB,OAAOU,IAAAF,eAE39CG,oBCCjB,ICKAC,QAEA,kBAGAC,ODVApD,EAAA,OAcAqD,CACApD,EACAgB,GATA,EAVA,SAAAqC,GACAtD,EAAA,SAaA,kBAEA,MAUA,UEvBAuD,GADiBrC,OAFjB,WAA0B,IAAaE,EAAbb,KAAac,eAA0BC,EAAvCf,KAAuCgB,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBiB,OAAOiB,GAAA,SAAYlC,EAAA,eAE5G4B,oBCCjB,IAuBAO,EAvBAzD,EAAA,OAcA0D,CACAP,EACAI,GATA,EAVA,SAAAD,GACAtD,EAAA,SAaA,KAEA,MAUA,QCrBA2D,EAAA,EAAAC,OAAAC,eAAA,EAGA,IAAAF,EAAA,GACAG,GAAA,OACAC,SAAA,SACAC,YAAeb,IAAAM","file":"static/js/app.9bf36f53a031d26684f2.js","sourcesContent":["\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/camera.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"camera-outer\"},[_c('div',{staticClass:\"camera-main\",style:(_vm.style)},[_c('div',{staticClass:\"camera-control\"},[_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.cameraon),expression:\"!cameraon\"}],staticClass:\"camera-btn\",on:{\"click\":_vm.cameraOn}},[_vm._v(\"打开摄像头\")]),_vm._v(\" \"),(_vm.cameraon)?_c('button',{staticClass:\"camera-btn\",on:{\"click\":_vm.cameraOff}},[_vm._v(\"关闭摄像头\")]):_vm._e(),_vm._v(\" \"),(_vm.cameraon)?_c('button',{staticClass:\"camera-btn\",on:{\"click\":function($event){_vm.toCanvas('video')}}},[_vm._v(\"生成Canvas\")]):_vm._e()]),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.cameraon),expression:\"!cameraon\"}],staticClass:\"camera-placement\",attrs:{\"slot\":\"placement\"},on:{\"click\":_vm.cameraOn},slot:\"placement\"},[_c('p',{staticClass:\"camera-placement-inner\"},[_vm._v(\"\\n \"+_vm._s(_vm.msg)+\"\\n \")])]),_vm._v(\" \"),_c('video',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.cameraon),expression:\"cameraon\"}],staticClass:\"camera-video\",style:(_vm.style)})]),_vm._v(\" \"),_c('div',{staticClass:\"canvas-main\",style:(_vm.style)},[_c('canvas',{staticClass:\"camera-canvas\",style:(_vm.style),attrs:{\"width\":_vm.ow,\"height\":_vm.oh}}),_vm._v(\" \"),_c('div',{staticClass:\"camera-canvas-group\"},_vm._l((_vm.canvasGroup),function(item){return _c('div',{staticClass:\"camera-canvas-item\",on:{\"click\":_vm.previewCanvas}},[_c('img',{attrs:{\"src\":item}})])}))])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/.13.7.0@vue-loader/lib/template-compiler?{\"id\":\"data-v-cf4f2676\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/.13.7.0@vue-loader/lib/selector.js?type=template&index=0!./src/camera.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/.3.0.2@extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/.13.7.0@vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-cf4f2676\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../node_modules/.13.7.0@vue-loader/lib/selector?type=styles&index=0!./camera.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/.13.7.0@vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/.13.7.0@vue-loader/lib/selector?type=script&index=0!./camera.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/.13.7.0@vue-loader/lib/selector?type=script&index=0!./camera.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/.13.7.0@vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-cf4f2676\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/.13.7.0@vue-loader/lib/selector?type=template&index=0!./camera.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-cf4f2676\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/camera.vue\n// module id = null\n// module chunks = ","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// demo/App.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('Camera')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/.13.7.0@vue-loader/lib/template-compiler?{\"id\":\"data-v-3f9d903b\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/.13.7.0@vue-loader/lib/selector.js?type=template&index=0!./demo/App.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/.3.0.2@extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/.13.7.0@vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-3f9d903b\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/.13.7.0@vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/.13.7.0@vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/.13.7.0@vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/.13.7.0@vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/.13.7.0@vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3f9d903b\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/.13.7.0@vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./demo/App.vue\n// module id = null\n// module chunks = ","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\n\nVue.config.productionTip = false\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n template: '',\n components: { App }\n})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./demo/main.js\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /docs/static/js/manifest.ed8e4574d6519d5582fa.js: -------------------------------------------------------------------------------- 1 | !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var i,u,f,s=0,l=[];s0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},r.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.getMid=function(e){var t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},r.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},r.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:r.matchPrefix(e+t,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},r.getIceParameters=function(e,t){var n=r.splitLines(e);return{usernameFragment:(n=n.concat(r.splitLines(t))).filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)}},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(" "),i=3;i0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)});var i=0;return t.codecs.forEach(function(e){e.maxptime>i&&(i=e.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions.forEach(function(e){n+=r.writeExtmap(e)}),n},r.parseRtpEncodingParameters=function(e){var t,n=[],i=r.parseRtpParameters(e),a=-1!==i.fecMechanisms.indexOf("RED"),o=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),c=s.length>0&&s[0].ssrc,u=r.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(t=u[0][1]),i.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:t}};n.push(r),a&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:t,mechanism:o?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var d=r.matchPrefix(e,"b=");return d.length&&(0===d[0].indexOf("b=TIAS:")?d=parseInt(d[0].substr(7),10):0===d[0].indexOf("b=AS:")&&(d=parseInt(d[0].substr(5),10)),n.forEach(function(e){e.maxBitrate=d})),n},r.parseRtcpParameters=function(e){var t={},n=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=r.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var a=r.matchPrefix(e,"a=rtcp-mux");return t.mux=a.length>0,t},r.parseMsid=function(e){var t,n=r.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var i=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return i.length>0?{stream:(t=i[0].value.split(" "))[0],track:t[1]}:void 0},r.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,i){var a=r.writeRtpDescription(e.kind,t);if(a+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),a+="a=mid:"+e.mid+"\r\n",e.direction?a+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var o="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+o,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),a},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;i=14393})[0])}return!1})}this._config=e,this.transceivers=[],this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype._emitBufferedCandidates=function(){var e=this,t=r.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(n){if(!n.candidate||0===Object.keys(n.candidate).length)for(var r=1;r-1&&(this.localStreams.splice(t,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},window.RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},window.RTCPeerConnection.prototype._getCommonCapabilities=function(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]};return e.codecs.forEach(function(e){for(var r=0;r0;t.forEach(function(e,t){var o=i.transceivers[t],s=o.iceGatherer,c=o.iceTransport,u=o.dtlsTransport,d=o.localCapabilities,l=o.remoteCapabilities;if(!("0"===e.split("\n",1)[0].split(" ",2)[1])&&!o.isDatachannel){var f=r.getIceParameters(e,n);if(a){var p=r.matchPrefix(e,"a=candidate:").map(function(e){return r.parseCandidate(e)}).filter(function(e){return"1"===e.component});p.length&&c.setRemoteCandidates(p)}var v=r.getDtlsParameters(e,n);a&&(v.role="server"),i.usingBundle&&0!==t||(c.start(s,f,a?"controlling":"controlled"),u.start(v));var h=i._getCommonCapabilities(d,l);i._transceive(o,h.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var o=arguments.length>1&&"function"==typeof arguments[1];if(o){var s=arguments[1];window.setTimeout(function(){s(),"new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),i._emitBufferedCandidates()},0)}var c=Promise.resolve();return c.then(function(){o||("new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),window.setTimeout(i._emitBufferedCandidates.bind(i),500))}),c},window.RTCPeerConnection.prototype.setRemoteDescription=function(e){var t=this,n=new MediaStream,i=[],a=r.splitSections(e.sdp),o=a.shift(),s=r.matchPrefix(o,"a=ice-lite").length>0;switch(this.usingBundle=r.matchPrefix(o,"a=group:BUNDLE ").length>0,a.forEach(function(a,c){var u=r.splitLines(a)[0].substr(2).split(" "),d=u[0],l="0"===u[1],f=r.getDirection(a,o),p=r.matchPrefix(a,"a=mid:");if(p=p.length?p[0].substr(6):r.generateIdentifier(),"application"!==d||"DTLS/SCTP"!==u[2]){var v,h,m,g,y,b,w,C,_,k,x,T,S,O=r.parseRtpParameters(a);l||(x=r.getIceParameters(a,o),(T=r.getDtlsParameters(a,o)).role="client"),C=r.parseRtpEncodingParameters(a);var E=r.matchPrefix(a,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];E&&(S=E.value);var P=r.matchPrefix(a,"a=end-of-candidates",o).length>0,$=r.matchPrefix(a,"a=candidate:").map(function(e){return r.parseCandidate(e)}).filter(function(e){return"1"===e.component});if("offer"!==e.type||l)"answer"!==e.type||l||(h=(v=t.transceivers[c]).iceGatherer,m=v.iceTransport,g=v.dtlsTransport,y=v.rtpSender,b=v.rtpReceiver,w=v.sendEncodingParameters,_=v.localCapabilities,t.transceivers[c].recvEncodingParameters=C,t.transceivers[c].remoteCapabilities=O,t.transceivers[c].cname=S,(s||P)&&$.length&&m.setRemoteCandidates($),t.usingBundle&&0!==c||(m.start(h,x,"controlling"),g.start(T)),t._transceive(v,"sendrecv"===f||"recvonly"===f,"sendrecv"===f||"sendonly"===f),!b||"sendrecv"!==f&&"sendonly"!==f?delete v.rtpReceiver:(k=b.track,i.push([k,b]),n.addTrack(k)));else{var R,A=t.usingBundle&&c>0?{iceGatherer:t.transceivers[0].iceGatherer,iceTransport:t.transceivers[0].iceTransport,dtlsTransport:t.transceivers[0].dtlsTransport}:t._createIceAndDtlsTransports(p,c);if(P&&A.iceTransport.setRemoteCandidates($),(_=RTCRtpReceiver.getCapabilities(d)).codecs=_.codecs.filter(function(e){return"rtx"!==e.name}),w=[{ssrc:1001*(2*c+2)}],k=(b=new RTCRtpReceiver(A.dtlsTransport,d)).track,i.push([k,b]),n.addTrack(k),t.localStreams.length>0&&t.localStreams[0].getTracks().length>=c)"audio"===d?R=t.localStreams[0].getAudioTracks()[0]:"video"===d&&(R=t.localStreams[0].getVideoTracks()[0]),R&&(y=new RTCRtpSender(R,A.dtlsTransport));t.transceivers[c]={iceGatherer:A.iceGatherer,iceTransport:A.iceTransport,dtlsTransport:A.dtlsTransport,localCapabilities:_,remoteCapabilities:O,rtpSender:y,rtpReceiver:b,kind:d,mid:p,cname:S,sendEncodingParameters:w,recvEncodingParameters:C},t._transceive(t.transceivers[c],!1,"sendrecv"===f||"sendonly"===f)}}else t.transceivers[c]={mid:p,isDatachannel:!0}}),this.remoteDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}return n.getTracks().length&&(t.remoteStreams.push(n),window.setTimeout(function(){var e=new Event("addstream");e.stream=n,t.dispatchEvent(e),null!==t.onaddstream&&window.setTimeout(function(){t.onaddstream(e)},0),i.forEach(function(r){var i=r[0],a=r[1],o=new Event("track");o.track=i,o.receiver=a,o.streams=[n],t.dispatchEvent(e),null!==t.ontrack&&window.setTimeout(function(){t.ontrack(o)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this.dispatchEvent(t),null!==this.onsignalingstatechange&&this.onsignalingstatechange(t)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var e=new Event("negotiationneeded");this.dispatchEvent(e),null!==this.onnegotiationneeded&&this.onnegotiationneeded(e)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){t[e.iceTransport.state]++,t[e.dtlsTransport.state]++}),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0||t.checking>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":(t.connected>0||t.completed>0)&&(e="connected"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this.dispatchEvent(n),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(n)}},window.RTCPeerConnection.prototype.createOffer=function(){var e,t=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");1===arguments.length&&"function"!=typeof arguments[0]?e=arguments[0]:3===arguments.length&&(e=arguments[2]);var n=[],i=0,a=0;if(this.localStreams.length&&(i=this.localStreams[0].getAudioTracks().length,a=this.localStreams[0].getVideoTracks().length),e){if(e.mandatory||e.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==e.offerToReceiveAudio&&(i=e.offerToReceiveAudio),void 0!==e.offerToReceiveVideo&&(a=e.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(e){n.push({kind:e.kind,track:e,wantReceive:"audio"===e.kind?i>0:a>0}),"audio"===e.kind?i--:"video"===e.kind&&a--});i>0||a>0;)i>0&&(n.push({kind:"audio",wantReceive:!0}),i--),a>0&&(n.push({kind:"video",wantReceive:!0}),a--);var o=r.writeSessionBoilerplate(),s=[];n.forEach(function(e,n){var i,a,o=e.track,c=e.kind,u=r.generateIdentifier(),d=t.usingBundle&&n>0?{iceGatherer:s[0].iceGatherer,iceTransport:s[0].iceTransport,dtlsTransport:s[0].dtlsTransport}:t._createIceAndDtlsTransports(u,n),l=RTCRtpSender.getCapabilities(c);l.codecs=l.codecs.filter(function(e){return"rtx"!==e.name}),l.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1")});var f=[{ssrc:1001*(2*n+1)}];o&&(i=new RTCRtpSender(o,d.dtlsTransport)),e.wantReceive&&(a=new RTCRtpReceiver(d.dtlsTransport,c)),s[n]={iceGatherer:d.iceGatherer,iceTransport:d.iceTransport,dtlsTransport:d.dtlsTransport,localCapabilities:l,remoteCapabilities:null,rtpSender:i,rtpReceiver:a,kind:c,mid:u,sendEncodingParameters:f,recvEncodingParameters:null}}),this.usingBundle&&(o+="a=group:BUNDLE "+s.map(function(e){return e.mid}).join(" ")+"\r\n"),n.forEach(function(e,n){var i=s[n];o+=r.writeMediaSection(i,i.localCapabilities,"offer",t.localStreams[0])}),this._pendingOffer=s;var c=new RTCSessionDescription({type:"offer",sdp:o});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,c),Promise.resolve(c)},window.RTCPeerConnection.prototype.createAnswer=function(){var e=this,t=r.writeSessionBoilerplate();this.usingBundle&&(t+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(n){if(n.isDatachannel)t+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+n.mid+"\r\n";else{var i=e._getCommonCapabilities(n.localCapabilities,n.remoteCapabilities);t+=r.writeMediaSection(n,i,"answer",e.localStreams[0])}});var n=new RTCSessionDescription({type:"answer",sdp:t});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,n),Promise.resolve(n)},window.RTCPeerConnection.prototype.addIceCandidate=function(e){if(e){var t=e.sdpMLineIndex;if(e.sdpMid)for(var n=0;n0?r.parseCandidate(e.candidate):{};if("tcp"===a.protocol&&(0===a.port||9===a.port))return;if("1"!==a.component)return;"endOfCandidates"===a.type&&(a={}),i.iceTransport.addRemoteCandidate(a);var o=r.splitSections(this.remoteDescription.sdp);o[t+1]+=(a.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=o.join("")}}else this.transceivers.forEach(function(e){e.iceTransport.addRemoteCandidate({})});return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){t[n]&&e.push(t[n].getStats())})});var t=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(n){var r=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(t){r.set(t,e[t]),r[t]=e[t]})}),t&&window.setTimeout(t,0,r),n(r)})})}}};e.exports={shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:n("c/QV")}},O3Ux:function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},O534:function(e,t,n){"use strict";(function(e){var n=Object.freeze({});function r(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function a(e){return!0===e}function o(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function s(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function u(e){return"[object Object]"===c.call(e)}function d(e){return"[object RegExp]"===c.call(e)}function l(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(e,t){return y.call(e,t)}function w(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var C=/-(\w)/g,_=w(function(e){return e.replace(C,function(e,t){return t?t.toUpperCase():""})}),k=w(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),x=/\B([A-Z])/g,T=w(function(e){return e.replace(x,"-$1").toLowerCase()});function S(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function O(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function E(e,t){for(var n in t)e[n]=t[n];return e}function P(e){for(var t={},n=0;n0,Z=K&&K.indexOf("edge/")>0,Q=K&&K.indexOf("android")>0||"android"===q,Y=K&&/iphone|ipad|ipod|ios/.test(K)||"ios"===q,ee=(K&&/chrome\/\d+/.test(K),{}.watch),te=!1;if(z)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){te=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var re=function(){return void 0===H&&(H=!z&&void 0!==e&&"server"===e.process.env.VUE_ENV),H},ie=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var oe,se="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys);oe="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ce=$,ue=0,de=function(){this.id=ue++,this.subs=[]};de.prototype.addSub=function(e){this.subs.push(e)},de.prototype.removeSub=function(e){g(this.subs,e)},de.prototype.depend=function(){de.target&&de.target.addDep(this)},de.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t0&&(ct((u=e(u,(n||"")+"_"+c))[0])&&ct(l)&&(s[d]=he(l.text+u[0].text),u.shift()),s.push.apply(s,u)):o(u)?ct(l)?s[d]=he(l.text+u):""!==u&&s.push(he(u)):ct(u)&&ct(l)?s[d]=he(l.text+u.text):(a(t._isVList)&&i(u.tag)&&r(u.key)&&i(n)&&(u.key="__vlist"+n+"_"+c+"__"),s.push(u)));return s}(e):void 0}function ct(e){return i(e)&&i(e.text)&&!1===e.isComment}function ut(e,t){return(e.__esModule||se&&"Module"===e[Symbol.toStringTag])&&(e=e.default),s(e)?t.extend(e):e}function dt(e){return e.isComment&&e.asyncFactory}function lt(e){if(Array.isArray(e))for(var t=0;tOt&&_t[n].id>e.id;)n--;_t.splice(n+1,0,e)}else _t.push(e);Tt||(Tt=!0,Qe(Et))}}(this)},$t.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Fe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},$t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},$t.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},$t.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Rt={enumerable:!0,configurable:!0,get:$,set:$};function At(e,t,n){Rt.get=function(){return this[t][n]},Rt.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Rt)}function Dt(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],a=!e.$parent;Ce.shouldConvert=a;var o=function(a){i.push(a);var o=Le(a,t,n,e);Se(r,a,o),a in e||At(e,"_props",a)};for(var s in t)o(s);Ce.shouldConvert=!0}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?$:S(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;u(t=e._data="function"==typeof t?function(e,t){try{return e.call(t,t)}catch(e){return Fe(e,t,"data()"),{}}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var a=n[i];0,r&&b(r,a)||F(a)||At(e,"_data",a)}Te(t,!0)}(e):Te(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=re();for(var i in t){var a=t[i],o="function"==typeof a?a:a.get;0,r||(n[i]=new $t(e,o||$,$,Mt)),i in e||jt(e,i,a)}}(e,t.computed),t.watch&&t.watch!==ee&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function pn(e){this._init(e)}function vn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var a=e.name||n.options.name;var o=function(e){this._init(e)};return(o.prototype=Object.create(n.prototype)).constructor=o,o.cid=t++,o.options=je(n.options,e),o.super=n,o.options.props&&function(e){var t=e.options.props;for(var n in t)At(e.prototype,"_props",n)}(o),o.options.computed&&function(e){var t=e.options.computed;for(var n in t)jt(e.prototype,n,t[n])}(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,L.forEach(function(e){o[e]=n[e]}),a&&(o.options.components[a]=o),o.superOptions=n.options,o.extendOptions=e,o.sealedOptions=E({},o.options),i[r]=o,o}}function hn(e){return e&&(e.Ctor.options.name||e.tag)}function mn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!d(e)&&e.test(t)}function gn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var a in n){var o=n[a];if(o){var s=hn(o.componentOptions);s&&!t(s)&&yn(n,a,r,i)}}}function yn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,g(n,t)}pn.prototype._init=function(e){var t,r,i,a;this._uid=dn++,this._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r,n._parentElm=t._parentElm,n._refElm=t._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(this,e):this.$options=je(ln(this.constructor),e||{},this),this._renderProxy=this,this._self=this,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(this),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&vt(e,t)}(this),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,r=e.$vnode=t._parentVnode,i=r&&r.context;e.$slots=ht(t._renderChildren,i),e.$scopedSlots=n,e._c=function(t,n,r,i){return an(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return an(e,t,n,r,i,!0)};var a=r&&r.data;Se(e,"$attrs",a&&a.attrs||n,0,!0),Se(e,"$listeners",t._parentListeners||n,0,!0)}(this),Ct(this,"beforeCreate"),(r=Nt((t=this).$options.inject,t))&&(Ce.shouldConvert=!1,Object.keys(r).forEach(function(e){Se(t,e,r[e])}),Ce.shouldConvert=!0),Dt(this),(a=(i=this).$options.provide)&&(i._provided="function"==typeof a?a.call(i):a),Ct(this,"created"),this.$options.el&&this.$mount(this.$options.el)},function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Oe,e.prototype.$delete=Ee,e.prototype.$watch=function(e,t,n){if(u(t))return Lt(this,e,t,n);(n=n||{}).user=!0;var r=new $t(this,e,t,n);return n.immediate&&t.call(this,r.value),function(){r.teardown()}}}(pn),sn=/^hook:/,(on=pn).prototype.$on=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n1?O(t):t;for(var n=O(arguments,1),r=0,i=t.length;rparseInt(this.max)&&yn(o,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};bn=pn,(Cn={}).get=function(){return U},Object.defineProperty(bn,"config",Cn),bn.util={warn:ce,extend:E,mergeOptions:je,defineReactive:Se},bn.set=Oe,bn.delete=Ee,bn.nextTick=Qe,bn.options=Object.create(null),L.forEach(function(e){bn.options[e+"s"]=Object.create(null)}),bn.options._base=bn,E(bn.options.components,kn),bn.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this},bn.mixin=function(e){return this.options=je(this.options,e),this},vn(bn),wn=bn,L.forEach(function(e){wn[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}),Object.defineProperty(pn.prototype,"$isServer",{get:re}),Object.defineProperty(pn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),pn.version="2.5.13";var xn=v("style,class"),Tn=v("input,textarea,option,select,progress"),Sn=function(e,t,n){return"value"===n&&Tn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},On=v("contenteditable,draggable,spellcheck"),En=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Pn="http://www.w3.org/1999/xlink",$n=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return $n(e)?e.slice(6,e.length):""},An=function(e){return null==e||!1===e};function Dn(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Mn(r.data,t));for(;i(n=n.parent);)n&&n.data&&(t=Mn(t,n.data));return function(e,t){if(i(e)||i(t))return jn(e,In(t));return""}(t.staticClass,t.class)}function Mn(e,t){return{staticClass:jn(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function jn(e,t){return e?t?e+" "+t:e:t||""}function In(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,a=e.length;r=0&&" "===(h=e.charAt(v));v--);h&&hr.test(h)||(u=!0)}}else void 0===i?(p=r+1,i=e.slice(0,r).trim()):m();function m(){(a||(a=[])).push(e.slice(p,r).trim()),p=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==p&&m(),a)for(r=0;r-1?{exp:e.slice(0,lr),key:'"'+e.slice(lr+1)+'"'}:{exp:e,key:null};ur=e,lr=fr=pr=0;for(;!Pr();)$r(dr=Er())?Ar(dr):91===dr&&Rr(dr);return{exp:e.slice(0,fr),key:e.slice(fr+1,pr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Er(){return ur.charCodeAt(++lr)}function Pr(){return lr>=cr}function $r(e){return 34===e||39===e}function Rr(e){var t=1;for(fr=lr;!Pr();)if($r(e=Er()))Ar(e);else if(91===e&&t++,93===e&&t--,0===t){pr=lr;break}}function Ar(e){for(var t=e;!Pr()&&(e=Er())!==t;);}var Dr,Mr="__r",jr="__c";function Ir(e,t,n,r,i){var a,o,s,c,u;t=(a=t)._withTask||(a._withTask=function(){Ke=!0;var e=a.apply(null,arguments);return Ke=!1,e}),n&&(o=t,s=e,c=r,u=Dr,t=function e(){null!==o.apply(null,arguments)&&Lr(s,e,c,u)}),Dr.addEventListener(e,t,te?{capture:r,passive:i}:r)}function Lr(e,t,n,r){(r||Dr).removeEventListener(e,t._withTask||t,n)}function Nr(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},a=e.data.on||{};Dr=t.elm,function(e){if(i(e[Mr])){var t=W?"change":"input";e[t]=[].concat(e[Mr],e[t]||[]),delete e[Mr]}i(e[jr])&&(e.change=[].concat(e[jr],e.change||[]),delete e[jr])}(n),it(n,a,Ir,Lr,t.context),Dr=void 0}}var Ur={create:Nr,update:Nr};function Fr(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,a,o,s,c=t.elm,u=e.data.domProps||{},d=t.data.domProps||{};i(d.__ob__)&&(d=t.data.domProps=E({},d));for(n in u)r(d[n])&&(c[n]="");for(n in d){if(a=d[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),a===u[n])continue;1===c.childNodes.length&&c.removeChild(c.childNodes[0])}if("value"===n){c._value=a;var l=r(a)?"":String(a);s=l,(o=c).composing||"OPTION"!==o.tagName&&!function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(o,s)&&!function(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return p(n)!==p(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(o,s)||(c.value=l)}else c[n]=a}}}var Br={create:Fr,update:Fr},Gr=w(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function Hr(e){var t=Vr(e.style);return e.staticStyle?E(e.staticStyle,t):t}function Vr(e){return Array.isArray(e)?P(e):"string"==typeof e?Gr(e):e}var zr,Jr=/^--/,qr=/\s*!important$/,Kr=function(e,t,n){if(Jr.test(t))e.style.setProperty(t,n);else if(qr.test(n))e.style.setProperty(t,n.replace(qr,""),"important");else{var r=Xr(t);if(Array.isArray(n))for(var i=0,a=n.length;i-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function ei(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function ti(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&E(t,ni(e.name||"v")),E(t,e),t}return"string"==typeof e?ni(e):void 0}}var ni=w(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),ri=z&&!X,ii="transition",ai="animation",oi="transition",si="transitionend",ci="animation",ui="animationend";ri&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(oi="WebkitTransition",si="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ci="WebkitAnimation",ui="webkitAnimationEnd"));var di=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function li(e){di(function(){di(e)})}function fi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Yr(e,t))}function pi(e,t){e._transitionClasses&&g(e._transitionClasses,t),ei(e,t)}function vi(e,t,n){var r=mi(e,t),i=r.type,a=r.timeout,o=r.propCount;if(!i)return n();var s=i===ii?si:ui,c=0,u=function(){e.removeEventListener(s,d),n()},d=function(t){t.target===e&&++c>=o&&u()};setTimeout(function(){c0&&(n=ii,d=o,l=a.length):t===ai?u>0&&(n=ai,d=u,l=c.length):l=(n=(d=Math.max(o,u))>0?o>u?ii:ai:null)?n===ii?a.length:c.length:0,{type:n,timeout:d,propCount:l,hasTransform:n===ii&&hi.test(r[oi+"Property"])}}function gi(e,t){for(;e.length1}function ki(e,t){!0!==t.data.show&&bi(t)}var xi=function(e){var t,n,s={},c=e.modules,u=e.nodeOps;for(t=0;tv?b(e,r(n[g+1])?null:n[g+1].elm,n,p,g,a):p>g&&C(0,t,f,v)}(c,p,v,n,o):i(v)?(i(e.text)&&u.setTextContent(c,""),b(c,null,v,0,v.length-1,n)):i(p)?C(0,p,0,p.length-1):i(e.text)&&u.setTextContent(c,""):e.text!==t.text&&u.setTextContent(c,t.text),i(f)&&i(d=f.hook)&&i(d=d.postpatch)&&d(e,t)}}}function T(e,t,n){if(a(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r-1,o.selected!==a&&(o.selected=a);else if(D(Pi(o),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Ei(e,t){return t.every(function(t){return!D(t,e)})}function Pi(e){return"_value"in e?e._value:e.value}function $i(e){e.target.composing=!0}function Ri(e){e.target.composing&&(e.target.composing=!1,Ai(e.target,"input"))}function Ai(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Di(e){return!e.componentInstance||e.data&&e.data.transition?e:Di(e.componentInstance._vnode)}var Mi={model:Ti,show:{bind:function(e,t,n){var r=t.value,i=(n=Di(n)).data&&n.data.transition,a=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,bi(n,function(){e.style.display=a})):e.style.display=r?a:"none"},update:function(e,t,n){var r=t.value;r!==t.oldValue&&((n=Di(n)).data&&n.data.transition?(n.data.show=!0,r?bi(n,function(){e.style.display=e.__vOriginalDisplay}):wi(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},ji={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ii(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Ii(lt(t.children)):e}function Li(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var a in i)t[_(a)]=i[a];return t}function Ni(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ui={name:"transition",props:ji,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag||dt(e)})).length){0;var r=this.mode;0;var i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var a=Ii(i);if(!a)return i;if(this._leaving)return Ni(e,i);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c,u,d=(a.data||(a.data={})).transition=Li(this),l=this._vnode,f=Ii(l);if(a.data.directives&&a.data.directives.some(function(e){return"show"===e.name})&&(a.data.show=!0),f&&f.data&&(c=a,(u=f).key!==c.key||u.tag!==c.tag)&&!dt(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var p=f.data.transition=E({},d);if("out-in"===r)return this._leaving=!0,at(p,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Ni(e,i);if("in-out"===r){if(dt(a))return l;var v,h=function(){v()};at(d,"afterEnter",h),at(d,"enterCancelled",h),at(p,"delayLeave",function(e){v=e})}}return i}}},Fi=E({tag:String,moveClass:String},ji);function Bi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Gi(e){e.data.newPos=e.elm.getBoundingClientRect()}function Hi(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var a=e.elm.style;a.transform=a.WebkitTransform="translate("+r+"px,"+i+"px)",a.transitionDuration="0s"}}delete Fi.mode;var Vi={Transition:Ui,TransitionGroup:{props:Fi,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],a=this.children=[],o=Li(this),s=0;s-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},E(pn.options.directives,Mi),E(pn.options.components,Vi),pn.prototype.__patch__=z?xi:$,pn.prototype.$mount=function(e,t){return e=e&&z?Vn(e):void 0,r=e,i=t,(n=this).$el=r,n.$options.render||(n.$options.render=ve),Ct(n,"beforeMount"),new $t(n,function(){n._update(n._render(),i)},$,null,!0),i=!1,null==n.$vnode&&(n._isMounted=!0,Ct(n,"mounted")),n;var n,r,i},pn.nextTick(function(){U.devtools&&ie&&ie.emit("init",pn)},0);var zi=/\{\{((?:.|\n)+?)\}\}/g,Ji=/[-.*+?^${}()|[\]\/\\]/g,qi=w(function(e){var t=e[0].replace(Ji,"\\$&"),n=e[1].replace(Ji,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});function Ki(e,t){var n=t?qi(t):zi;if(n.test(e)){for(var r,i,a,o=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(i=r.index)>c&&(s.push(a=e.slice(c,i)),o.push(JSON.stringify(a)));var u=mr(r[1].trim());o.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ra="[a-zA-Z_][\\w\\-\\.]*",ia="((?:"+ra+"\\:)?"+ra+")",aa=new RegExp("^<"+ia),oa=/^\s*(\/?)>/,sa=new RegExp("^<\\/"+ia+"[^>]*>"),ca=/^]+>/i,ua=/^/g,"$1").replace(//g,"$1")),ya(d,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-f.length,e=f,S(d,c-u,c)}else{var p=e.indexOf("<");if(0===p){if(ua.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v)),k(v+3);continue}}if(da.test(e)){var h=e.indexOf("]>");if(h>=0){k(h+2);continue}}var m=e.match(ca);if(m){k(m[0].length);continue}var g=e.match(sa);if(g){var y=c;k(g[0].length),S(g[1],y,c);continue}var b=x();if(b){T(b),ya(r,e)&&k(1);continue}}var w=void 0,C=void 0,_=void 0;if(p>=0){for(C=e.slice(p);!(sa.test(C)||aa.test(C)||ua.test(C)||da.test(C)||(_=C.indexOf("<",1))<0);)p+=_,C=e.slice(p);w=e.substring(0,p),k(p)}p<0&&(w=e,e=""),t.chars&&w&&t.chars(w)}if(e===n){t.chars&&t.chars(e);break}}function k(t){c+=t,e=e.substring(t)}function x(){var t=e.match(aa);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(k(t[0].length);!(n=e.match(oa))&&(r=e.match(na));)k(r[0].length),i.attrs.push(r);if(n)return i.unarySlash=n[1],k(n[0].length),i.end=c,i}}function T(e){var n=e.tagName,c=e.unarySlash;a&&("p"===r&&ta(n)&&S(r),s(n)&&r===n&&S(n));for(var u,d,l,f=o(n)||!!c,p=e.attrs.length,v=new Array(p),h=0;h=0&&i[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var u=i.length-1;u>=o;u--)t.end&&t.end(i[u].tag,n,a);i.length=o,r=o&&i[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,a):"p"===s&&(t.start&&t.start(e,[],!1,n,a),t.end&&t.end(e,n,a))}S()}(e,{warn:ba,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,a,u){var d=r&&r.ns||Sa(e);W&&"svg"===d&&(a=function(e){for(var t=[],n=0;n-1"+("true"===p?":("+u+")":":_q("+u+","+p+")")),kr(c,"change","var $$a="+u+",$$el=$event.target,$$c=$$el.checked?("+p+"):("+v+");if(Array.isArray($$a)){var $$v="+(l?"_n("+f+")":f)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+u+"=$$a.concat([$$v]))}else{$$i>-1&&("+u+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+Or(u,"$$c")+"}",null,!0);else if("input"===C&&"radio"===_)r=e,i=b,o=(a=w)&&a.number,s=xr(r,"value")||"null",wr(r,"checked","_q("+i+","+(s=o?"_n("+s+")":s)+")"),kr(r,"change",Or(i,s),null,!0);else if("input"===C||"textarea"===C)!function(e,t,n){var r=e.attrsMap.type,i=n||{},a=i.lazy,o=i.number,s=i.trim,c=!a&&"range"!==r,u=a?"change":"range"===r?Mr:"input",d="$event.target.value";s&&(d="$event.target.value.trim()"),o&&(d="_n("+d+")");var l=Or(t,d);c&&(l="if($event.target.composing)return;"+l),wr(e,"value","("+t+")"),kr(e,u,l,null,!0),(s||o)&&kr(e,"blur","$forceUpdate()")}(e,b,w);else if(!U.isReservedTag(C))return Sr(e,b,w),!1;return!0},text:function(e,t){t.value&&wr(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&wr(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:Yi,mustUseProp:Sn,canBeLeftOpenTag:ea,isReservedTag:Fn,getTagNamespace:Bn,staticKeys:(Ja=za,Ja.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(","))},Xa=w(function(e){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))});function Za(e,t){e&&(qa=Xa(t.staticKeys||""),Ka=t.isReservedTag||R,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||h(e.tag)||!Ka(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(qa)))}(t);if(1===t.type){if(!Ka(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n|^function\s*\(/,Ya=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,eo={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},to=function(e){return"if("+e+")return null;"},no={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:to("$event.target !== $event.currentTarget"),ctrl:to("!$event.ctrlKey"),shift:to("!$event.shiftKey"),alt:to("!$event.altKey"),meta:to("!$event.metaKey"),left:to("'button' in $event && $event.button !== 0"),middle:to("'button' in $event && $event.button !== 1"),right:to("'button' in $event && $event.button !== 2")};function ro(e,t,n){var r=t?"nativeOn:{":"on:{";for(var i in e)r+='"'+i+'":'+io(i,e[i])+",";return r.slice(0,-1)+"}"}function io(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return io(e,t)}).join(",")+"]";var n=Ya.test(t.value),r=Qa.test(t.value);if(t.modifiers){var i="",a="",o=[];for(var s in t.modifiers)if(no[s])a+=no[s],eo[s]&&o.push(s);else if("exact"===s){var c=t.modifiers;a+=to(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else o.push(s);return o.length&&(i+="if(!('button' in $event)&&"+o.map(ao).join("&&")+")return null;"),a&&(i+=a),"function($event){"+i+(n?t.value+"($event)":r?"("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function ao(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=eo[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key)"}var oo={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:$},so=function(e){this.options=e,this.warn=e.warn||yr,this.transforms=br(e.modules,"transformCode"),this.dataGenFns=br(e.modules,"genData"),this.directives=E(E({},oo),e.directives);var t=e.isReservedTag||R;this.maybeComponent=function(e){return!t(e.tag)},this.onceId=0,this.staticRenderFns=[]};function co(e,t){var n=new so(t);return{render:"with(this){return "+(e?uo(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function uo(e,t){if(e.staticRoot&&!e.staticProcessed)return lo(e,t);if(e.once&&!e.onceProcessed)return fo(e,t);if(e.for&&!e.forProcessed)return function(e,t,n,r){var i=e.for,a=e.alias,o=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";0;return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+a+o+s+"){return "+(n||uo)(e,t)+"})"}(e,t);if(e.if&&!e.ifProcessed)return po(e,t);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=mo(e,t),i="_t("+n+(r?","+r:""),a=e.attrs&&"{"+e.attrs.map(function(e){return _(e.name)+":"+e.value}).join(",")+"}",o=e.attrsMap["v-bind"];!a&&!o||r||(i+=",null");a&&(i+=","+a);o&&(i+=(a?"":",null")+","+o);return i+")"}(e,t);var n;if(e.component)o=e.component,c=t,u=(s=e).inlineTemplate?null:mo(s,c,!0),n="_c("+o+","+vo(s,c)+(u?","+u:"")+")";else{var r=e.plain?void 0:vo(e,t),i=e.inlineTemplate?null:mo(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var a=0;a':'
',ko.innerHTML.indexOf(" ")>0}var So=!!z&&To(!1),Oo=!!z&&To(!0),Eo=w(function(e){var t=Vn(e);return t&&t.innerHTML}),Po=pn.prototype.$mount;pn.prototype.$mount=function(e,t){if((e=e&&Vn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Eo(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){0;var i=xo(r,{shouldDecodeNewlines:So,shouldDecodeNewlinesForHref:Oo,delimiters:n.delimiters,comments:n.comments},this),a=i.render,o=i.staticRenderFns;n.render=a,n.staticRenderFns=o}}return Po.call(this,e,t)},pn.compile=xo,t.a=pn}).call(t,n("O3Ux"))},OCi4:function(e,t,n){"use strict";var r=n("coO1").log,i=n("coO1").browserDetails,a={shimMediaStream:function(){window.MediaStream=window.MediaStream||window.webkitMediaStream},shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){var t=this;this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.addEventListener("addtrack",function(n){var r=new Event("track");r.track=n.track,r.receiver={track:n.track},r.streams=[e.stream],t.dispatchEvent(r)}),e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var t=this;this._srcObject=e,this.src&&URL.revokeObjectURL(this.src),e?(this.src=URL.createObjectURL(e),e.addEventListener("addtrack",function(){t.src&&URL.revokeObjectURL(t.src),t.src=URL.createObjectURL(e)}),e.addEventListener("removetrack",function(){t.src&&URL.revokeObjectURL(t.src),t.src=URL.createObjectURL(e)})):this.src=""}}))},shimPeerConnection:function(){window.RTCPeerConnection=function(e,t){r("PeerConnection"),e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy);var n=new webkitRTCPeerConnection(e,t),i=n.getStats.bind(n);return n.getStats=function(e,t,n){var r=this,a=arguments;if(arguments.length>0&&"function"==typeof e)return i(e,t);var o=function(e){var t={};return e.result().forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t},s=function(e,t){var n=new Map(Object.keys(e).map(function(t){return[t,e[t]]}));return t=t||e,Object.keys(t).forEach(function(e){n[e]=t[e]}),n};if(arguments.length>=2){return i.apply(this,[function(e){a[1](s(o(e)))},arguments[0]])}return new Promise(function(t,n){1===a.length&&"object"==typeof e?i.apply(r,[function(e){t(s(o(e)))},n]):i.apply(r,[function(e){t(s(o(e),e.result()))},n])}).then(t,n)},n},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var n=1===arguments.length?arguments[0]:void 0;return new Promise(function(r,i){t.apply(e,[r,i,n])})}return t.apply(this,arguments)}}),i.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,n=this,r=new Promise(function(r,i){t.apply(n,[e[0],r,i])});return e.length<2?r:r.then(function(){e[1].apply(null,[])},function(t){e.length>=3&&e[2].apply(null,[t])})}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var e=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?e.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};e.exports={shimMediaStream:a.shimMediaStream,shimOnTrack:a.shimOnTrack,shimSourceObject:a.shimSourceObject,shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:n("5Q8m")}},TF1p:function(e,t,n){"use strict";!function(){var t=n("coO1").log,r=n("coO1").browserDetails;e.exports.browserDetails=r,e.exports.extractVersion=n("coO1").extractVersion,e.exports.disableLog=n("coO1").disableLog;var i=n("OCi4")||null,a=n("AFoL")||null,o=n("qYjD")||null,s=n("kJru")||null;switch(r.browser){case"opera":case"chrome":if(!i||!i.shimPeerConnection)return void t("Chrome shim is not included in this adapter release.");t("adapter.js shimming chrome."),e.exports.browserShim=i,i.shimGetUserMedia(),i.shimMediaStream(),i.shimSourceObject(),i.shimPeerConnection(),i.shimOnTrack();break;case"firefox":if(!o||!o.shimPeerConnection)return void t("Firefox shim is not included in this adapter release.");t("adapter.js shimming firefox."),e.exports.browserShim=o,o.shimGetUserMedia(),o.shimSourceObject(),o.shimPeerConnection(),o.shimOnTrack();break;case"edge":if(!a||!a.shimPeerConnection)return void t("MS edge shim is not included in this adapter release.");t("adapter.js shimming edge."),e.exports.browserShim=a,a.shimGetUserMedia(),a.shimPeerConnection();break;case"safari":if(!s)return void t("Safari shim is not included in this adapter release.");t("adapter.js shimming safari."),e.exports.browserShim=s,s.shimGetUserMedia();break;default:t("Unsupported browser!")}}()},"c/QV":function(e,t,n){"use strict";e.exports=function(){var e=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(t){return e(t).catch(function(e){return Promise.reject({name:{PermissionDeniedError:"NotAllowedError"}[(t=e).name]||t.name,message:t.message,constraint:t.constraint,toString:function(){return this.name}});var t})}}},coO1:function(e,t,n){"use strict";var r=!0,i={disableLog:function(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(r=e,e?"adapter.js logging disabled":"adapter.js logging enabled")},log:function(){if("object"==typeof window){if(r)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},extractVersion:function(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1);else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2);else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return e.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/([0-9]+)\./,1)}else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return e.browser="Not a supported browser.",e;e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2)}return e}};e.exports={log:i.log,disableLog:i.disableLog,browserDetails:i.detectBrowser(),extractVersion:i.extractVersion}},kJru:function(e,t,n){"use strict";var r={shimGetUserMedia:function(){navigator.getUserMedia=navigator.webkitGetUserMedia}};e.exports={shimGetUserMedia:r.shimGetUserMedia}},lFKW:function(e,t,n){n("TF1p");e.exports=function(e,t){var n,r="PermissionDeniedError",i="ConstraintNotSatisfiedError";return 2===arguments.length||(t=e,e={video:!0,audio:!0}),"undefined"!=typeof navigator&&navigator.getUserMedia?e.audio||e.video?void navigator.mediaDevices.getUserMedia(e).then(function(e){t(null,e)}).catch(function(e){var n;"string"==typeof e?(n=new Error("MediaStreamError")).name=e===r||"PERMISSION_DENIED"===e?r:i:(n=e).name||(n[r]?e.name=r:e.name=i),t(n)}):((n=new Error("MediaStreamError")).name="NoMediaRequestedError",setTimeout(function(){t(n)},0)):((n=new Error("MediaStreamError")).name="NotSupportedError",setTimeout(function(){t(n)},0))}},ngHh:function(e,t){e.exports=function(e,t,n,r,i,a){var o,s=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(o=e,s=e.default);var u,d="function"==typeof s?s.options:s;if(t&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0),n&&(d.functional=!0),i&&(d._scopeId=i),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=u):r&&(u=r),u){var l=d.functional,f=l?d.render:d.beforeCreate;l?(d._injectStyles=u,d.render=function(e,t){return u.call(t),f(e,t)}):d.beforeCreate=f?[].concat(f,u):[u]}return{esModule:o,exports:s,options:d}}},qYjD:function(e,t,n){"use strict";var r=n("coO1").browserDetails,i={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){if("object"==typeof window&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,t){if(r.version<38&&e&&e.iceServers){for(var n=[],i=0;i 2 | 3 | 4 | 5 | 6 | vue-camera 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-camera", 3 | "version": "1.0.2", 4 | "description": "vue-camera,一个自己写的vue插件,getusermedia调用摄像头拍照与生成canvas", 5 | "author": "pollux2015", 6 | "main": "src/index.js", 7 | "licence": "ISC", 8 | "scripts": { 9 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 10 | "start": "npm run dev", 11 | "build": "node build/build.js" 12 | }, 13 | "dependencies": { 14 | "vue": "^2.5.2", 15 | "getusermedia": "^2.0.1" 16 | }, 17 | "devDependencies": { 18 | "autoprefixer": "^7.1.2", 19 | "babel-core": "^6.22.1", 20 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 21 | "babel-loader": "^7.1.1", 22 | "babel-plugin-syntax-jsx": "^6.18.0", 23 | "babel-plugin-transform-runtime": "^6.22.0", 24 | "babel-plugin-transform-vue-jsx": "^3.5.0", 25 | "babel-preset-env": "^1.3.2", 26 | "babel-preset-stage-2": "^6.22.0", 27 | "chalk": "^2.0.1", 28 | "copy-webpack-plugin": "^4.0.1", 29 | "css-loader": "^0.28.0", 30 | "extract-text-webpack-plugin": "^3.0.0", 31 | "file-loader": "^1.1.4", 32 | "friendly-errors-webpack-plugin": "^1.6.1", 33 | "html-webpack-plugin": "^2.30.1", 34 | "node-notifier": "^5.1.2", 35 | "optimize-css-assets-webpack-plugin": "^3.2.0", 36 | "ora": "^1.2.0", 37 | "portfinder": "^1.0.13", 38 | "postcss-import": "^11.0.0", 39 | "postcss-loader": "^2.0.8", 40 | "postcss-url": "^7.2.1", 41 | "rimraf": "^2.6.0", 42 | "semver": "^5.3.0", 43 | "shelljs": "^0.7.6", 44 | "uglifyjs-webpack-plugin": "^1.1.1", 45 | "url-loader": "^0.5.8", 46 | "vue-loader": "^13.3.0", 47 | "vue-style-loader": "^3.0.1", 48 | "vue-template-compiler": "^2.5.2", 49 | "webpack": "^3.6.0", 50 | "webpack-bundle-analyzer": "^2.9.0", 51 | "webpack-dev-server": "^2.9.1", 52 | "webpack-merge": "^4.1.0" 53 | }, 54 | "engines": { 55 | "node": ">= 6.0.0", 56 | "npm": ">= 3.0.0" 57 | }, 58 | "browserslist": [ 59 | "> 1%", 60 | "last 2 versions", 61 | "not ie <= 8" 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import vueCamera from './vue-camera.vue'; 2 | export default vueCamera; -------------------------------------------------------------------------------- /src/vue-camera.vue: -------------------------------------------------------------------------------- 1 | 26 | 121 | 122 | 243 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pollux2015/vue-camera/2a1d04f46777bea6538ae5af5fd8f5e110bf4204/static/.gitkeep --------------------------------------------------------------------------------