Change vite shared worker to query suffix
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 34s
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 34s
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { f7 } from 'framework7-vue'
|
||||
|
||||
import detectionWorker from '../assets/detect-worker.js?sharedworker'
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
async openCamera(imContain) {
|
||||
@@ -42,7 +44,8 @@ export default {
|
||||
this.getImage(tempCVS.toDataURL())
|
||||
},
|
||||
async videoFrameDetect (vidData) {
|
||||
const vidWorker = new SharedWorker(this.detectWorkerURL,{type: 'module'})
|
||||
//const vidWorker = new SharedWorker(this.detectWorkerURL,{type: 'module'})
|
||||
const vidWorker = new detectionWorker()
|
||||
vidWorker.port.onmessage = (eVid) => {
|
||||
self = this
|
||||
if (eVid.data.error) {
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
import detectionMixin from './detection-mixin'
|
||||
import cameraMixin from './camera-mixin'
|
||||
|
||||
import detectionWorker from '../assets/detect-worker.js?sharedworker'
|
||||
|
||||
export default {
|
||||
mixins: [submitMixin, detectionMixin, cameraMixin],
|
||||
props: {
|
||||
@@ -216,7 +218,9 @@
|
||||
this.detectWorkerURL = new URL('../assets/detect-worker.js', import.meta.url)
|
||||
},
|
||||
mounted () {
|
||||
const mountWorker = new SharedWorker(this.detectWorkerURL,{type: 'module'})
|
||||
console.log(this.detectWorkerURL)
|
||||
//const mountWorker = new SharedWorker(this.detectWorkerURL,{type: 'module'})
|
||||
const mountWorker = new detectionWorker()
|
||||
mountWorker.port.onmessage = (eMount) => {
|
||||
self = this
|
||||
if (eMount.data.error) {
|
||||
@@ -293,7 +297,8 @@
|
||||
return `--chip-media-gradient: conic-gradient(from ${270 - (confFactor * 360 / 2)}deg, hsl(${confFactor * 120}deg, 100%, 50%) ${confFactor}turn, hsl(${confFactor * 120}deg, 50%, 66%) ${confFactor}turn)`
|
||||
},
|
||||
async setData () {
|
||||
const detectWorker = new SharedWorker(this.detectWorkerURL,{type: 'module'})
|
||||
//const detectWorker = new SharedWorker(this.detectWorkerURL,{type: 'module'})
|
||||
const detectWorker = new detectionWorker()
|
||||
detectWorker.port.onmessage = (eDetect) => {
|
||||
self = this
|
||||
if (eDetect.data.error) {
|
||||
|
||||
Reference in New Issue
Block a user