mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-02 21:58:29 +00:00
wip enhance analytics
This commit is contained in:
+11
-1
@@ -142,10 +142,20 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
||||
this.processedTrack = tracks[0]
|
||||
|
||||
this.segmentationMask = new ImageData(PROCESSING_WIDTH, PROCESSING_HEIGHT)
|
||||
|
||||
const t0 = performance.now()
|
||||
await this.initSegmenter()
|
||||
const segmenterInitMs = Math.round(performance.now() - t0)
|
||||
|
||||
this._initWorker()
|
||||
|
||||
captureEvent('firefox-blurring-init', {})
|
||||
captureEvent('legacy-background-processor', {
|
||||
effect_type: this.options.type,
|
||||
hw_concurrency: navigator.hardwareConcurrency,
|
||||
video_width: this.videoElement?.videoWidth,
|
||||
video_height: this.videoElement?.videoHeight,
|
||||
segmenter_init_ms: segmenterInitMs,
|
||||
})
|
||||
}
|
||||
|
||||
_initVirtualBackgroundImage() {
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { Track, TrackProcessor } from 'livekit-client'
|
||||
import { BackgroundCustomProcessor } from './BackgroundCustomProcessor'
|
||||
import { UnifiedBackgroundTrackProcessor } from './UnifiedBackgroundTrackProcessor'
|
||||
import { FaceLandmarksOptions } from './FaceLandmarksProcessor'
|
||||
import { captureEvent } from '@/features/analytics/telemetry'
|
||||
|
||||
export const SELFIE_SEGMENTER_MODEL_PATH =
|
||||
'/assets/mediapipe/models/selfie_segmenter_landscape.tflite'
|
||||
@@ -43,6 +44,13 @@ export class BackgroundProcessorFactory {
|
||||
this._isSupported =
|
||||
supportsBackgroundProcessors() || BackgroundCustomProcessor.isSupported
|
||||
}
|
||||
|
||||
if (!this._isSupported) {
|
||||
captureEvent('background-processor-unsupported', {
|
||||
path: 'isSupported',
|
||||
})
|
||||
}
|
||||
|
||||
return this._isSupported
|
||||
}
|
||||
|
||||
@@ -62,6 +70,10 @@ export class BackgroundProcessorFactory {
|
||||
return new BackgroundCustomProcessor(config)
|
||||
}
|
||||
|
||||
captureEvent('background-processor-unsupported', {
|
||||
path: 'getProcessor',
|
||||
})
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user