mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-31 04:37:57 +00:00
♻️(frontend) prefer captureMediaEvent over reportError when no-op
Switch calls to `reportError` over to `captureMediaEvent` when the underlying situation is not an engineering issue to investigate but rather a media-related event worth tracking (e.g. no camera or microphone available on the user's device). `reportError` stays reserved for actual errors that warrant an engineer's attention.
This commit is contained in:
committed by
aleb_the_flash
parent
199c0297d4
commit
ab40ec365d
@@ -22,6 +22,7 @@ and this project adheres to
|
|||||||
- ♻️(frontend) encapsulate PostHog capture calls in the telemetry module
|
- ♻️(frontend) encapsulate PostHog capture calls in the telemetry module
|
||||||
- 🔧(frontend) sync persisted device ids with the actual selected devices
|
- 🔧(frontend) sync persisted device ids with the actual selected devices
|
||||||
- 💄(frontend) hide the ProConnect button on narrow viewports
|
- 💄(frontend) hide the ProConnect button on narrow viewports
|
||||||
|
- ♻️(frontend) prefer captureMediaEvent over reportError when no-op
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,8 @@ export const captureMediaEvent = async (
|
|||||||
| 'media-acquisition'
|
| 'media-acquisition'
|
||||||
| 'media-device-topology'
|
| 'media-device-topology'
|
||||||
| 'media-device-success'
|
| 'media-device-success'
|
||||||
| 'device-not-found',
|
| 'device-not-found'
|
||||||
|
| 'permissions-denied',
|
||||||
props: Record<string, unknown>
|
props: Record<string, unknown>
|
||||||
) => {
|
) => {
|
||||||
captureEvent(event, { ...props, ...(await deviceSnapshot()) })
|
captureEvent(event, { ...props, ...(await deviceSnapshot()) })
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
notePermissionDeniedFromGum,
|
notePermissionDeniedFromGum,
|
||||||
type PermissionKind,
|
type PermissionKind,
|
||||||
} from '@/stores/permissions'
|
} from '@/stores/permissions'
|
||||||
import { reportError } from '@/features/analytics/telemetry'
|
import { captureMediaEvent, reportError } from '@/features/analytics/telemetry'
|
||||||
import {
|
import {
|
||||||
saveAudioInputDeviceId,
|
saveAudioInputDeviceId,
|
||||||
saveAudioInputEnabled,
|
saveAudioInputEnabled,
|
||||||
@@ -39,12 +39,21 @@ const PERMISSION_KIND: Record<'audioinput' | 'videoinput', PermissionKind> = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const onJoinPreviewError = (e: Error, kind?: PermissionKind) => {
|
export const onJoinPreviewError = (e: Error, kind?: PermissionKind) => {
|
||||||
reportError('join_preview_failure', e, { path: 'join_preview', kind })
|
|
||||||
if (
|
if (
|
||||||
MediaDeviceFailure.getFailure(e) === MediaDeviceFailure.PermissionDenied
|
MediaDeviceFailure.getFailure(e) === MediaDeviceFailure.PermissionDenied
|
||||||
) {
|
) {
|
||||||
notePermissionDeniedFromGum(kind)
|
notePermissionDeniedFromGum(kind)
|
||||||
|
captureMediaEvent('permissions-denied', { path: 'join_preview', kind })
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MediaDeviceFailure.getFailure(e) === MediaDeviceFailure.NotFound) {
|
||||||
|
captureMediaEvent('device-not-found', { path: 'join_preview', kind })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// "Other" and "Device in use" are still reported as errors, as they are not handled on the join screen.
|
||||||
|
reportError('join_preview_failure', e, { path: 'join_preview', kind })
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module-level: effect dependencies, must be referentially stable.
|
// Module-level: effect dependencies, must be referentially stable.
|
||||||
|
|||||||
Reference in New Issue
Block a user