decord/alpha/source/modules/media_engine/trackVideoToggle.tsx

64 lines
2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 14397
// Function ID: 14398
2026-07-20 16:05:17 +00:00
// Name: trackVideoToggle
2026-10-10 08:08:14 +00:00
// Dependencies: [1085, 5293, 1265, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, setVideoToggleAnalyticsParams
2026-10-13 12:43:34 +00:00
// Module 14397 (trackVideoToggle)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
2026-10-10 08:08:14 +00:00
import VideoHealthManager from "VideoHealthManager" /* 5293 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const AnalyticEvents = Constants.AnalyticEvents;
const result = size.fileFinishedImporting("modules/media_engine/trackVideoToggle.tsx");
2026-07-20 16:05:17 +00:00
export default function trackVideoToggle(toggled_user_id, video_toggle_reason, is_video_shown) {
2026-10-03 08:58:59 +00:00
let allowedPoorFpsRatio;
let backoffTimeSec;
let fpsThreshold;
let tmp2;
let tmp3;
let tmp4;
let tmp5;
let tmp6;
let tmp7;
let windowLength;
const defaultConfig = VideoHealthManager.VideoHealthManager.defaultConfig;
2026-07-20 16:05:17 +00:00
const featureEnabled = defaultConfig.featureEnabled;
({ windowLength, allowedPoorFpsRatio, fpsThreshold, backoffTimeSec } = defaultConfig);
2026-10-03 08:58:59 +00:00
const obj = { video_toggle_reason, toggled_user_id, rtc_connection_id: tmp2, media_session_id: tmp3, video_health_manager_window_length: tmp4, video_health_manager_poor_fps_ratio: tmp5, video_health_manager_fps_threshold: tmp6, is_video_shown, video_health_manager_backoff_time_seconds: tmp7 };
tmp2 = undefined;
const track = AnalyticsUtilsDefault.track;
const VIDEO_TOGGLED = AnalyticEvents.VIDEO_TOGGLED;
AnalyticsUtilsDefault;
if (_false != null) {
tmp2 = _false();
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
tmp3 = undefined;
if (React3 != null) {
tmp3 = React3();
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
tmp4 = null;
2026-07-20 16:05:17 +00:00
if (featureEnabled) {
2026-10-03 08:58:59 +00:00
tmp4 = windowLength;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
tmp5 = null;
2026-07-20 16:05:17 +00:00
if (featureEnabled) {
2026-10-03 08:58:59 +00:00
tmp5 = allowedPoorFpsRatio;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
tmp6 = null;
2026-07-20 16:05:17 +00:00
if (featureEnabled) {
2026-10-03 08:58:59 +00:00
tmp6 = fpsThreshold;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
tmp7 = null;
2026-07-20 16:05:17 +00:00
if (featureEnabled) {
2026-10-03 08:58:59 +00:00
tmp7 = backoffTimeSec;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
track(VIDEO_TOGGLED, obj);
2026-07-20 16:05:17 +00:00
};
export function setVideoToggleAnalyticsParams(getRTCConnectionId, getMediaSessionId) {
2026-10-03 08:58:59 +00:00
let closure_1_3 = getRTCConnectionId;
let closure_1_4 = getMediaSessionId;
2026-07-20 16:05:17 +00:00
}