import { RTCEncryptionAlgorithm, RTCEncryptionTrackType, type RTCEncryptionEventData } from '@stream-io/react-native-webrtc'; import type { E2EEAlgorithm, E2EEEventMap } from '@stream-io/video-client'; /** * The core RTC layer labels tracks with the `TrackType` enum *name* * (`SfuModels.TrackType[trackType]`), while the native manager takes a numeric * enum. Screen-share audio is deliberately its own value: native keeps replay * state per (userId, trackType), so folding it into `AUDIO` mis-groups it. * * These read the native enums inside the function body on purpose. This module * is reachable from the SDK's public entry point, so an app whose * `@stream-io/react-native-webrtc` predates E2EE would crash on import if the * enums were dereferenced at module scope - even if it never touches E2EE. */ export declare const trackTypeToNative: (trackType?: string) => RTCEncryptionTrackType | undefined; /** Map a native track type back to the name the web events carry. */ export declare const trackTypeFromNative: (trackType?: RTCEncryptionTrackType | number) => string | undefined; /** Map the public algorithm name to the native enum. */ export declare const algorithmToNative: (algorithm: E2EEAlgorithm) => RTCEncryptionAlgorithm; /** * Translate a native event into the payload the web manager emits, so a host * can write one set of handlers for both platforms. * * Two things have to be reshaped rather than passed through: native track types * are numeric, and native flattens `managerId`/`type`/`userId` alongside the * payload of every event, including the two (`perf_report`, `key_state`) that * are not about a single user. Fields the web types require but native leaves * optional get an explicit default, so a handler never reads `undefined` where * its type promises a value. * * @returns the mapped event, or `undefined` for an unrecognized event name. */ export declare const mapNativeEvent: (event: RTCEncryptionEventData) => { type: E; payload: E2EEEventMap[E]; } | undefined; /** Every event the native manager emits, i.e. what the bridge subscribes to. */ export declare const E2EE_EVENT_TYPES: readonly ["e2ee.decryption_failed", "e2ee.decryption_resumed", "e2ee.decryption_stalled", "e2ee.encryption_failed", "e2ee.missing_key", "e2ee.unencrypted_frame", "e2ee.unsupported_version", "e2ee.perf_report", "e2ee.key_state"]; //# sourceMappingURL=eventMapping.d.ts.map