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 { f7 } from 'framework7-vue'
|
||||||
|
|
||||||
|
import detectionWorker from '../assets/detect-worker.js?sharedworker'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
async openCamera(imContain) {
|
async openCamera(imContain) {
|
||||||
@@ -42,7 +44,8 @@ export default {
|
|||||||
this.getImage(tempCVS.toDataURL())
|
this.getImage(tempCVS.toDataURL())
|
||||||
},
|
},
|
||||||
async videoFrameDetect (vidData) {
|
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) => {
|
vidWorker.port.onmessage = (eVid) => {
|
||||||
self = this
|
self = this
|
||||||
if (eVid.data.error) {
|
if (eVid.data.error) {
|
||||||
|
|||||||
@@ -140,6 +140,8 @@
|
|||||||
import detectionMixin from './detection-mixin'
|
import detectionMixin from './detection-mixin'
|
||||||
import cameraMixin from './camera-mixin'
|
import cameraMixin from './camera-mixin'
|
||||||
|
|
||||||
|
import detectionWorker from '../assets/detect-worker.js?sharedworker'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [submitMixin, detectionMixin, cameraMixin],
|
mixins: [submitMixin, detectionMixin, cameraMixin],
|
||||||
props: {
|
props: {
|
||||||
@@ -216,7 +218,9 @@
|
|||||||
this.detectWorkerURL = new URL('../assets/detect-worker.js', import.meta.url)
|
this.detectWorkerURL = new URL('../assets/detect-worker.js', import.meta.url)
|
||||||
},
|
},
|
||||||
mounted () {
|
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) => {
|
mountWorker.port.onmessage = (eMount) => {
|
||||||
self = this
|
self = this
|
||||||
if (eMount.data.error) {
|
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)`
|
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 () {
|
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) => {
|
detectWorker.port.onmessage = (eDetect) => {
|
||||||
self = this
|
self = this
|
||||||
if (eDetect.data.error) {
|
if (eDetect.data.error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user