decord/source/modules/go_live/utils/trackStreamProblem.tsx

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-26 06:04:24 +00:00
// Module ID: 16643
// Function ID: 16644
2026-07-20 16:05:17 +00:00
// Name: trackStreamProblem
2026-07-29 08:29:29 +00:00
// Dependencies: [676, 698, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-26 06:04:24 +00:00
// Module 16643 (trackStreamProblem)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import expandEventPropertiesDefault from "expandEventProperties" /* 698 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const AnalyticEvents = ME.AnalyticEvents;
const result = set.fileFinishedImporting("modules/go_live/utils/trackStreamProblem.tsx");
2026-07-20 16:05:17 +00:00
export default function trackStreamProblem(arg0) {
({ stream, streamApplication, analyticsData, rating } = arg0);
({ problem, feedback, location: _location } = arg0);
if (rating === undefined) {
rating = null;
}
({ category, variant } = arg0);
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
obj = { reason: problem, category, reason_variant: variant, streamer_user_id: stream.ownerId, stream_channel_id: stream.channelId, guild_id: stream.guildId, application_id: null, application_name: null, location: null, rating: null, feedback: null };
2026-07-20 16:05:17 +00:00
let id = null;
if (null != streamApplication) {
id = streamApplication.id;
}
2026-07-29 08:29:29 +00:00
obj[6] = id;
2026-07-20 16:05:17 +00:00
let name = null;
if (null != streamApplication) {
name = streamApplication.name;
}
2026-07-29 08:29:29 +00:00
obj[7] = name;
obj[8] = _location;
obj[9] = rating;
obj[10] = feedback;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(analyticsData);
obj.track(AnalyticEvents.STREAM_REPORT_PROBLEM, obj);
};