Skip to content

Commit fb3cfed

Browse files
committed
Add workaround for getCapabilities not exists
1 parent f8a7abf commit fb3cfed

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/QRScanner.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
</template>
2121

2222
<script>
23-
import { QrcodeStream } from 'vue-qrcode-reader'
24-
2523
export default {
2624
name: 'QRScanner',
27-
components: { QrcodeStream },
2825
props: {
2926
title: {
3027
type: String,

src/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ import router from './router'
44
import Components from './components'
55
import i18n from './i18n'
66
import store from './store'
7+
import VueQrcodeReader from 'vue-qrcode-reader'
78

89
Vue.config.productionTip = false
10+
Vue.use(VueQrcodeReader)
11+
12+
if (!MediaStreamTrack.prototype.getCapabilities) {
13+
MediaStreamTrack.prototype.getCapabilities = () => {}
14+
}
915

1016
Object.keys(Components).forEach(key => {
1117
Vue.component(key, Components[key])

0 commit comments

Comments
 (0)