100 lines
5.5 KiB
TypeScript
100 lines
5.5 KiB
TypeScript
/* Metro module 10680; source: lib/VideoSpinnerTimer.tsx; dependencies: [6, 7, 1226, 1379, 4401, 4294, 4297, 661, 3, 4303, 683, 2] */
|
|
function _fun82116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:6, offset: 0x01eebbcd, size: 350 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
|
|
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
|
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
|
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
const Map = global.Map;
|
|
let map = new Map();
|
|
map = _fun82117();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VideoSpinnerTimer.tsx');
|
|
exports.VideoSpinnerContext = {SELF_VIDEO: 'self_video', SELF_STREAM: 'self_stream', REMOTE_VIDEO: 'remote_video',
|
|
REMOTE_STREAM: 'remote_stream', CHANGE_VIDEO_BACKGROUND: 'change_video_background',
|
|
REPLAY_VIDEO_STREAM: 'replay_video_stream'};
|
|
exports.VideoSpinnerTimer = map;
|
|
}
|
|
|
|
function _fun82117() { // fn#82117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:447, offset: 0x01eebd2b, size: 88 bytes, params: 1, frame: 15
|
|
return env0_4(VideoSpinnerTimer, [{key: 'onSpinnerStarted', value: value_82119}, {key: 'trackSpinnerDuration',
|
|
value: value_82120}]);
|
|
}
|
|
|
|
function VideoSpinnerTimer(a0) { // fn#82118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:468, offset: 0x01eebd83, size: 84 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__;
|
|
env1_3(this, VideoSpinnerTimer);
|
|
this.spinnerVisibleStart = null;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value(a0);
|
|
this.logger = value;
|
|
}
|
|
|
|
function value_82119() { // fn#82119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:615, offset: 0x01eebdd7, size: 59 bytes, params: 1, frame: 12
|
|
var value;
|
|
if (this.spinnerVisibleStart == null) {
|
|
value = environment.__proto__;
|
|
value = require(4303) /* metro dependency 4303: TimeUtils */;
|
|
this.spinnerVisibleStart = value.now();
|
|
}
|
|
}
|
|
|
|
function value_82120(a0, a1, a2) { // fn#82120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:735, offset: 0x01eebe12, size: 575 bytes, params: 4, frame: 27
|
|
var r6;
|
|
var value2;
|
|
var binding;
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
var value7;
|
|
var guildId;
|
|
var value9;
|
|
var channel;
|
|
var track;
|
|
var VIDEO_SPINNER_SHOWN_V2;
|
|
var object2;
|
|
const spinnerVisibleStart = this.spinnerVisibleStart;
|
|
let value = null;
|
|
if (value != spinnerVisibleStart) {
|
|
value2 = environment.__proto__;
|
|
binding = env1_11;
|
|
value3 = binding.get(a2);
|
|
value4 = 0;
|
|
value5 = (value != value3 ? value3 : value4) + 1;
|
|
binding = env1_11;
|
|
binding.set(a2, value5);
|
|
value7 = (require(4303) /* metro dependency 4303: TimeUtils */).now() - this.spinnerVisibleStart;
|
|
this.spinnerVisibleStart = value;
|
|
if (value7 < value4) {
|
|
this.logger.warn('spinner duration is negative: ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
|
|
} else {
|
|
this.logger.info('spinner visible for ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
|
|
guildId = RTCConnectionStore.getGuildId();
|
|
value9 = VoiceStateStore.getUserVoiceChannelId(guildId, AuthenticationStore.getId());
|
|
channel = ChannelStore.getChannel(value9);
|
|
r6 = value != channel ? channel.isGuildVoice() ? 'guild_voice' : channel.isGuildStageVoice() ? 'is_stage_channel' : channel.isDM() ? 'dm' : channel.isGroupDM() ? 'group_dm' : value : value;
|
|
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = value.track;
|
|
VIDEO_SPINNER_SHOWN_V2 = AnalyticEvents.VIDEO_SPINNER_SHOWN_V2;
|
|
object2 = {video_spinner_context: a0, duration_video_spinner_visible_ms: value7};
|
|
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
|
|
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
|
|
object2.event_count_for_stream = value5;
|
|
object2.guild_id = guildId;
|
|
object2.channel_id = value9;
|
|
object2.channel_type = r6;
|
|
object2.spinning_user_id = a1;
|
|
object2.connection_type = NetworkStore.getType();
|
|
object2.effective_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
|
|
object2.service_provider = NetworkStore.getServiceProvider();
|
|
Reflect.apply(track, value, [VIDEO_SPINNER_SHOWN_V2, object2]);
|
|
}
|
|
}
|
|
}
|
|
|