aliyun-rtc-sdk 7.2.6 → 7.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aliyun-rtc-sdk.es.js +457 -442
- package/dist/aliyun-rtc-sdk.umd.js +11 -11
- package/dist/types/index.d.ts +5 -0
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ var Ki = (a, s, e) => s in a ? Gn(a, s, { enumerable: !0, configurable: !0, writ
|
|
|
8
8
|
for (var e of Ei(s))
|
|
9
9
|
Zr.call(s, e) && Ki(a, e, s[e]);
|
|
10
10
|
return a;
|
|
11
|
-
},
|
|
11
|
+
}, dt = (a, s) => Xn(a, Qn(s));
|
|
12
12
|
var At = (a, s) => {
|
|
13
13
|
var e = {};
|
|
14
14
|
for (var t in a)
|
|
@@ -36,9 +36,9 @@ var _ = (a, s, e) => new Promise((t, i) => {
|
|
|
36
36
|
}, o = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(r, n);
|
|
37
37
|
o((e = e.apply(a, s)).next());
|
|
38
38
|
});
|
|
39
|
-
import { AliRTS as fe, EConnectStatus as
|
|
39
|
+
import { AliRTS as fe, EConnectStatus as Ni, EDatachannelStatus as es } from "aliyun-rts-sdk";
|
|
40
40
|
import je from "eventemitter3";
|
|
41
|
-
var mn = ((a) => (a.EnableNonOnePcDefaultJoinMode = "h5_enable_non_one_pc_default_join_mode", a))(mn || {}), Vt = ((a) => (a.prod = "rs.rtn.aliyuncs.com", a.pre = "prs.rtn.aliyuncs.com", a))(Vt || {}), ft = ((a) => (a.pre = "pre", a.prod = "prod", a))(ft || {}), Dt = ((a) => (a.AliRtcSdkCommunication = "communication", a.AliRtcSdkInteractiveLive = "interactive_live", a.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", a))(Dt || {}), $t = ((a) => (a.AliRtcSdkInteractive = "interactive", a.AliRtcSdkLive = "live", a))($t || {}), It = ((a) => (a[a.AliEngineLocalDeviceTypeUnknown = 0] = "AliEngineLocalDeviceTypeUnknown", a[a.AliEngineLocalDeviceTypeMic = 1] = "AliEngineLocalDeviceTypeMic", a[a.AliEngineLocalDeviceTypeSpeaker = 2] = "AliEngineLocalDeviceTypeSpeaker", a[a.AliEngineLocalDeviceTypeAudioDevice = 3] = "AliEngineLocalDeviceTypeAudioDevice", a[a.AliEngineLocalDeviceTypeCamera = 4] = "AliEngineLocalDeviceTypeCamera", a[a.AliEngineLocalDeviceTypeDisplay = 5] = "AliEngineLocalDeviceTypeDisplay", a[a.AliEngineLocalDeviceTypeVideoDevice = 6] = "AliEngineLocalDeviceTypeVideoDevice", a))(It || {}), Be = ((a) => (a[a.AliEngineLocalDeviceExceptionTypeUnknown = 0] = "AliEngineLocalDeviceExceptionTypeUnknown", a[a.AliEngineLocalDeviceExceptionTypeMicOpenFail = 1] = "AliEngineLocalDeviceExceptionTypeMicOpenFail", a[a.AliEngineLocalDeviceExceptionTypeMicInterrupt = 2] = "AliEngineLocalDeviceExceptionTypeMicInterrupt", a[a.AliEngineLocalDeviceExceptionTypeMicAuthFail = 3] = "AliEngineLocalDeviceExceptionTypeMicAuthFail", a[a.AliEngineLocalDeviceExceptionTypeMicNotAvailable = 4] = "AliEngineLocalDeviceExceptionTypeMicNotAvailable", a[a.AliEngineLocalDeviceExceptionTypeSpeakerOpenFail = 5] = "AliEngineLocalDeviceExceptionTypeSpeakerOpenFail", a[a.AliEngineLocalDeviceExceptionTypeSpeakerInterrupt = 6] = "AliEngineLocalDeviceExceptionTypeSpeakerInterrupt", a[a.AliEngineLocalDeviceExceptionTypeSpeakerNotAvailable = 7] = "AliEngineLocalDeviceExceptionTypeSpeakerNotAvailable", a[a.AliEngineLocalDeviceExceptionTypeAudioDeviceException = 8] = "AliEngineLocalDeviceExceptionTypeAudioDeviceException", a[a.AliEngineLocalDeviceExceptionTypeCameraOpenFail = 9] = "AliEngineLocalDeviceExceptionTypeCameraOpenFail", a[a.AliEngineLocalDeviceExceptionTypeCameraInterrupt = 10] = "AliEngineLocalDeviceExceptionTypeCameraInterrupt", a[a.AliEngineLocalDeviceExceptionTypeCameraAuthFail = 11] = "AliEngineLocalDeviceExceptionTypeCameraAuthFail", a[a.AliEngineLocalDeviceExceptionTypeDisplayException = 12] = "AliEngineLocalDeviceExceptionTypeDisplayException", a[a.AliEngineLocalDeviceExceptionTypeVideoDeviceException = 13] = "AliEngineLocalDeviceExceptionTypeVideoDeviceException", a))(Be || {}), re = ((a) => (a[a.AliRtcConnectionStatusInit = 0] = "AliRtcConnectionStatusInit", a[a.AliRtcConnectionStatusDisconnected = 1] = "AliRtcConnectionStatusDisconnected", a[a.AliRtcConnectionStatusConnecting = 2] = "AliRtcConnectionStatusConnecting", a[a.AliRtcConnectionStatusConnected = 3] = "AliRtcConnectionStatusConnected", a[a.AliRtcConnectionStatusReconnecting = 4] = "AliRtcConnectionStatusReconnecting", a[a.AliRtcConnectionStatusFailed = 5] = "AliRtcConnectionStatusFailed", a))(re || {}), wt = ((a) => (a[a.AliRtcConnectionChangedDummyReason = 0] = "AliRtcConnectionChangedDummyReason", a[a.AliRtcConnectionMediaPathChanged = 1] = "AliRtcConnectionMediaPathChanged", a[a.AliRtcConnectionSignalingHeartbeatTimeout = 2] = "AliRtcConnectionSignalingHeartbeatTimeout", a[a.AliRtcConnectionSignalingHeartbeatAlive = 3] = "AliRtcConnectionSignalingHeartbeatAlive", a[a.AliRtcConnectionSignalingHttpDnsResolved = 4] = "AliRtcConnectionSignalingHttpDnsResolved", a[a.AliRtcConnectionSignalingHttpDnsFailure = 5] = "AliRtcConnectionSignalingHttpDnsFailure", a[a.AliRtcConnectionSignalingGslbFailure = 6] = "AliRtcConnectionSignalingGslbFailure", a[a.AliRtcConnectionSignalingGslbSuccess = 7] = "AliRtcConnectionSignalingGslbSuccess", a[a.AliRtcConnectionSignalingJoinRoomFailure = 8] = "AliRtcConnectionSignalingJoinRoomFailure", a[a.AliRtcConnectionSignalingJoinRoomSuccess = 9] = "AliRtcConnectionSignalingJoinRoomSuccess", a[a.AliRtcConnectionSignalingLeaveRoom = 10] = "AliRtcConnectionSignalingLeaveRoom", a[a.AliRtcConnectionSignalingConnecting = 11] = "AliRtcConnectionSignalingConnecting", a[a.AliRtcConnectionChangedNetworkInterrupted = 12] = "AliRtcConnectionChangedNetworkInterrupted", a))(wt || {}), Nr = ((a) => (a[a.AliRtcUserOfflineQuit = 0] = "AliRtcUserOfflineQuit", a[a.AliRtcUserOfflineDropped = 1] = "AliRtcUserOfflineDropped", a[a.AliRtcUserOfflineBecomeAudience = 2] = "AliRtcUserOfflineBecomeAudience", a))(Nr || {}), ci = ((a) => (a[a.AliRtcAudioTrackNo = 0] = "AliRtcAudioTrackNo", a[a.AliRtcAudioTrackMic = 1] = "AliRtcAudioTrackMic", a[a.AliRtcAudioTrackDual = 2] = "AliRtcAudioTrackDual", a))(ci || {}), le = ((a) => (a[a.AliRtcVideoTrackNo = 0] = "AliRtcVideoTrackNo", a[a.AliRtcVideoTrackCamera = 1] = "AliRtcVideoTrackCamera", a[a.AliRtcVideoTrackScreen = 2] = "AliRtcVideoTrackScreen", a[a.AliRtcVideoTrackBoth = 3] = "AliRtcVideoTrackBoth", a))(le || {}), Z = ((a) => (a[a.AliRtcStatePublishIdle = 0] = "AliRtcStatePublishIdle", a[a.AliRtcStateNoPublish = 1] = "AliRtcStateNoPublish", a[a.AliRtcStatePublishing = 2] = "AliRtcStatePublishing", a[a.AliRtcStatePublished = 3] = "AliRtcStatePublished", a[a.AliRtcStateReconnecting = 4] = "AliRtcStateReconnecting", a))(Z || {}), ae = ((a) => (a[a.AliRtcStateSubscribeIdle = 0] = "AliRtcStateSubscribeIdle", a[a.AliRtcStateNoSubscribe = 1] = "AliRtcStateNoSubscribe", a[a.AliRtcStateSubscribing = 2] = "AliRtcStateSubscribing", a[a.AliRtcStateSubscribed = 3] = "AliRtcStateSubscribed", a[a.AliRtcStateReconnecting = 4] = "AliRtcStateReconnecting", a))(ae || {}), Ke = ((a) => (a[a.AliRtcVideoStreamTypeNone = 0] = "AliRtcVideoStreamTypeNone", a[a.AliRtcVideoStreamTypeHigh = 1] = "AliRtcVideoStreamTypeHigh", a[a.AliRtcVideoStreamTypeLow = 2] = "AliRtcVideoStreamTypeLow", a))(Ke || {}), bi = ((a) => (a[a.CAMERA_INVALID = -1] = "CAMERA_INVALID", a[a.CAMERA_REAR = 0] = "CAMERA_REAR", a[a.CAMERA_FRONT = 1] = "CAMERA_FRONT", a))(bi || {}), st = ((a) => (a[a.AliRtcNetworkExcellent = 0] = "AliRtcNetworkExcellent", a[a.AliRtcNetworkGood = 1] = "AliRtcNetworkGood", a[a.AliRtcNetworkPoor = 2] = "AliRtcNetworkPoor", a[a.AliRtcNetworkBad = 3] = "AliRtcNetworkBad", a[a.AliRtcNetworkVeryBad = 4] = "AliRtcNetworkVeryBad", a[a.AliRtcNetworkDisconnected = 5] = "AliRtcNetworkDisconnected", a[a.AliRtcNetworkUnknown = 6] = "AliRtcNetworkUnknown", a))(st || {}), Ce = ((a) => (a.PullStreamStats = "remoteStat", a.RtsSubscribeExceeds = "rtsSubscribeExceeds", a.UserJoined = "userJoined", a.UserLeft = "userLeft", a.Bye = "bye", a.MuteAudio = "muteAudio", a.UnmuteAudio = "unmuteAudio", a.MuteVideo = "muteVideo", a.UnmuteVideo = "unmuteVideo", a.MuteScreen = "muteScreen", a.UnmuteScreen = "unmuteScreen", a.Error = "error", a))(Ce || {}), Ze = ((a) => (a.Local = "local-device-status-change", a.Remote = "remote-device-status-change", a))(Ze || {}), P = ((a) => (a.Audio = "sophon_audio", a.VideoLarge = "sophon_video_camera_large", a.VideoSmall = "sophon_video_camera_small", a.Screen = "sophon_video_screen_share", a.Data = "sophon_data", a))(P || {}), vr = ((a) => (a.Audio = "rts audio", a.VideoLarge = "rts video", a))(vr || {}), kt = ((a) => (a.Add = "add", a.Delete = "delete", a.Replace = "replace", a.Stop = "stop", a.UnPublish = "unpublish", a))(kt || {}), Si = ((a) => (a[a.Camera = 0] = "Camera", a[a.Screen = 1] = "Screen", a[a.Image = 2] = "Image", a))(Si || {}), Ni = ((a) => (a[a.Microphone = 0] = "Microphone", a[a.Screen = 1] = "Screen", a[a.Mixed = 2] = "Mixed", a))(Ni || {}), ue = ((a) => (a.InRoom = "inRoom", a.Join = "join", a.Publish = "publish", a.User = "user", a.Resume = "resume", a.Retry = "retry", a.Reconnect = "reconnect", a))(ue || {}), Rt = ((a) => (a[a.MANUAL = 0] = "MANUAL", a[a.JOIN_CHANNEL = 1] = "JOIN_CHANNEL", a[a.ROLE_CHANGE = 2] = "ROLE_CHANGE", a[a.RECONNECT = 3] = "RECONNECT", a))(Rt || {}), U = ((a) => (a[a.ERR_JOIN_ALREADY_JOINED = 16843521] = "ERR_JOIN_ALREADY_JOINED", a[a.ERR_JOIN_BAD_APPID = 33620481] = "ERR_JOIN_BAD_APPID", a[a.ERR_JOIN_INVALID_APPID = 33620482] = "ERR_JOIN_INVALID_APPID", a[a.ERR_JOIN_BAD_CHANNEL = 33620484] = "ERR_JOIN_BAD_CHANNEL", a[a.ERR_JOIN_INVALID_CHANNEL = 33620483] = "ERR_JOIN_INVALID_CHANNEL", a[a.ERR_JOIN_BAD_TOKEN = 33620485] = "ERR_JOIN_BAD_TOKEN", a[a.ERR_JOIN_TIMEOUT = 16908804] = "ERR_JOIN_TIMEOUT", a[a.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD = 16974081] = "ERR_JOIN_ERR_JOIN_BAD_PARAMBAD", a[a.ERR_JOIN_CHANNEL_FAILED = 16974338] = "ERR_JOIN_CHANNEL_FAILED", a[a.ERR_LOG_ALREADY_INIT = 16974085] = "ERR_LOG_ALREADY_INIT", a[a.ERR_LOG_ROOT_PATH_ERROR = 16974086] = "ERR_LOG_ROOT_PATH_ERROR", a[a.ERR_MIC_OPEN_FAIL = 17040388] = "ERR_MIC_OPEN_FAIL", a[a.ERR_SPEAKER_OPEN_FAIL = 17040389] = "ERR_SPEAKER_OPEN_FAIL", a[a.ERR_MIC_INTERRUPT = 17040390] = "ERR_MIC_INTERRUPT", a[a.ERR_SPEAKER_INTERRUPT = 17040391] = "ERR_SPEAKER_INTERRUPT", a[a.ERR_MIC_AUTH_FAIL = 17040392] = "ERR_MIC_AUTH_FAIL", a[a.ERR_MIC_NOT_AVAILABLE = 17040393] = "ERR_MIC_NOT_AVAILABLE", a[a.ERR_SPEAKER_NOT_AVAILABLE = 17040400] = "ERR_SPEAKER_NOT_AVAILABLE", a[a.ERR_CAMERA_OPEN_FAIL = 17039620] = "ERR_CAMERA_OPEN_FAIL", a[a.ERR_CAMERA_AUTH_FAIL = 17039621] = "ERR_CAMERA_AUTH_FAIL", a[a.ERR_CAMERA_INTERRUPT = 17039622] = "ERR_CAMERA_INTERRUPT", a[a.ERR_CAMERA_NOT_AVAILABLE = 17039623] = "ERR_CAMERA_NOT_AVAILABLE", a[a.ERR_VIDEO_DISPLAY_OPEN_FAIL = 17039873] = "ERR_VIDEO_DISPLAY_OPEN_FAIL", a[a.ERR_VIDEO_DISPLAY_INTERRUPT = 1064992] = "ERR_VIDEO_DISPLAY_INTERRUPT", a[a.ERR_ICE_CONNECTION_CONNECT_FAIL = 17105409] = "ERR_ICE_CONNECTION_CONNECT_FAIL", a[a.ERR_ICE_CONNECTION_RECONNECT_FAI = 17105410] = "ERR_ICE_CONNECTION_RECONNECT_FAI", a[a.ERR_ICE_CONNECTION_MOBILITY_FAIL = 17105411] = "ERR_ICE_CONNECTION_MOBILITY_FAIL", a[a.ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT = 16908812] = "ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT", a[a.ERR_LATENCY_LIVE_COMMUNICATION_FAILED = 17235971] = "ERR_LATENCY_LIVE_COMMUNICATION_FAILED", a[a.ERR_LATENCY_LIVE_MEIDASETTING_FAILED = 17235972] = "ERR_LATENCY_LIVE_MEIDASETTING_FAILED", a[a.ERR_LATENCY_LIVE_NONE_BROADCASTER = 17235973] = "ERR_LATENCY_LIVE_NONE_BROADCASTER", a[a.ERR_LATENCY_LIVE_NEED_RESTART = 17235974] = "ERR_LATENCY_LIVE_NEED_RESTART", a[a.ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER = 17235975] = "ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER", a[a.ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE = 17235976] = "ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE", a[a.ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION = 17235977] = "ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION", a[a.ERR_SDK_PUBLISH_INVAILD = 16974597] = "ERR_SDK_PUBLISH_INVAILD", a[a.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL = 16843782] = "ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL", a[a.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED = 16843856] = "ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED", a[a.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED = 16843857] = "ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED", a[a.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED = 16843858] = "ERR_SDK_PUBLISH_DUAL_STREAM_FAILED", a[a.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED = 16843859] = "ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED", a[a.ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR = 16843860] = "ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR", a[a.ERR_SDK_SUBSCRIBE_INVAILD = 16974852] = "ERR_SDK_SUBSCRIBE_INVAILD", a[a.ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL = 16844112] = "ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL", a[a.ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED = 16844113] = "ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED", a[a.ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED = 16844114] = "ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED", a[a.ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED = 16844115] = "ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED", a[a.ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED = 16844116] = "ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED", a[a.ERR_SDK_SUBSCRIBE_DATA_FAILED = 16844117] = "ERR_SDK_SUBSCRIBE_DATA_FAILED", a[a.ERR_SDK_SUBSCRIBE_DATA_ERROR = 16844118] = "ERR_SDK_SUBSCRIBE_DATA_ERROR", a[a.ERR_SDK_INVALID_STATE = 16974340] = "ERR_SDK_INVALID_STATE", a[a.ERR_INVALID_ARGUMENTS = 16974083] = "ERR_INVALID_ARGUMENTS", a[a.ERR_SESSION_REMOVED = 33620229] = "ERR_SESSION_REMOVED", a[a.ERR_SDK_UPDATE_ROLE_CHANNEL = 16908801] = "ERR_SDK_UPDATE_ROLE_CHANNEL", a[a.ERR_INNER = -1] = "ERR_INNER", a[a.ERR_SDK_MPU_TASK_PUBLISH_OK = 0] = "ERR_SDK_MPU_TASK_PUBLISH_OK", a[a.ERR_SDK_MPU_TASK_STREAM_NOT_FOUND = 17825793] = "ERR_SDK_MPU_TASK_STREAM_NOT_FOUND", a[a.ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST = 17825794] = "ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST", a[a.ERR_SDK_MPU_TASK_INVALID_PARAM = 17825795] = "ERR_SDK_MPU_TASK_INVALID_PARAM", a[a.ERR_SDK_MPU_TASK_INTERNAL_ERROR = 17825796] = "ERR_SDK_MPU_TASK_INTERNAL_ERROR", a[a.ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR = 17825797] = "ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR", a[a.ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR = 17825798] = "ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR", a[a.ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT = 17825799] = "ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT", a[a.ERR_SDK_MPU_TASK_NOT_AUTHORIZED = 17825800] = "ERR_SDK_MPU_TASK_NOT_AUTHORIZED", a[a.ERR_SDK_CHANNEL_RELAY_STATE_ERROR = 18874369] = "ERR_SDK_CHANNEL_RELAY_STATE_ERROR", a[a.ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW = 18874370] = "ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW", a[a.ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED = 18874371] = "ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED", a[a.ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID = 18874372] = "ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID", a[a.ERR_SDK_CHANNEL_RELAY_ROLE_ERROR = 18874373] = "ERR_SDK_CHANNEL_RELAY_ROLE_ERROR", a[a.ERR_SDK_CHANNEL_RELAY_INVALID_PARAM = 18874374] = "ERR_SDK_CHANNEL_RELAY_INVALID_PARAM", a[a.ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR = 18874375] = "ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR", a))(U || {});
|
|
41
|
+
var mn = ((a) => (a.EnableNonOnePcDefaultJoinMode = "h5_enable_non_one_pc_default_join_mode", a))(mn || {}), Vt = ((a) => (a.prod = "rs.rtn.aliyuncs.com", a.pre = "prs.rtn.aliyuncs.com", a))(Vt || {}), ft = ((a) => (a.pre = "pre", a.prod = "prod", a))(ft || {}), Dt = ((a) => (a.AliRtcSdkCommunication = "communication", a.AliRtcSdkInteractiveLive = "interactive_live", a.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", a))(Dt || {}), $t = ((a) => (a.AliRtcSdkInteractive = "interactive", a.AliRtcSdkLive = "live", a))($t || {}), Tt = ((a) => (a[a.AliEngineLocalDeviceTypeUnknown = 0] = "AliEngineLocalDeviceTypeUnknown", a[a.AliEngineLocalDeviceTypeMic = 1] = "AliEngineLocalDeviceTypeMic", a[a.AliEngineLocalDeviceTypeSpeaker = 2] = "AliEngineLocalDeviceTypeSpeaker", a[a.AliEngineLocalDeviceTypeAudioDevice = 3] = "AliEngineLocalDeviceTypeAudioDevice", a[a.AliEngineLocalDeviceTypeCamera = 4] = "AliEngineLocalDeviceTypeCamera", a[a.AliEngineLocalDeviceTypeDisplay = 5] = "AliEngineLocalDeviceTypeDisplay", a[a.AliEngineLocalDeviceTypeVideoDevice = 6] = "AliEngineLocalDeviceTypeVideoDevice", a))(Tt || {}), Be = ((a) => (a[a.AliEngineLocalDeviceExceptionTypeUnknown = 0] = "AliEngineLocalDeviceExceptionTypeUnknown", a[a.AliEngineLocalDeviceExceptionTypeMicOpenFail = 1] = "AliEngineLocalDeviceExceptionTypeMicOpenFail", a[a.AliEngineLocalDeviceExceptionTypeMicInterrupt = 2] = "AliEngineLocalDeviceExceptionTypeMicInterrupt", a[a.AliEngineLocalDeviceExceptionTypeMicAuthFail = 3] = "AliEngineLocalDeviceExceptionTypeMicAuthFail", a[a.AliEngineLocalDeviceExceptionTypeMicNotAvailable = 4] = "AliEngineLocalDeviceExceptionTypeMicNotAvailable", a[a.AliEngineLocalDeviceExceptionTypeSpeakerOpenFail = 5] = "AliEngineLocalDeviceExceptionTypeSpeakerOpenFail", a[a.AliEngineLocalDeviceExceptionTypeSpeakerInterrupt = 6] = "AliEngineLocalDeviceExceptionTypeSpeakerInterrupt", a[a.AliEngineLocalDeviceExceptionTypeSpeakerNotAvailable = 7] = "AliEngineLocalDeviceExceptionTypeSpeakerNotAvailable", a[a.AliEngineLocalDeviceExceptionTypeAudioDeviceException = 8] = "AliEngineLocalDeviceExceptionTypeAudioDeviceException", a[a.AliEngineLocalDeviceExceptionTypeCameraOpenFail = 9] = "AliEngineLocalDeviceExceptionTypeCameraOpenFail", a[a.AliEngineLocalDeviceExceptionTypeCameraInterrupt = 10] = "AliEngineLocalDeviceExceptionTypeCameraInterrupt", a[a.AliEngineLocalDeviceExceptionTypeCameraAuthFail = 11] = "AliEngineLocalDeviceExceptionTypeCameraAuthFail", a[a.AliEngineLocalDeviceExceptionTypeDisplayException = 12] = "AliEngineLocalDeviceExceptionTypeDisplayException", a[a.AliEngineLocalDeviceExceptionTypeVideoDeviceException = 13] = "AliEngineLocalDeviceExceptionTypeVideoDeviceException", a))(Be || {}), re = ((a) => (a[a.AliRtcConnectionStatusInit = 0] = "AliRtcConnectionStatusInit", a[a.AliRtcConnectionStatusDisconnected = 1] = "AliRtcConnectionStatusDisconnected", a[a.AliRtcConnectionStatusConnecting = 2] = "AliRtcConnectionStatusConnecting", a[a.AliRtcConnectionStatusConnected = 3] = "AliRtcConnectionStatusConnected", a[a.AliRtcConnectionStatusReconnecting = 4] = "AliRtcConnectionStatusReconnecting", a[a.AliRtcConnectionStatusFailed = 5] = "AliRtcConnectionStatusFailed", a))(re || {}), wt = ((a) => (a[a.AliRtcConnectionChangedDummyReason = 0] = "AliRtcConnectionChangedDummyReason", a[a.AliRtcConnectionMediaPathChanged = 1] = "AliRtcConnectionMediaPathChanged", a[a.AliRtcConnectionSignalingHeartbeatTimeout = 2] = "AliRtcConnectionSignalingHeartbeatTimeout", a[a.AliRtcConnectionSignalingHeartbeatAlive = 3] = "AliRtcConnectionSignalingHeartbeatAlive", a[a.AliRtcConnectionSignalingHttpDnsResolved = 4] = "AliRtcConnectionSignalingHttpDnsResolved", a[a.AliRtcConnectionSignalingHttpDnsFailure = 5] = "AliRtcConnectionSignalingHttpDnsFailure", a[a.AliRtcConnectionSignalingGslbFailure = 6] = "AliRtcConnectionSignalingGslbFailure", a[a.AliRtcConnectionSignalingGslbSuccess = 7] = "AliRtcConnectionSignalingGslbSuccess", a[a.AliRtcConnectionSignalingJoinRoomFailure = 8] = "AliRtcConnectionSignalingJoinRoomFailure", a[a.AliRtcConnectionSignalingJoinRoomSuccess = 9] = "AliRtcConnectionSignalingJoinRoomSuccess", a[a.AliRtcConnectionSignalingLeaveRoom = 10] = "AliRtcConnectionSignalingLeaveRoom", a[a.AliRtcConnectionSignalingConnecting = 11] = "AliRtcConnectionSignalingConnecting", a[a.AliRtcConnectionChangedNetworkInterrupted = 12] = "AliRtcConnectionChangedNetworkInterrupted", a))(wt || {}), Lr = ((a) => (a[a.AliRtcUserOfflineQuit = 0] = "AliRtcUserOfflineQuit", a[a.AliRtcUserOfflineDropped = 1] = "AliRtcUserOfflineDropped", a[a.AliRtcUserOfflineBecomeAudience = 2] = "AliRtcUserOfflineBecomeAudience", a))(Lr || {}), ci = ((a) => (a[a.AliRtcAudioTrackNo = 0] = "AliRtcAudioTrackNo", a[a.AliRtcAudioTrackMic = 1] = "AliRtcAudioTrackMic", a[a.AliRtcAudioTrackDual = 2] = "AliRtcAudioTrackDual", a))(ci || {}), le = ((a) => (a[a.AliRtcVideoTrackNo = 0] = "AliRtcVideoTrackNo", a[a.AliRtcVideoTrackCamera = 1] = "AliRtcVideoTrackCamera", a[a.AliRtcVideoTrackScreen = 2] = "AliRtcVideoTrackScreen", a[a.AliRtcVideoTrackBoth = 3] = "AliRtcVideoTrackBoth", a))(le || {}), Z = ((a) => (a[a.AliRtcStatePublishIdle = 0] = "AliRtcStatePublishIdle", a[a.AliRtcStateNoPublish = 1] = "AliRtcStateNoPublish", a[a.AliRtcStatePublishing = 2] = "AliRtcStatePublishing", a[a.AliRtcStatePublished = 3] = "AliRtcStatePublished", a[a.AliRtcStateReconnecting = 4] = "AliRtcStateReconnecting", a))(Z || {}), ae = ((a) => (a[a.AliRtcStateSubscribeIdle = 0] = "AliRtcStateSubscribeIdle", a[a.AliRtcStateNoSubscribe = 1] = "AliRtcStateNoSubscribe", a[a.AliRtcStateSubscribing = 2] = "AliRtcStateSubscribing", a[a.AliRtcStateSubscribed = 3] = "AliRtcStateSubscribed", a[a.AliRtcStateReconnecting = 4] = "AliRtcStateReconnecting", a))(ae || {}), Ke = ((a) => (a[a.AliRtcVideoStreamTypeNone = 0] = "AliRtcVideoStreamTypeNone", a[a.AliRtcVideoStreamTypeHigh = 1] = "AliRtcVideoStreamTypeHigh", a[a.AliRtcVideoStreamTypeLow = 2] = "AliRtcVideoStreamTypeLow", a))(Ke || {}), bi = ((a) => (a[a.CAMERA_INVALID = -1] = "CAMERA_INVALID", a[a.CAMERA_REAR = 0] = "CAMERA_REAR", a[a.CAMERA_FRONT = 1] = "CAMERA_FRONT", a))(bi || {}), st = ((a) => (a[a.AliRtcNetworkExcellent = 0] = "AliRtcNetworkExcellent", a[a.AliRtcNetworkGood = 1] = "AliRtcNetworkGood", a[a.AliRtcNetworkPoor = 2] = "AliRtcNetworkPoor", a[a.AliRtcNetworkBad = 3] = "AliRtcNetworkBad", a[a.AliRtcNetworkVeryBad = 4] = "AliRtcNetworkVeryBad", a[a.AliRtcNetworkDisconnected = 5] = "AliRtcNetworkDisconnected", a[a.AliRtcNetworkUnknown = 6] = "AliRtcNetworkUnknown", a))(st || {}), Ce = ((a) => (a.PullStreamStats = "remoteStat", a.RtsSubscribeExceeds = "rtsSubscribeExceeds", a.UserJoined = "userJoined", a.UserLeft = "userLeft", a.Bye = "bye", a.MuteAudio = "muteAudio", a.UnmuteAudio = "unmuteAudio", a.MuteVideo = "muteVideo", a.UnmuteVideo = "unmuteVideo", a.MuteScreen = "muteScreen", a.UnmuteScreen = "unmuteScreen", a.Error = "error", a))(Ce || {}), Ze = ((a) => (a.Local = "local-device-status-change", a.Remote = "remote-device-status-change", a))(Ze || {}), P = ((a) => (a.Audio = "sophon_audio", a.VideoLarge = "sophon_video_camera_large", a.VideoSmall = "sophon_video_camera_small", a.Screen = "sophon_video_screen_share", a.Data = "sophon_data", a))(P || {}), vr = ((a) => (a.Audio = "rts audio", a.VideoLarge = "rts video", a))(vr || {}), _t = ((a) => (a.Add = "add", a.Delete = "delete", a.Replace = "replace", a.Stop = "stop", a.UnPublish = "unpublish", a))(_t || {}), Si = ((a) => (a[a.Camera = 0] = "Camera", a[a.Screen = 1] = "Screen", a[a.Image = 2] = "Image", a))(Si || {}), Li = ((a) => (a[a.Microphone = 0] = "Microphone", a[a.Screen = 1] = "Screen", a[a.Mixed = 2] = "Mixed", a))(Li || {}), ue = ((a) => (a.InRoom = "inRoom", a.Join = "join", a.Publish = "publish", a.User = "user", a.Resume = "resume", a.Retry = "retry", a.Reconnect = "reconnect", a))(ue || {}), Rt = ((a) => (a[a.MANUAL = 0] = "MANUAL", a[a.JOIN_CHANNEL = 1] = "JOIN_CHANNEL", a[a.ROLE_CHANGE = 2] = "ROLE_CHANGE", a[a.RECONNECT = 3] = "RECONNECT", a))(Rt || {}), U = ((a) => (a[a.ERR_JOIN_ALREADY_JOINED = 16843521] = "ERR_JOIN_ALREADY_JOINED", a[a.ERR_JOIN_BAD_APPID = 33620481] = "ERR_JOIN_BAD_APPID", a[a.ERR_JOIN_INVALID_APPID = 33620482] = "ERR_JOIN_INVALID_APPID", a[a.ERR_JOIN_BAD_CHANNEL = 33620484] = "ERR_JOIN_BAD_CHANNEL", a[a.ERR_JOIN_INVALID_CHANNEL = 33620483] = "ERR_JOIN_INVALID_CHANNEL", a[a.ERR_JOIN_BAD_TOKEN = 33620485] = "ERR_JOIN_BAD_TOKEN", a[a.ERR_JOIN_TIMEOUT = 16908804] = "ERR_JOIN_TIMEOUT", a[a.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD = 16974081] = "ERR_JOIN_ERR_JOIN_BAD_PARAMBAD", a[a.ERR_JOIN_CHANNEL_FAILED = 16974338] = "ERR_JOIN_CHANNEL_FAILED", a[a.ERR_LOG_ALREADY_INIT = 16974085] = "ERR_LOG_ALREADY_INIT", a[a.ERR_LOG_ROOT_PATH_ERROR = 16974086] = "ERR_LOG_ROOT_PATH_ERROR", a[a.ERR_MIC_OPEN_FAIL = 17040388] = "ERR_MIC_OPEN_FAIL", a[a.ERR_SPEAKER_OPEN_FAIL = 17040389] = "ERR_SPEAKER_OPEN_FAIL", a[a.ERR_MIC_INTERRUPT = 17040390] = "ERR_MIC_INTERRUPT", a[a.ERR_SPEAKER_INTERRUPT = 17040391] = "ERR_SPEAKER_INTERRUPT", a[a.ERR_MIC_AUTH_FAIL = 17040392] = "ERR_MIC_AUTH_FAIL", a[a.ERR_MIC_NOT_AVAILABLE = 17040393] = "ERR_MIC_NOT_AVAILABLE", a[a.ERR_SPEAKER_NOT_AVAILABLE = 17040400] = "ERR_SPEAKER_NOT_AVAILABLE", a[a.ERR_CAMERA_OPEN_FAIL = 17039620] = "ERR_CAMERA_OPEN_FAIL", a[a.ERR_CAMERA_AUTH_FAIL = 17039621] = "ERR_CAMERA_AUTH_FAIL", a[a.ERR_CAMERA_INTERRUPT = 17039622] = "ERR_CAMERA_INTERRUPT", a[a.ERR_CAMERA_NOT_AVAILABLE = 17039623] = "ERR_CAMERA_NOT_AVAILABLE", a[a.ERR_VIDEO_DISPLAY_OPEN_FAIL = 17039873] = "ERR_VIDEO_DISPLAY_OPEN_FAIL", a[a.ERR_VIDEO_DISPLAY_INTERRUPT = 1064992] = "ERR_VIDEO_DISPLAY_INTERRUPT", a[a.ERR_ICE_CONNECTION_CONNECT_FAIL = 17105409] = "ERR_ICE_CONNECTION_CONNECT_FAIL", a[a.ERR_ICE_CONNECTION_RECONNECT_FAI = 17105410] = "ERR_ICE_CONNECTION_RECONNECT_FAI", a[a.ERR_ICE_CONNECTION_MOBILITY_FAIL = 17105411] = "ERR_ICE_CONNECTION_MOBILITY_FAIL", a[a.ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT = 16908812] = "ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT", a[a.ERR_LATENCY_LIVE_COMMUNICATION_FAILED = 17235971] = "ERR_LATENCY_LIVE_COMMUNICATION_FAILED", a[a.ERR_LATENCY_LIVE_MEIDASETTING_FAILED = 17235972] = "ERR_LATENCY_LIVE_MEIDASETTING_FAILED", a[a.ERR_LATENCY_LIVE_NONE_BROADCASTER = 17235973] = "ERR_LATENCY_LIVE_NONE_BROADCASTER", a[a.ERR_LATENCY_LIVE_NEED_RESTART = 17235974] = "ERR_LATENCY_LIVE_NEED_RESTART", a[a.ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER = 17235975] = "ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER", a[a.ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE = 17235976] = "ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE", a[a.ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION = 17235977] = "ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION", a[a.ERR_SDK_PUBLISH_INVAILD = 16974597] = "ERR_SDK_PUBLISH_INVAILD", a[a.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL = 16843782] = "ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL", a[a.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED = 16843856] = "ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED", a[a.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED = 16843857] = "ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED", a[a.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED = 16843858] = "ERR_SDK_PUBLISH_DUAL_STREAM_FAILED", a[a.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED = 16843859] = "ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED", a[a.ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR = 16843860] = "ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR", a[a.ERR_SDK_SUBSCRIBE_INVAILD = 16974852] = "ERR_SDK_SUBSCRIBE_INVAILD", a[a.ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL = 16844112] = "ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL", a[a.ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED = 16844113] = "ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED", a[a.ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED = 16844114] = "ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED", a[a.ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED = 16844115] = "ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED", a[a.ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED = 16844116] = "ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED", a[a.ERR_SDK_SUBSCRIBE_DATA_FAILED = 16844117] = "ERR_SDK_SUBSCRIBE_DATA_FAILED", a[a.ERR_SDK_SUBSCRIBE_DATA_ERROR = 16844118] = "ERR_SDK_SUBSCRIBE_DATA_ERROR", a[a.ERR_SDK_INVALID_STATE = 16974340] = "ERR_SDK_INVALID_STATE", a[a.ERR_INVALID_ARGUMENTS = 16974083] = "ERR_INVALID_ARGUMENTS", a[a.ERR_SESSION_REMOVED = 33620229] = "ERR_SESSION_REMOVED", a[a.ERR_SDK_UPDATE_ROLE_CHANNEL = 16908801] = "ERR_SDK_UPDATE_ROLE_CHANNEL", a[a.ERR_INNER = -1] = "ERR_INNER", a[a.ERR_SDK_MPU_TASK_PUBLISH_OK = 0] = "ERR_SDK_MPU_TASK_PUBLISH_OK", a[a.ERR_SDK_MPU_TASK_STREAM_NOT_FOUND = 17825793] = "ERR_SDK_MPU_TASK_STREAM_NOT_FOUND", a[a.ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST = 17825794] = "ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST", a[a.ERR_SDK_MPU_TASK_INVALID_PARAM = 17825795] = "ERR_SDK_MPU_TASK_INVALID_PARAM", a[a.ERR_SDK_MPU_TASK_INTERNAL_ERROR = 17825796] = "ERR_SDK_MPU_TASK_INTERNAL_ERROR", a[a.ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR = 17825797] = "ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR", a[a.ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR = 17825798] = "ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR", a[a.ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT = 17825799] = "ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT", a[a.ERR_SDK_MPU_TASK_NOT_AUTHORIZED = 17825800] = "ERR_SDK_MPU_TASK_NOT_AUTHORIZED", a[a.ERR_SDK_CHANNEL_RELAY_STATE_ERROR = 18874369] = "ERR_SDK_CHANNEL_RELAY_STATE_ERROR", a[a.ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW = 18874370] = "ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW", a[a.ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED = 18874371] = "ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED", a[a.ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID = 18874372] = "ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID", a[a.ERR_SDK_CHANNEL_RELAY_ROLE_ERROR = 18874373] = "ERR_SDK_CHANNEL_RELAY_ROLE_ERROR", a[a.ERR_SDK_CHANNEL_RELAY_INVALID_PARAM = 18874374] = "ERR_SDK_CHANNEL_RELAY_INVALID_PARAM", a[a.ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR = 18874375] = "ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR", a))(U || {});
|
|
42
42
|
class V extends Error {
|
|
43
43
|
constructor(e, t, i) {
|
|
44
44
|
super(t);
|
|
@@ -97,7 +97,7 @@ function yr(a) {
|
|
|
97
97
|
}
|
|
98
98
|
return s;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Ct(a) {
|
|
101
101
|
return new Promise((s) => setTimeout(s, a));
|
|
102
102
|
}
|
|
103
103
|
function is(a, s, e = 1e3, t = (i) => !0) {
|
|
@@ -162,7 +162,7 @@ function io() {
|
|
|
162
162
|
return qi(to);
|
|
163
163
|
}
|
|
164
164
|
const as = { randomUUID: typeof crypto != "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
165
|
-
function
|
|
165
|
+
function ct(a, s, e) {
|
|
166
166
|
if (as.randomUUID && !s && !a)
|
|
167
167
|
return as.randomUUID();
|
|
168
168
|
var t = (a = a || {}).random || (a.rng || io)();
|
|
@@ -176,7 +176,7 @@ function ot(a, s, e) {
|
|
|
176
176
|
return (ze[r[n + 0]] + ze[r[n + 1]] + ze[r[n + 2]] + ze[r[n + 3]] + "-" + ze[r[n + 4]] + ze[r[n + 5]] + "-" + ze[r[n + 6]] + ze[r[n + 7]] + "-" + ze[r[n + 8]] + ze[r[n + 9]] + "-" + ze[r[n + 10]] + ze[r[n + 11]] + ze[r[n + 12]] + ze[r[n + 13]] + ze[r[n + 14]] + ze[r[n + 15]]).toLowerCase();
|
|
177
177
|
}(t);
|
|
178
178
|
}
|
|
179
|
-
const Ri = "7.2.
|
|
179
|
+
const Ri = "7.2.7";
|
|
180
180
|
class ke {
|
|
181
181
|
static getVersionNumber() {
|
|
182
182
|
let s = Ri.split("."), e = "";
|
|
@@ -200,7 +200,7 @@ class ke {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
static createCallid(s = "") {
|
|
203
|
-
const e =
|
|
203
|
+
const e = ct();
|
|
204
204
|
return s && e && e.length > s.length ? `${s}${e.substring(s.length)}` : e;
|
|
205
205
|
}
|
|
206
206
|
static checkSubOptionsValid(s) {
|
|
@@ -592,8 +592,8 @@ function Kt() {
|
|
|
592
592
|
var m = b + g, S = u[m];
|
|
593
593
|
u[m] = 16711935 & (S << 8 | S >>> 24) | 4278255360 & (S << 24 | S >>> 8);
|
|
594
594
|
}
|
|
595
|
-
var R = this._hash.words, A = u[b + 0], y = u[b + 1], v = u[b + 2], E = u[b + 3], w = u[b + 4], I = u[b + 5], k = u[b + 6],
|
|
596
|
-
|
|
595
|
+
var R = this._hash.words, A = u[b + 0], y = u[b + 1], v = u[b + 2], E = u[b + 3], w = u[b + 4], I = u[b + 5], k = u[b + 6], N = u[b + 7], D = u[b + 8], H = u[b + 9], K = u[b + 10], X = u[b + 11], z = u[b + 12], j = u[b + 13], Q = u[b + 14], te = u[b + 15], L = R[0], O = R[1], M = R[2], x = R[3];
|
|
596
|
+
L = l(L, O, M, x, A, 7, o[0]), x = l(x, L, O, M, y, 12, o[1]), M = l(M, x, L, O, v, 17, o[2]), O = l(O, M, x, L, E, 22, o[3]), L = l(L, O, M, x, w, 7, o[4]), x = l(x, L, O, M, I, 12, o[5]), M = l(M, x, L, O, k, 17, o[6]), O = l(O, M, x, L, N, 22, o[7]), L = l(L, O, M, x, D, 7, o[8]), x = l(x, L, O, M, H, 12, o[9]), M = l(M, x, L, O, K, 17, o[10]), O = l(O, M, x, L, X, 22, o[11]), L = l(L, O, M, x, z, 7, o[12]), x = l(x, L, O, M, j, 12, o[13]), M = l(M, x, L, O, Q, 17, o[14]), L = d(L, O = l(O, M, x, L, te, 22, o[15]), M, x, y, 5, o[16]), x = d(x, L, O, M, k, 9, o[17]), M = d(M, x, L, O, X, 14, o[18]), O = d(O, M, x, L, A, 20, o[19]), L = d(L, O, M, x, I, 5, o[20]), x = d(x, L, O, M, K, 9, o[21]), M = d(M, x, L, O, te, 14, o[22]), O = d(O, M, x, L, w, 20, o[23]), L = d(L, O, M, x, H, 5, o[24]), x = d(x, L, O, M, Q, 9, o[25]), M = d(M, x, L, O, E, 14, o[26]), O = d(O, M, x, L, D, 20, o[27]), L = d(L, O, M, x, j, 5, o[28]), x = d(x, L, O, M, v, 9, o[29]), M = d(M, x, L, O, N, 14, o[30]), L = h(L, O = d(O, M, x, L, z, 20, o[31]), M, x, I, 4, o[32]), x = h(x, L, O, M, D, 11, o[33]), M = h(M, x, L, O, X, 16, o[34]), O = h(O, M, x, L, Q, 23, o[35]), L = h(L, O, M, x, y, 4, o[36]), x = h(x, L, O, M, w, 11, o[37]), M = h(M, x, L, O, N, 16, o[38]), O = h(O, M, x, L, K, 23, o[39]), L = h(L, O, M, x, j, 4, o[40]), x = h(x, L, O, M, A, 11, o[41]), M = h(M, x, L, O, E, 16, o[42]), O = h(O, M, x, L, k, 23, o[43]), L = h(L, O, M, x, H, 4, o[44]), x = h(x, L, O, M, z, 11, o[45]), M = h(M, x, L, O, te, 16, o[46]), L = f(L, O = h(O, M, x, L, v, 23, o[47]), M, x, A, 6, o[48]), x = f(x, L, O, M, N, 10, o[49]), M = f(M, x, L, O, Q, 15, o[50]), O = f(O, M, x, L, I, 21, o[51]), L = f(L, O, M, x, z, 6, o[52]), x = f(x, L, O, M, E, 10, o[53]), M = f(M, x, L, O, K, 15, o[54]), O = f(O, M, x, L, y, 21, o[55]), L = f(L, O, M, x, D, 6, o[56]), x = f(x, L, O, M, te, 10, o[57]), M = f(M, x, L, O, k, 15, o[58]), O = f(O, M, x, L, j, 21, o[59]), L = f(L, O, M, x, w, 6, o[60]), x = f(x, L, O, M, X, 10, o[61]), M = f(M, x, L, O, v, 15, o[62]), O = f(O, M, x, L, H, 21, o[63]), R[0] = R[0] + L | 0, R[1] = R[1] + O | 0, R[2] = R[2] + M | 0, R[3] = R[3] + x | 0;
|
|
597
597
|
}, _doFinalize: function() {
|
|
598
598
|
var u = this._data, b = u.words, g = 8 * this._nDataBytes, m = 8 * u.sigBytes;
|
|
599
599
|
b[m >>> 5] |= 128 << 24 - m % 32;
|
|
@@ -680,8 +680,8 @@ function Xi() {
|
|
|
680
680
|
if (E < 16)
|
|
681
681
|
l[E] = 0 | h[f + E];
|
|
682
682
|
else {
|
|
683
|
-
var w = l[E - 15], I = (w << 25 | w >>> 7) ^ (w << 14 | w >>> 18) ^ w >>> 3, k = l[E - 2],
|
|
684
|
-
l[E] = I + l[E - 7] +
|
|
683
|
+
var w = l[E - 15], I = (w << 25 | w >>> 7) ^ (w << 14 | w >>> 18) ^ w >>> 3, k = l[E - 2], N = (k << 15 | k >>> 17) ^ (k << 13 | k >>> 19) ^ k >>> 10;
|
|
684
|
+
l[E] = I + l[E - 7] + N + l[E - 16];
|
|
685
685
|
}
|
|
686
686
|
var D = b & g ^ b & m ^ g & m, H = (b << 30 | b >>> 2) ^ (b << 19 | b >>> 13) ^ (b << 10 | b >>> 22), K = v + ((R << 26 | R >>> 6) ^ (R << 21 | R >>> 11) ^ (R << 7 | R >>> 25)) + (R & A ^ ~R & y) + c[E] + l[E];
|
|
687
687
|
v = y, y = A, A = R, R = S + K | 0, S = m, m = g, g = b, b = K + (H + D) | 0;
|
|
@@ -714,18 +714,18 @@ function Cs() {
|
|
|
714
714
|
var d = n.SHA512 = e.extend({ _doReset: function() {
|
|
715
715
|
this._hash = new r.init([new i.init(1779033703, 4089235720), new i.init(3144134277, 2227873595), new i.init(1013904242, 4271175723), new i.init(2773480762, 1595750129), new i.init(1359893119, 2917565137), new i.init(2600822924, 725511199), new i.init(528734635, 4215389547), new i.init(1541459225, 327033209)]);
|
|
716
716
|
}, _doProcessBlock: function(h, f) {
|
|
717
|
-
for (var u = this._hash.words, b = u[0], g = u[1], m = u[2], S = u[3], R = u[4], A = u[5], y = u[6], v = u[7], E = b.high, w = b.low, I = g.high, k = g.low,
|
|
717
|
+
for (var u = this._hash.words, b = u[0], g = u[1], m = u[2], S = u[3], R = u[4], A = u[5], y = u[6], v = u[7], E = b.high, w = b.low, I = g.high, k = g.low, N = m.high, D = m.low, H = S.high, K = S.low, X = R.high, z = R.low, j = A.high, Q = A.low, te = y.high, L = y.low, O = v.high, M = v.low, x = E, de = w, be = I, Re = k, q = N, pe = D, Me = H, ve = K, me = X, Se = z, $e = j, ie = Q, Ae = te, De = L, oe = O, ne = M, Y = 0; Y < 80; Y++) {
|
|
718
718
|
var ge, Pe, se = l[Y];
|
|
719
719
|
if (Y < 16)
|
|
720
720
|
Pe = se.high = 0 | h[f + 2 * Y], ge = se.low = 0 | h[f + 2 * Y + 1];
|
|
721
721
|
else {
|
|
722
|
-
var We = l[Y - 15], G = We.high, Te = We.low, Ge = (G >>> 1 | Te << 31) ^ (G >>> 8 | Te << 24) ^ G >>> 7, He = (Te >>> 1 | G << 31) ^ (Te >>> 8 | G << 24) ^ (Te >>> 7 | G << 25), ei = l[Y - 2], Xe = ei.high, bt = ei.low, ti = (Xe >>> 19 | bt << 13) ^ (Xe << 3 | bt >>> 29) ^ Xe >>> 6,
|
|
723
|
-
Pe = (Pe = (Pe = Ge + wi + ((ge = He + _i) >>> 0 < He >>> 0 ? 1 : 0)) + ti + ((ge +=
|
|
722
|
+
var We = l[Y - 15], G = We.high, Te = We.low, Ge = (G >>> 1 | Te << 31) ^ (G >>> 8 | Te << 24) ^ G >>> 7, He = (Te >>> 1 | G << 31) ^ (Te >>> 8 | G << 24) ^ (Te >>> 7 | G << 25), ei = l[Y - 2], Xe = ei.high, bt = ei.low, ti = (Xe >>> 19 | bt << 13) ^ (Xe << 3 | bt >>> 29) ^ Xe >>> 6, lt = (bt >>> 19 | Xe << 13) ^ (bt << 3 | Xe >>> 29) ^ (bt >>> 6 | Xe << 26), kt = l[Y - 7], wi = kt.high, _i = kt.low, zr = l[Y - 16], Fn = zr.high, Kr = zr.low;
|
|
723
|
+
Pe = (Pe = (Pe = Ge + wi + ((ge = He + _i) >>> 0 < He >>> 0 ? 1 : 0)) + ti + ((ge += lt) >>> 0 < lt >>> 0 ? 1 : 0)) + Fn + ((ge += Kr) >>> 0 < Kr >>> 0 ? 1 : 0), se.high = Pe, se.low = ge;
|
|
724
724
|
}
|
|
725
725
|
var Bt, jn = me & $e ^ ~me & Ae, Jr = Se & ie ^ ~Se & De, $n = x & be ^ x & q ^ be & q, Wn = de & Re ^ de & pe ^ Re & pe, zn = (x >>> 28 | de << 4) ^ (x << 30 | de >>> 2) ^ (x << 25 | de >>> 7), qr = (de >>> 28 | x << 4) ^ (de << 30 | x >>> 2) ^ (de << 25 | x >>> 7), Kn = (me >>> 14 | Se << 18) ^ (me >>> 18 | Se << 14) ^ (me << 23 | Se >>> 9), Jn = (Se >>> 14 | me << 18) ^ (Se >>> 18 | me << 14) ^ (Se << 23 | me >>> 9), Gr = c[Y], qn = Gr.high, Xr = Gr.low, li = oe + Kn + ((Bt = ne + Jn) >>> 0 < ne >>> 0 ? 1 : 0), Qr = qr + Wn;
|
|
726
726
|
oe = Ae, ne = De, Ae = $e, De = ie, $e = me, ie = Se, me = Me + (li = (li = (li = li + jn + ((Bt += Jr) >>> 0 < Jr >>> 0 ? 1 : 0)) + qn + ((Bt += Xr) >>> 0 < Xr >>> 0 ? 1 : 0)) + Pe + ((Bt += ge) >>> 0 < ge >>> 0 ? 1 : 0)) + ((Se = ve + Bt | 0) >>> 0 < ve >>> 0 ? 1 : 0) | 0, Me = q, ve = pe, q = be, pe = Re, be = x, Re = de, x = li + (zn + $n + (Qr >>> 0 < qr >>> 0 ? 1 : 0)) + ((de = Bt + Qr | 0) >>> 0 < Bt >>> 0 ? 1 : 0) | 0;
|
|
727
727
|
}
|
|
728
|
-
w = b.low = w + de, b.high = E + x + (w >>> 0 < de >>> 0 ? 1 : 0), k = g.low = k + Re, g.high = I + be + (k >>> 0 < Re >>> 0 ? 1 : 0), D = m.low = D + pe, m.high =
|
|
728
|
+
w = b.low = w + de, b.high = E + x + (w >>> 0 < de >>> 0 ? 1 : 0), k = g.low = k + Re, g.high = I + be + (k >>> 0 < Re >>> 0 ? 1 : 0), D = m.low = D + pe, m.high = N + q + (D >>> 0 < pe >>> 0 ? 1 : 0), K = S.low = K + ve, S.high = H + Me + (K >>> 0 < ve >>> 0 ? 1 : 0), z = R.low = z + Se, R.high = X + me + (z >>> 0 < Se >>> 0 ? 1 : 0), Q = A.low = Q + ie, A.high = j + $e + (Q >>> 0 < ie >>> 0 ? 1 : 0), L = y.low = L + De, y.high = te + Ae + (L >>> 0 < De >>> 0 ? 1 : 0), M = v.low = M + ne, v.high = O + oe + (M >>> 0 < ne >>> 0 ? 1 : 0);
|
|
729
729
|
}, _doFinalize: function() {
|
|
730
730
|
var h = this._data, f = h.words, u = 8 * this._nDataBytes, b = 8 * h.sigBytes;
|
|
731
731
|
return f[b >>> 5] |= 128 << 24 - b % 32, f[30 + (b + 128 >>> 10 << 5)] = Math.floor(u / 4294967296), f[31 + (b + 128 >>> 10 << 5)] = u, h.sigBytes = 4 * f.length, this._process(), this._hash.toX32();
|
|
@@ -784,8 +784,8 @@ function uo() {
|
|
|
784
784
|
k.high = E, k.low = w;
|
|
785
785
|
}
|
|
786
786
|
for (v = 0; v < 5; v++) {
|
|
787
|
-
var
|
|
788
|
-
for (E =
|
|
787
|
+
var N = h[(v + 4) % 5], D = h[(v + 1) % 5], H = D.high, K = D.low;
|
|
788
|
+
for (E = N.high ^ (H << 1 | K >>> 31), w = N.low ^ (K << 1 | H >>> 31), I = 0; I < 5; I++)
|
|
789
789
|
(M = g[v + 5 * I]).high ^= E, M.low ^= w;
|
|
790
790
|
}
|
|
791
791
|
for (var X = 1; X < 25; X++) {
|
|
@@ -794,8 +794,8 @@ function uo() {
|
|
|
794
794
|
var te = h[l[X]];
|
|
795
795
|
te.high = E, te.low = w;
|
|
796
796
|
}
|
|
797
|
-
var
|
|
798
|
-
for (
|
|
797
|
+
var L = h[0], O = g[0];
|
|
798
|
+
for (L.high = O.high, L.low = O.low, v = 0; v < 5; v++)
|
|
799
799
|
for (I = 0; I < 5; I++) {
|
|
800
800
|
var M = g[X = v + 5 * I], x = h[X], de = h[(v + 1) % 5 + 5 * I], be = h[(v + 2) % 5 + 5 * I];
|
|
801
801
|
M.high = x.high ^ ~de.high & be.high, M.low = x.low ^ ~de.low & be.low;
|
|
@@ -823,9 +823,9 @@ function uo() {
|
|
|
823
823
|
}(Math), a.SHA3;
|
|
824
824
|
}(he(), xi())), Ds.exports;
|
|
825
825
|
}
|
|
826
|
-
var Ms, po = { exports: {} },
|
|
826
|
+
var Ms, po = { exports: {} }, Ns, Ls = { exports: {} };
|
|
827
827
|
function Ar() {
|
|
828
|
-
return
|
|
828
|
+
return Ns || (Ns = 1, Ls.exports = function(a) {
|
|
829
829
|
var s, e, t;
|
|
830
830
|
e = (s = a).lib.Base, t = s.enc.Utf8, s.algo.HMAC = e.extend({ init: function(i, r) {
|
|
831
831
|
i = this._hasher = new i.init(), typeof r == "string" && (r = t.parse(r));
|
|
@@ -843,7 +843,7 @@ function Ar() {
|
|
|
843
843
|
var r = this._hasher, n = r.finalize(i);
|
|
844
844
|
return r.reset(), r.finalize(this._oKey.clone().concat(n));
|
|
845
845
|
} });
|
|
846
|
-
}(he())),
|
|
846
|
+
}(he())), Ls.exports;
|
|
847
847
|
}
|
|
848
848
|
var xs, mo = { exports: {} }, Os, Vs = { exports: {} };
|
|
849
849
|
function Mt() {
|
|
@@ -906,8 +906,8 @@ function Fe() {
|
|
|
906
906
|
} }), u = h.CBC = function() {
|
|
907
907
|
var y = f.extend();
|
|
908
908
|
function v(E, w, I) {
|
|
909
|
-
var k,
|
|
910
|
-
|
|
909
|
+
var k, N = this._iv;
|
|
910
|
+
N ? (k = N, this._iv = s) : k = this._prevBlock;
|
|
911
911
|
for (var D = 0; D < I; D++)
|
|
912
912
|
E[w + D] ^= k[D];
|
|
913
913
|
}
|
|
@@ -915,11 +915,11 @@ function Fe() {
|
|
|
915
915
|
var I = this._cipher, k = I.blockSize;
|
|
916
916
|
v.call(this, E, w, k), I.encryptBlock(E, w), this._prevBlock = E.slice(w, w + k);
|
|
917
917
|
} }), y.Decryptor = y.extend({ processBlock: function(E, w) {
|
|
918
|
-
var I = this._cipher, k = I.blockSize,
|
|
919
|
-
I.decryptBlock(E, w), v.call(this, E, w, k), this._prevBlock =
|
|
918
|
+
var I = this._cipher, k = I.blockSize, N = E.slice(w, w + k);
|
|
919
|
+
I.decryptBlock(E, w), v.call(this, E, w, k), this._prevBlock = N;
|
|
920
920
|
} }), y;
|
|
921
921
|
}(), b = (e.pad = {}).Pkcs7 = { pad: function(y, v) {
|
|
922
|
-
for (var E = 4 * v, w = E - y.sigBytes % E, I = w << 24 | w << 16 | w << 8 | w, k = [],
|
|
922
|
+
for (var E = 4 * v, w = E - y.sigBytes % E, I = w << 24 | w << 16 | w << 8 | w, k = [], N = 0; N < w; N += 4)
|
|
923
923
|
k.push(I);
|
|
924
924
|
var D = r.create(k, w);
|
|
925
925
|
y.concat(D);
|
|
@@ -950,8 +950,8 @@ function Fe() {
|
|
|
950
950
|
return w[0] == 1398893684 && w[1] == 1701076831 && (v = r.create(w.slice(2, 4)), w.splice(0, 4), E.sigBytes -= 16), g.create({ ciphertext: E, salt: v });
|
|
951
951
|
} }, S = t.SerializableCipher = i.extend({ cfg: i.extend({ format: m }), encrypt: function(y, v, E, w) {
|
|
952
952
|
w = this.cfg.extend(w);
|
|
953
|
-
var I = y.createEncryptor(E, w), k = I.finalize(v),
|
|
954
|
-
return g.create({ ciphertext: k, key: E, iv:
|
|
953
|
+
var I = y.createEncryptor(E, w), k = I.finalize(v), N = I.cfg;
|
|
954
|
+
return g.create({ ciphertext: k, key: E, iv: N.iv, algorithm: y, mode: N.mode, padding: N.padding, blockSize: y.blockSize, formatter: w.format });
|
|
955
955
|
}, decrypt: function(y, v, E, w) {
|
|
956
956
|
return w = this.cfg.extend(w), v = this._parse(v, w.format), y.createDecryptor(E, w).finalize(v.ciphertext);
|
|
957
957
|
}, _parse: function(y, v) {
|
|
@@ -961,8 +961,8 @@ function Fe() {
|
|
|
961
961
|
k = l.create({ keySize: v + E, hasher: I }).compute(y, w);
|
|
962
962
|
else
|
|
963
963
|
var k = l.create({ keySize: v + E }).compute(y, w);
|
|
964
|
-
var
|
|
965
|
-
return k.sigBytes = 4 * v, g.create({ key: k, iv:
|
|
964
|
+
var N = r.create(k.words.slice(v), 4 * E);
|
|
965
|
+
return k.sigBytes = 4 * v, g.create({ key: k, iv: N, salt: w });
|
|
966
966
|
} }, A = t.PasswordBasedCipher = S.extend({ cfg: S.cfg.extend({ kdf: R }), encrypt: function(y, v, E, w) {
|
|
967
967
|
var I = (w = this.cfg.extend(w)).kdf.execute(E, y.keySize, y.ivSize, w.salt, w.hasher);
|
|
968
968
|
w.iv = I.iv;
|
|
@@ -1193,16 +1193,16 @@ fn.exports = function(a) {
|
|
|
1193
1193
|
var E = y + v, w = A[E];
|
|
1194
1194
|
A[E] = 16711935 & (w << 8 | w >>> 24) | 4278255360 & (w << 24 | w >>> 8);
|
|
1195
1195
|
}
|
|
1196
|
-
var I, k,
|
|
1197
|
-
for (K = I =
|
|
1198
|
-
te = I + A[y + x[v]] | 0, te += v < 16 ? u(k,
|
|
1199
|
-
te =
|
|
1196
|
+
var I, k, N, D, H, K, X, z, j, Q, te, L = this._hash.words, O = d.words, M = h.words, x = n.words, de = o.words, be = c.words, Re = l.words;
|
|
1197
|
+
for (K = I = L[0], X = k = L[1], z = N = L[2], j = D = L[3], Q = H = L[4], v = 0; v < 80; v += 1)
|
|
1198
|
+
te = I + A[y + x[v]] | 0, te += v < 16 ? u(k, N, D) + O[0] : v < 32 ? b(k, N, D) + O[1] : v < 48 ? g(k, N, D) + O[2] : v < 64 ? m(k, N, D) + O[3] : S(k, N, D) + O[4], te = (te = R(te |= 0, be[v])) + H | 0, I = H, H = D, D = R(N, 10), N = k, k = te, te = K + A[y + de[v]] | 0, te += v < 16 ? S(X, z, j) + M[0] : v < 32 ? m(X, z, j) + M[1] : v < 48 ? g(X, z, j) + M[2] : v < 64 ? b(X, z, j) + M[3] : u(X, z, j) + M[4], te = (te = R(te |= 0, Re[v])) + Q | 0, K = Q, Q = j, j = R(z, 10), z = X, X = te;
|
|
1199
|
+
te = L[1] + N + j | 0, L[1] = L[2] + D + Q | 0, L[2] = L[3] + H + K | 0, L[3] = L[4] + I + X | 0, L[4] = L[0] + k + z | 0, L[0] = te;
|
|
1200
1200
|
}, _doFinalize: function() {
|
|
1201
1201
|
var A = this._data, y = A.words, v = 8 * this._nDataBytes, E = 8 * A.sigBytes;
|
|
1202
1202
|
y[E >>> 5] |= 128 << 24 - E % 32, y[14 + (E + 64 >>> 9 << 4)] = 16711935 & (v << 8 | v >>> 24) | 4278255360 & (v << 24 | v >>> 8), A.sigBytes = 4 * (y.length + 1), this._process();
|
|
1203
1203
|
for (var w = this._hash, I = w.words, k = 0; k < 5; k++) {
|
|
1204
|
-
var
|
|
1205
|
-
I[k] = 16711935 & (
|
|
1204
|
+
var N = I[k];
|
|
1205
|
+
I[k] = 16711935 & (N << 8 | N >>> 24) | 4278255360 & (N << 24 | N >>> 8);
|
|
1206
1206
|
}
|
|
1207
1207
|
return w;
|
|
1208
1208
|
}, clone: function() {
|
|
@@ -1333,11 +1333,11 @@ fn.exports = function(a) {
|
|
|
1333
1333
|
var R = m[S + 1];
|
|
1334
1334
|
m[S + 1] = m[S + 3], m[S + 3] = R, this._doCryptBlock(m, S, this._invKeySchedule, d, h, f, u, r), R = m[S + 1], m[S + 1] = m[S + 3], m[S + 3] = R;
|
|
1335
1335
|
}, _doCryptBlock: function(m, S, R, A, y, v, E, w) {
|
|
1336
|
-
for (var I = this._nRounds, k = m[S] ^ R[0],
|
|
1337
|
-
var z = A[k >>> 24] ^ y[
|
|
1338
|
-
k = z,
|
|
1336
|
+
for (var I = this._nRounds, k = m[S] ^ R[0], N = m[S + 1] ^ R[1], D = m[S + 2] ^ R[2], H = m[S + 3] ^ R[3], K = 4, X = 1; X < I; X++) {
|
|
1337
|
+
var z = A[k >>> 24] ^ y[N >>> 16 & 255] ^ v[D >>> 8 & 255] ^ E[255 & H] ^ R[K++], j = A[N >>> 24] ^ y[D >>> 16 & 255] ^ v[H >>> 8 & 255] ^ E[255 & k] ^ R[K++], Q = A[D >>> 24] ^ y[H >>> 16 & 255] ^ v[k >>> 8 & 255] ^ E[255 & N] ^ R[K++], te = A[H >>> 24] ^ y[k >>> 16 & 255] ^ v[N >>> 8 & 255] ^ E[255 & D] ^ R[K++];
|
|
1338
|
+
k = z, N = j, D = Q, H = te;
|
|
1339
1339
|
}
|
|
1340
|
-
z = (w[k >>> 24] << 24 | w[
|
|
1340
|
+
z = (w[k >>> 24] << 24 | w[N >>> 16 & 255] << 16 | w[D >>> 8 & 255] << 8 | w[255 & H]) ^ R[K++], j = (w[N >>> 24] << 24 | w[D >>> 16 & 255] << 16 | w[H >>> 8 & 255] << 8 | w[255 & k]) ^ R[K++], Q = (w[D >>> 24] << 24 | w[H >>> 16 & 255] << 16 | w[k >>> 8 & 255] << 8 | w[255 & N]) ^ R[K++], te = (w[H >>> 24] << 24 | w[k >>> 16 & 255] << 16 | w[N >>> 8 & 255] << 8 | w[255 & D]) ^ R[K++], m[S] = z, m[S + 1] = j, m[S + 2] = Q, m[S + 3] = te;
|
|
1341
1341
|
}, keySize: 8 });
|
|
1342
1342
|
s.AES = e._createHelper(g);
|
|
1343
1343
|
}(), a.AES;
|
|
@@ -1501,8 +1501,8 @@ function Or(a) {
|
|
|
1501
1501
|
w += [...R.entries()].sort(I).map((D) => D[0] + "=" + D[1]).join("&");
|
|
1502
1502
|
} catch (D) {
|
|
1503
1503
|
}
|
|
1504
|
-
const
|
|
1505
|
-
A.set("Authorization",
|
|
1504
|
+
const N = "LOG " + m + ":" + Gt.HmacSHA1(w, S).toString(Gt.enc.Base64);
|
|
1505
|
+
A.set("Authorization", N), A.set("x-log-date", v);
|
|
1506
1506
|
}("POST", n, a.accessKeyId, a.accessKeySecret, h, f, c, d);
|
|
1507
1507
|
let u = Object.fromEntries(f);
|
|
1508
1508
|
return { data: e, header: u };
|
|
@@ -1526,7 +1526,7 @@ function Or(a) {
|
|
|
1526
1526
|
} };
|
|
1527
1527
|
}
|
|
1528
1528
|
typeof window != "undefined" && gn(window, "stsPlugin", Or);
|
|
1529
|
-
var
|
|
1529
|
+
var No = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g, Lo = /\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g, xo = /[^-+\dA-Z]/g;
|
|
1530
1530
|
function Fi(a, s, e, t) {
|
|
1531
1531
|
if (arguments.length !== 1 || typeof a != "string" || /\d/.test(a) || (s = a, a = void 0), (a = a || a === 0 ? a : /* @__PURE__ */ new Date()) instanceof Date || (a = new Date(a)), isNaN(a))
|
|
1532
1532
|
throw TypeError("Invalid date");
|
|
@@ -1621,7 +1621,7 @@ function Fi(a, s, e, t) {
|
|
|
1621
1621
|
}, N: function() {
|
|
1622
1622
|
return Vo(a);
|
|
1623
1623
|
} };
|
|
1624
|
-
return s.replace(
|
|
1624
|
+
return s.replace(No, function(S) {
|
|
1625
1625
|
return S in m ? m[S]() : S.slice(1, S.length - 1);
|
|
1626
1626
|
});
|
|
1627
1627
|
}
|
|
@@ -1646,7 +1646,7 @@ var la = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShort
|
|
|
1646
1646
|
var s = a.getDay();
|
|
1647
1647
|
return s === 0 && (s = 7), s;
|
|
1648
1648
|
}, Uo = function(a) {
|
|
1649
|
-
return (String(a).match(
|
|
1649
|
+
return (String(a).match(Lo) || [""]).pop().replace(xo, "").replace(/GMT\+0000/g, "UTC");
|
|
1650
1650
|
};
|
|
1651
1651
|
const { BrowserUtil: Bo } = fe, Ho = "EdgeHTML", ha = "Blink", Fo = "Trident", jo = "Gecko", $o = "WebKit", Ii = (a, s) => {
|
|
1652
1652
|
const e = s.match(a);
|
|
@@ -1962,8 +1962,8 @@ class Yo {
|
|
|
1962
1962
|
p(this, "stsPlugin");
|
|
1963
1963
|
p(this, "stsData");
|
|
1964
1964
|
p(this, "stsExpiration", Date.now());
|
|
1965
|
-
p(this, "clientId",
|
|
1966
|
-
p(this, "bSesid",
|
|
1965
|
+
p(this, "clientId", ct());
|
|
1966
|
+
p(this, "bSesid", ct());
|
|
1967
1967
|
p(this, "logLevel", 3);
|
|
1968
1968
|
p(this, "appId", "");
|
|
1969
1969
|
p(this, "sessionId", "");
|
|
@@ -2020,7 +2020,7 @@ class Yo {
|
|
|
2020
2020
|
this.updateTaskTimer && clearTimeout(this.updateTaskTimer);
|
|
2021
2021
|
}
|
|
2022
2022
|
reset() {
|
|
2023
|
-
this.bSesid =
|
|
2023
|
+
this.bSesid = ct(), this.endReported = !0, this.logSequence = 0, this.appId = "", this.sessionId = "";
|
|
2024
2024
|
}
|
|
2025
2025
|
startSTSUpdateTask() {
|
|
2026
2026
|
return _(this, null, function* () {
|
|
@@ -2095,7 +2095,7 @@ class Yo {
|
|
|
2095
2095
|
this.sessionId && this.tracker ? this.sendLog(t) : (this.logCache.push(t), this.logCache.length >= 200 && this.logCache.shift());
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
|
-
class
|
|
2098
|
+
class T {
|
|
2099
2099
|
static getLogger() {
|
|
2100
2100
|
return this.logger || (this.logger = new Yo()), this.logger;
|
|
2101
2101
|
}
|
|
@@ -2136,7 +2136,7 @@ class C {
|
|
|
2136
2136
|
this.getLogger().e("[ERR]", ...s);
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
|
-
p(
|
|
2139
|
+
p(T, "logger");
|
|
2140
2140
|
const Hi = class Hi extends je {
|
|
2141
2141
|
constructor(e) {
|
|
2142
2142
|
super();
|
|
@@ -2163,7 +2163,7 @@ const Hi = class Hi extends je {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
handleError(e, t) {
|
|
2165
2165
|
var i;
|
|
2166
|
-
|
|
2166
|
+
T.error(`[${this.logName}]`, "Error:", e, t), this.emit("error", e, t), this.updateConnectionStatus(re.AliRtcConnectionStatusFailed), (i = this.rtsInstance) == null || i.dispose(), this.rtsInstance = void 0;
|
|
2167
2167
|
}
|
|
2168
2168
|
fetchStreamUrlAndPlay() {
|
|
2169
2169
|
return _(this, null, function* () {
|
|
@@ -2176,32 +2176,32 @@ const Hi = class Hi extends je {
|
|
|
2176
2176
|
return void this.handleError("FETCH_STREAM_URL_FAILED", `Fetch stream url failed, status: ${r.status} ${d}`);
|
|
2177
2177
|
}
|
|
2178
2178
|
const n = yield r.json();
|
|
2179
|
-
if (
|
|
2179
|
+
if (T.debug(`[${this.logName}]`, "Query pull uri response:", n), n.code !== 0)
|
|
2180
2180
|
return void this.handleError("FETCH_STREAM_URL_FAILED", `Business error, code: ${n.code}`);
|
|
2181
2181
|
if (!((t = (e = n == null ? void 0 : n.data) == null ? void 0 : e.subscribe) != null && t.pullstreamurl) || !((i = n == null ? void 0 : n.data) != null && i.tracks))
|
|
2182
2182
|
return void this.handleError("NO_STREAM_AVAILABLE", "No stream available");
|
|
2183
2183
|
const o = `${n.data.subscribe.pullstreamurl}&curUid=${this.config.currentUserId}&tarCid=${this.config.targetChannelId}&tarUid=${this.config.targetUserId}`, c = n.data.tracks.filter((d) => rs(d.msid)).map((d) => d.msid), l = n.data.tracks.filter((d) => ss(d.msid)).map((d) => d.msid);
|
|
2184
2184
|
if (c.length === 0 && l.length === 0)
|
|
2185
2185
|
return void this.handleError("NO_STREAM_AVAILABLE", "No tracks available");
|
|
2186
|
-
|
|
2187
|
-
d.retryTimes >= 300 ? this.handleError("SUBSCRIBE_FAILED", "reconnect failed") : this.currentStatus !== re.AliRtcConnectionStatusReconnecting && (
|
|
2186
|
+
T.info(`[${this.logName}]`, "Fetch stream url success", o, c, l), this.latestStreamInfo = { url: o, vMsid: c, aMsid: l }, this.preferredL1Ip = n.l1ip, this.rtsInstance = fe.createClient(), this.rtsInstance.on("reconnect", (d) => {
|
|
2187
|
+
d.retryTimes >= 300 ? this.handleError("SUBSCRIBE_FAILED", "reconnect failed") : this.currentStatus !== re.AliRtcConnectionStatusReconnecting && (T.warn(`[${this.logName}]`, "reconnecting", d), this.updateConnectionStatus(re.AliRtcConnectionStatusReconnecting));
|
|
2188
2188
|
}), this.rtsInstance.on("hebtReceived", (d) => {
|
|
2189
2189
|
var h, f;
|
|
2190
|
-
d.recode === 0 && ((f = (h = d.streams) == null ? void 0 : h[0]) == null ? void 0 : f.res_code) === 200 && this.currentStatus === re.AliRtcConnectionStatusReconnecting && (
|
|
2190
|
+
d.recode === 0 && ((f = (h = d.streams) == null ? void 0 : h[0]) == null ? void 0 : f.res_code) === 200 && this.currentStatus === re.AliRtcConnectionStatusReconnecting && (T.warn(`[${this.logName}]`, "reconnect success", d), this.updateConnectionStatus(re.AliRtcConnectionStatusConnected));
|
|
2191
2191
|
});
|
|
2192
2192
|
try {
|
|
2193
2193
|
if (this._remoteStream = yield this.subscribeWithPreferredL1Fallback(o, { vMsid: c, aMsid: l, heartbeat: { interval: 1e3, timeout: 5e3 }, retryTimes: 300, beforeRetry: () => _(this, null, function* () {
|
|
2194
2194
|
var h;
|
|
2195
|
-
|
|
2195
|
+
T.info(`[${this.logName}]`, "Trying to fetch new stream url...");
|
|
2196
2196
|
const d = yield fetch(this.roomServerUrl);
|
|
2197
2197
|
if (d.status !== 400) {
|
|
2198
2198
|
if (d.ok && d.status === 200) {
|
|
2199
2199
|
const f = yield d.json();
|
|
2200
|
-
if (
|
|
2200
|
+
if (T.debug(`[${this.logName}]`, "Query pull uri response:", f), f.code === 0 && ((h = f.data.subscribe) == null ? void 0 : h.pullstreamurl) && f.data.tracks) {
|
|
2201
2201
|
const u = `${f.data.subscribe.pullstreamurl}&curUid=${this.config.currentUserId}&tarCid=${this.config.targetChannelId}&tarUid=${this.config.targetUserId}`, b = f.data.tracks.filter((m) => rs(m.msid)).map((m) => m.msid), g = f.data.tracks.filter((m) => ss(m.msid)).map((m) => m.msid);
|
|
2202
2202
|
if (b.length > 0 || g.length > 0) {
|
|
2203
2203
|
const m = this.usePreferredL1InRetry ? Rr(u, f.l1ip) : u;
|
|
2204
|
-
|
|
2204
|
+
T.info(`[${this.logName}]`, "Fetch new stream url success", m, b, g, `usePreferredL1InRetry=${this.usePreferredL1InRetry}`), this.latestStreamInfo = { url: m, vMsid: b, aMsid: g };
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
@@ -2211,7 +2211,7 @@ const Hi = class Hi extends je {
|
|
|
2211
2211
|
const f = yield d.text();
|
|
2212
2212
|
this.handleError("FETCH_STREAM_URL_FAILED", `Fetch new stream url failed, status: ${d.status} ${f}`);
|
|
2213
2213
|
}
|
|
2214
|
-
}) }),
|
|
2214
|
+
}) }), T.info(`[${this.logName}]`, "Subscribe success", this._remoteStream.traceId), this.remoteStream = this.createRemoteStreamProxy(this._remoteStream), this.updateConnectionStatus(re.AliRtcConnectionStatusConnected), this.startNetworkQualityTimer(), this.config.view) {
|
|
2215
2215
|
let d;
|
|
2216
2216
|
d = typeof this.config.view == "string" ? document.getElementById(this.config.view) : this.config.view, d instanceof HTMLMediaElement ? this._remoteStream.play(d) : this.emit("error", "INVALID_VIEW_ELEMENT", "view is not a media element");
|
|
2217
2217
|
}
|
|
@@ -2228,7 +2228,7 @@ const Hi = class Hi extends je {
|
|
|
2228
2228
|
const i = Rr(e, this.preferredL1Ip);
|
|
2229
2229
|
if (i !== e) {
|
|
2230
2230
|
const n = window.__ali_prefer_media_server || this.preferredL1Ip;
|
|
2231
|
-
|
|
2231
|
+
T.info(`[${this.logName}]`, "Subscribing with preferred media server, ip:", n);
|
|
2232
2232
|
const o = new Promise((c, l) => {
|
|
2233
2233
|
setTimeout(() => l(new Error("PREFERRED_L1_TIMEOUT")), 3e3);
|
|
2234
2234
|
});
|
|
@@ -2237,7 +2237,7 @@ const Hi = class Hi extends je {
|
|
|
2237
2237
|
return this.latestStreamInfo.url = i, this.logCandidateProtocol("subscribe (preferred)"), c;
|
|
2238
2238
|
} catch (c) {
|
|
2239
2239
|
if (c.message === "PREFERRED_L1_TIMEOUT") {
|
|
2240
|
-
|
|
2240
|
+
T.warn(`[${this.logName}]`, "Preferred media server subscribe timeout, falling back to DNS"), this.usePreferredL1InRetry = !1;
|
|
2241
2241
|
const l = yield this.rtsInstance.subscribe(e, t);
|
|
2242
2242
|
return this.logCandidateProtocol("subscribe (fallback)"), l;
|
|
2243
2243
|
}
|
|
@@ -2254,7 +2254,7 @@ const Hi = class Hi extends je {
|
|
|
2254
2254
|
try {
|
|
2255
2255
|
const n = (r = (i = (t = this.rtsInstance) == null ? void 0 : t.commonController) == null ? void 0 : i.peerCore) == null ? void 0 : r.pc;
|
|
2256
2256
|
if (!n)
|
|
2257
|
-
return void
|
|
2257
|
+
return void T.debug(`[${this.logName}]`, `${e} - PC not available`);
|
|
2258
2258
|
const o = yield n.getStats();
|
|
2259
2259
|
let c, l, d, h;
|
|
2260
2260
|
o.forEach((f) => {
|
|
@@ -2263,9 +2263,9 @@ const Hi = class Hi extends je {
|
|
|
2263
2263
|
f.type !== "candidate-pair" || f.state !== "succeeded" && f.state !== "in-progress" || c || (c = f.localCandidateId, l = f.remoteCandidateId);
|
|
2264
2264
|
}), o.forEach((f) => {
|
|
2265
2265
|
f.type === "local-candidate" && f.id === c && (d = f.protocol), f.type === "remote-candidate" && f.id === l && (h = f.protocol);
|
|
2266
|
-
}),
|
|
2266
|
+
}), T.info(`[${this.logName}]`, `${e} - Candidate Protocol: local=${d || "unknown"}, remote=${h || "unknown"}`);
|
|
2267
2267
|
} catch (n) {
|
|
2268
|
-
|
|
2268
|
+
T.warn(`[${this.logName}]`, `${e} - Failed to get candidate protocol:`, n);
|
|
2269
2269
|
}
|
|
2270
2270
|
});
|
|
2271
2271
|
}
|
|
@@ -2274,10 +2274,10 @@ const Hi = class Hi extends je {
|
|
|
2274
2274
|
return new Proxy(e, { get(i, r, n) {
|
|
2275
2275
|
const o = Reflect.get(i, r, n);
|
|
2276
2276
|
return typeof o == "function" ? function(...c) {
|
|
2277
|
-
|
|
2277
|
+
T.interface(`[${t}]`, `remoteStream.${String(r)} called`, c.length > 0 ? c : "");
|
|
2278
2278
|
const l = o.apply(i, c);
|
|
2279
|
-
return l instanceof Promise ? l.then((d) => (
|
|
2280
|
-
throw
|
|
2279
|
+
return l instanceof Promise ? l.then((d) => (T.info(`[${t}]`, `remoteStream.${String(r)} resolved`, d !== void 0 ? d : ""), d), (d) => {
|
|
2280
|
+
throw T.error(`[${t}]`, `remoteStream.${String(r)} rejected`, d), d;
|
|
2281
2281
|
}) : l;
|
|
2282
2282
|
} : o;
|
|
2283
2283
|
} });
|
|
@@ -2289,7 +2289,7 @@ const Hi = class Hi extends je {
|
|
|
2289
2289
|
const e = yield this.getNetworkQuality();
|
|
2290
2290
|
this.emit("networkQuality", e);
|
|
2291
2291
|
} catch (e) {
|
|
2292
|
-
|
|
2292
|
+
T.warn(`[${this.logName}]`, "Failed to get network quality:", e);
|
|
2293
2293
|
}
|
|
2294
2294
|
}), 2e3);
|
|
2295
2295
|
}
|
|
@@ -2318,14 +2318,14 @@ const Hi = class Hi extends je {
|
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
2320
2320
|
dispose() {
|
|
2321
|
-
|
|
2321
|
+
T.info(`[${this.logName}]`, "dispose"), this.stopNetworkQualityTimer(), this.updateConnectionStatus(re.AliRtcConnectionStatusDisconnected), this.rtsInstance && this.rtsInstance.dispose();
|
|
2322
2322
|
}
|
|
2323
2323
|
};
|
|
2324
2324
|
p(Hi, "logName", "RemoteStreamHandler");
|
|
2325
2325
|
let wr = Hi;
|
|
2326
2326
|
var Yi, Zi, _r = { exports: {} };
|
|
2327
2327
|
Yi = _r, Zi = _r.exports, function(a, s) {
|
|
2328
|
-
var e = "function", t = "undefined", i = "object", r = "string", n = "major", o = "model", c = "name", l = "type", d = "vendor", h = "version", f = "architecture", u = "console", b = "mobile", g = "tablet", m = "smarttv", S = "wearable", R = "embedded", A = "Amazon", y = "Apple", v = "ASUS", E = "BlackBerry", w = "Browser", I = "Chrome", k = "Firefox",
|
|
2328
|
+
var e = "function", t = "undefined", i = "object", r = "string", n = "major", o = "model", c = "name", l = "type", d = "vendor", h = "version", f = "architecture", u = "console", b = "mobile", g = "tablet", m = "smarttv", S = "wearable", R = "embedded", A = "Amazon", y = "Apple", v = "ASUS", E = "BlackBerry", w = "Browser", I = "Chrome", k = "Firefox", N = "Google", D = "Huawei", H = "LG", K = "Microsoft", X = "Motorola", z = "Opera", j = "Samsung", Q = "Sharp", te = "Sony", L = "Xiaomi", O = "Zebra", M = "Facebook", x = "Chromium OS", de = "Mac OS", be = " Browser", Re = function(oe) {
|
|
2329
2329
|
for (var ne = {}, Y = 0; Y < oe.length; Y++)
|
|
2330
2330
|
ne[oe[Y].toUpperCase()] = oe[Y];
|
|
2331
2331
|
return ne;
|
|
@@ -2354,7 +2354,7 @@ Yi = _r, Zi = _r.exports, function(a, s) {
|
|
|
2354
2354
|
} else if (q(ne[Y], oe))
|
|
2355
2355
|
return Y === "?" ? s : Y;
|
|
2356
2356
|
return ne.hasOwnProperty("*") ? ne["*"] : oe;
|
|
2357
|
-
}, Se = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, $e = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [h, [c, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [h, [c, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [c, h], [/opios[\/ ]+([\w\.]+)/i], [h, [c, z + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [h, [c, z + " GX"]], [/\bopr\/([\w\.]+)/i], [h, [c, z]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [h, [c, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [h, [c, "Maxthon"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i, /(heytap|ovi|115)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [c, h], [/quark(?:pc)?\/([-\w\.]+)/i], [h, [c, "Quark"]], [/\bddg\/([\w\.]+)/i], [h, [c, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [h, [c, "UC" + w]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [h, [c, "WeChat"]], [/konqueror\/([\w\.]+)/i], [h, [c, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [h, [c, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [h, [c, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [h, [c, "Smart Lenovo " + w]], [/(avast|avg)\/([\w\.]+)/i], [[c, /(.+)/, "$1 Secure " + w], h], [/\bfocus\/([\w\.]+)/i], [h, [c, k + " Focus"]], [/\bopt\/([\w\.]+)/i], [h, [c, z + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [h, [c, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [h, [c, "Dolphin"]], [/coast\/([\w\.]+)/i], [h, [c, z + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [h, [c, "MIUI" + be]], [/fxios\/([\w\.-]+)/i], [h, [c, k]], [/\bqihoobrowser\/?([\w\.]*)/i], [h, [c, "360"]], [/\b(qq)\/([\w\.]+)/i], [[c, /(.+)/, "$1Browser"], h], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[c, /(.+)/, "$1" + be], h], [/samsungbrowser\/([\w\.]+)/i], [h, [c, j + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [h, [c, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[c, "Sogou Mobile"], h], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [c, h], [/(lbbrowser|rekonq)/i, /\[(linkedin)app\]/i], [c], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [h, c], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[c, M], h], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(twitter)(?:and| f.+e\/([\w\.]+))/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [c, h], [/\bgsa\/([\w\.]+) .*safari\//i], [h, [c, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [h, [c, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [h, [c, I + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[c, I + " WebView"], h], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [h, [c, "Android " + w]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [c, h], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [h, [c, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [h, c], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [c, [h, me, { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }]], [/(webkit|khtml)\/([\w\.]+)/i], [c, h], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[c, "Netscape"], h], [/(wolvic|librewolf)\/([\w\.]+)/i], [c, h], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [h, [c, k + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [c, [h, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [c, [h, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[f, "amd64"]], [/(ia32(?=;))/i], [[f, pe]], [/((?:i[346]|x)86)[;\)]/i], [[f, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[f, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[f, "armhf"]], [/windows (ce|mobile); ppc;/i], [[f, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[f, /ower/, "", pe]], [/(sun4\w)[;\)]/i], [[f, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[f, pe]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [o, [d, j], [l, g]], [/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]((?!sm-[lr])[-\w]+)/i, /sec-(sgh\w+)/i], [o, [d, j], [l, b]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [o, [d, y], [l, b]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [o, [d, y], [l, g]], [/(macintosh);/i], [o, [d, y]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [o, [d, Q], [l, b]], [/(?:honor)([-\w ]+)[;\)]/i], [o, [d, "Honor"], [l, b]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [o, [d, D], [l, g]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [o, [d, D], [l, b]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i], [[o, /_/g, " "], [d, N], [l, b]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[o, /_/g, " "], [d, N], [l, g]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [o, [d, "OPPO"], [l, b]], [/\b(opd2\d{3}a?) bui/i], [o, [d, "OPPO"], [l, g]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [o, [d, "Vivo"], [l, b]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [o, [d, "Realme"], [l, b]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [o, [d, X], [l, b]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [o, [d, X], [l, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [o, [d, H], [l, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [o, [d, H], [l, b]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [o, [d, "Lenovo"], [l, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[o, /_/g, " "], [d, "Nokia"], [l, b]], [/(pixel c)\b/i], [o, [d, L], [l, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [o, [d, L], [l, b]], [/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [o, [d, te], [l, b]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[o, "Xperia Tablet"], [d, te], [l, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [o, [d, "OnePlus"], [l, b]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [o, [d, A], [l, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[o, /(.+)/g, "Fire Phone $1"], [d, A], [l, b]], [/(playbook);[-\w\),; ]+(rim)/i], [o, d, [l, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [o, [d, E], [l, b]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [o, [d, v], [l, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [o, [d, v], [l, b]], [/(nexus 9)/i], [o, [d, "HTC"], [l, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [d, [o, /_/g, " "], [l, b]], [/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i], [o, [d, "TCL"], [l, g]], [/(itel) ((\w+))/i], [[d, pe], o, [l, me, { tablet: ["p10001l", "w7001"], "*": "mobile" }]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [o, [d, "Acer"], [l, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [o, [d, "Meizu"], [l, b]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [o, [d, "Ulefone"], [l, b]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [o, [d, "Energizer"], [l, b]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [o, [d, "Cat"], [l, b]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [o, [d, "Smartfren"], [l, b]], [/droid.+; (a(?:015|06[35]|142p?))/i], [o, [d, "Nothing"], [l, b]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [d, o, [l, b]], [/(imo) (tab \w+)/i, /(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [d, o, [l, g]], [/(surface duo)/i], [o, [d, K], [l, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [o, [d, "Fairphone"], [l, b]], [/(u304aa)/i], [o, [d, "AT&T"], [l, b]], [/\bsie-(\w*)/i], [o, [d, "Siemens"], [l, b]], [/\b(rct\w+) b/i], [o, [d, "RCA"], [l, g]], [/\b(venue[\d ]{2,7}) b/i], [o, [d, "Dell"], [l, g]], [/\b(q(?:mv|ta)\w+) b/i], [o, [d, "Verizon"], [l, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [o, [d, "Barnes & Noble"], [l, g]], [/\b(tm\d{3}\w+) b/i], [o, [d, "NuVision"], [l, g]], [/\b(k88) b/i], [o, [d, "ZTE"], [l, g]], [/\b(nx\d{3}j) b/i], [o, [d, "ZTE"], [l, b]], [/\b(gen\d{3}) b.+49h/i], [o, [d, "Swiss"], [l, b]], [/\b(zur\d{3}) b/i], [o, [d, "Swiss"], [l, g]], [/\b((zeki)?tb.*\b) b/i], [o, [d, "Zeki"], [l, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[d, "Dragon Touch"], o, [l, g]], [/\b(ns-?\w{0,9}) b/i], [o, [d, "Insignia"], [l, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [o, [d, "NextBook"], [l, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[d, "Voice"], o, [l, b]], [/\b(lvtel\-)?(v1[12]) b/i], [[d, "LvTel"], o, [l, b]], [/\b(ph-1) /i], [o, [d, "Essential"], [l, b]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [o, [d, "Envizen"], [l, g]], [/\b(trio[-\w\. ]+) b/i], [o, [d, "MachSpeed"], [l, g]], [/\btu_(1491) b/i], [o, [d, "Rotor"], [l, g]], [/(shield[\w ]+) b/i], [o, [d, "Nvidia"], [l, g]], [/(sprint) (\w+)/i], [d, o, [l, b]], [/(kin\.[onetw]{3})/i], [[o, /\./g, " "], [d, K], [l, b]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [o, [d, O], [l, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [o, [d, O], [l, b]], [/smart-tv.+(samsung)/i], [d, [l, m]], [/hbbtv.+maple;(\d+)/i], [[o, /^/, "SmartTV"], [d, j], [l, m]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[d, H], [l, m]], [/(apple) ?tv/i], [d, [o, y + " TV"], [l, m]], [/crkey/i], [[o, I + "cast"], [d, L], [l, m]], [/droid.+aft(\w+)( bui|\))/i], [o, [d, A], [l, m]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [o, [d, Q], [l, m]], [/(bravia[\w ]+)( bui|\))/i], [o, [d, te], [l, m]], [/(mitv-\w{5}) bui/i], [o, [d, N], [l, m]], [/Hbbtv.*(technisat) (.*);/i], [d, o, [l, m]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[d, Me], [o, Me], [l, m]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[l, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [d, o, [l, u]], [/droid.+; (shield) bui/i], [o, [d, "Nvidia"], [l, u]], [/(playstation [345portablevi]+)/i], [o, [d, te], [l, u]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [o, [d, K], [l, u]], [/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i], [o, [d, j], [l, S]], [/((pebble))app/i], [d, o, [l, S]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [o, [d, y], [l, S]], [/droid.+; (glass) \d/i], [o, [d, L], [l, S]], [/droid.+; (wt63?0{2,3})\)/i], [o, [d, O], [l, S]], [/droid.+; (glass) \d/i], [o, [d, L], [l, S]], [/(pico) (4|neo3(?: link|pro)?)/i], [d, o, [l, S]], [/; (quest( \d| pro)?)/i], [o, [d, M], [l, S]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [d, [l, R]], [/(aeobc)\b/i], [o, [d, A], [l, R]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [o, [l, b]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [o, [l, g]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[l, g]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[l, b]], [/(android[-\w\. ]{0,9});.+buil/i], [o, [d, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [h, [c, "EdgeHTML"]], [/(arkweb)\/([\w\.]+)/i], [c, h], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [h, [c, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [c, h], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [h, c]], os: [[/microsoft (windows) (vista|xp)/i], [c, h], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [c, [h, me, Se]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[h, me, Se], [c, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[h, /_/g, "."], [c, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[c, de], [h, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [h, c], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [c, h], [/\(bb(10);/i], [h, [c, E]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [h, [c, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [h, [c, k + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [h, [c, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [h, [c, "watchOS"]], [/crkey\/([\d\.]+)/i], [h, [c, I + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[c, x], h], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [c, h], [/(sunos) ?([\w\.\d]*)/i], [[c, "Solaris"], h], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [c, h]] }, ie = function(oe, ne) {
|
|
2357
|
+
}, Se = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, $e = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [h, [c, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [h, [c, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [c, h], [/opios[\/ ]+([\w\.]+)/i], [h, [c, z + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [h, [c, z + " GX"]], [/\bopr\/([\w\.]+)/i], [h, [c, z]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [h, [c, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [h, [c, "Maxthon"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i, /(heytap|ovi|115)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [c, h], [/quark(?:pc)?\/([-\w\.]+)/i], [h, [c, "Quark"]], [/\bddg\/([\w\.]+)/i], [h, [c, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [h, [c, "UC" + w]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [h, [c, "WeChat"]], [/konqueror\/([\w\.]+)/i], [h, [c, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [h, [c, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [h, [c, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [h, [c, "Smart Lenovo " + w]], [/(avast|avg)\/([\w\.]+)/i], [[c, /(.+)/, "$1 Secure " + w], h], [/\bfocus\/([\w\.]+)/i], [h, [c, k + " Focus"]], [/\bopt\/([\w\.]+)/i], [h, [c, z + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [h, [c, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [h, [c, "Dolphin"]], [/coast\/([\w\.]+)/i], [h, [c, z + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [h, [c, "MIUI" + be]], [/fxios\/([\w\.-]+)/i], [h, [c, k]], [/\bqihoobrowser\/?([\w\.]*)/i], [h, [c, "360"]], [/\b(qq)\/([\w\.]+)/i], [[c, /(.+)/, "$1Browser"], h], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[c, /(.+)/, "$1" + be], h], [/samsungbrowser\/([\w\.]+)/i], [h, [c, j + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [h, [c, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[c, "Sogou Mobile"], h], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [c, h], [/(lbbrowser|rekonq)/i, /\[(linkedin)app\]/i], [c], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [h, c], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[c, M], h], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(twitter)(?:and| f.+e\/([\w\.]+))/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [c, h], [/\bgsa\/([\w\.]+) .*safari\//i], [h, [c, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [h, [c, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [h, [c, I + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[c, I + " WebView"], h], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [h, [c, "Android " + w]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [c, h], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [h, [c, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [h, c], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [c, [h, me, { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }]], [/(webkit|khtml)\/([\w\.]+)/i], [c, h], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[c, "Netscape"], h], [/(wolvic|librewolf)\/([\w\.]+)/i], [c, h], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [h, [c, k + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [c, [h, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [c, [h, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[f, "amd64"]], [/(ia32(?=;))/i], [[f, pe]], [/((?:i[346]|x)86)[;\)]/i], [[f, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[f, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[f, "armhf"]], [/windows (ce|mobile); ppc;/i], [[f, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[f, /ower/, "", pe]], [/(sun4\w)[;\)]/i], [[f, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[f, pe]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [o, [d, j], [l, g]], [/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]((?!sm-[lr])[-\w]+)/i, /sec-(sgh\w+)/i], [o, [d, j], [l, b]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [o, [d, y], [l, b]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [o, [d, y], [l, g]], [/(macintosh);/i], [o, [d, y]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [o, [d, Q], [l, b]], [/(?:honor)([-\w ]+)[;\)]/i], [o, [d, "Honor"], [l, b]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [o, [d, D], [l, g]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [o, [d, D], [l, b]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i], [[o, /_/g, " "], [d, L], [l, b]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[o, /_/g, " "], [d, L], [l, g]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [o, [d, "OPPO"], [l, b]], [/\b(opd2\d{3}a?) bui/i], [o, [d, "OPPO"], [l, g]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [o, [d, "Vivo"], [l, b]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [o, [d, "Realme"], [l, b]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [o, [d, X], [l, b]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [o, [d, X], [l, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [o, [d, H], [l, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [o, [d, H], [l, b]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [o, [d, "Lenovo"], [l, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[o, /_/g, " "], [d, "Nokia"], [l, b]], [/(pixel c)\b/i], [o, [d, N], [l, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [o, [d, N], [l, b]], [/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [o, [d, te], [l, b]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[o, "Xperia Tablet"], [d, te], [l, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [o, [d, "OnePlus"], [l, b]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [o, [d, A], [l, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[o, /(.+)/g, "Fire Phone $1"], [d, A], [l, b]], [/(playbook);[-\w\),; ]+(rim)/i], [o, d, [l, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [o, [d, E], [l, b]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [o, [d, v], [l, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [o, [d, v], [l, b]], [/(nexus 9)/i], [o, [d, "HTC"], [l, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [d, [o, /_/g, " "], [l, b]], [/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i], [o, [d, "TCL"], [l, g]], [/(itel) ((\w+))/i], [[d, pe], o, [l, me, { tablet: ["p10001l", "w7001"], "*": "mobile" }]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [o, [d, "Acer"], [l, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [o, [d, "Meizu"], [l, b]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [o, [d, "Ulefone"], [l, b]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [o, [d, "Energizer"], [l, b]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [o, [d, "Cat"], [l, b]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [o, [d, "Smartfren"], [l, b]], [/droid.+; (a(?:015|06[35]|142p?))/i], [o, [d, "Nothing"], [l, b]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [d, o, [l, b]], [/(imo) (tab \w+)/i, /(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [d, o, [l, g]], [/(surface duo)/i], [o, [d, K], [l, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [o, [d, "Fairphone"], [l, b]], [/(u304aa)/i], [o, [d, "AT&T"], [l, b]], [/\bsie-(\w*)/i], [o, [d, "Siemens"], [l, b]], [/\b(rct\w+) b/i], [o, [d, "RCA"], [l, g]], [/\b(venue[\d ]{2,7}) b/i], [o, [d, "Dell"], [l, g]], [/\b(q(?:mv|ta)\w+) b/i], [o, [d, "Verizon"], [l, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [o, [d, "Barnes & Noble"], [l, g]], [/\b(tm\d{3}\w+) b/i], [o, [d, "NuVision"], [l, g]], [/\b(k88) b/i], [o, [d, "ZTE"], [l, g]], [/\b(nx\d{3}j) b/i], [o, [d, "ZTE"], [l, b]], [/\b(gen\d{3}) b.+49h/i], [o, [d, "Swiss"], [l, b]], [/\b(zur\d{3}) b/i], [o, [d, "Swiss"], [l, g]], [/\b((zeki)?tb.*\b) b/i], [o, [d, "Zeki"], [l, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[d, "Dragon Touch"], o, [l, g]], [/\b(ns-?\w{0,9}) b/i], [o, [d, "Insignia"], [l, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [o, [d, "NextBook"], [l, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[d, "Voice"], o, [l, b]], [/\b(lvtel\-)?(v1[12]) b/i], [[d, "LvTel"], o, [l, b]], [/\b(ph-1) /i], [o, [d, "Essential"], [l, b]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [o, [d, "Envizen"], [l, g]], [/\b(trio[-\w\. ]+) b/i], [o, [d, "MachSpeed"], [l, g]], [/\btu_(1491) b/i], [o, [d, "Rotor"], [l, g]], [/(shield[\w ]+) b/i], [o, [d, "Nvidia"], [l, g]], [/(sprint) (\w+)/i], [d, o, [l, b]], [/(kin\.[onetw]{3})/i], [[o, /\./g, " "], [d, K], [l, b]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [o, [d, O], [l, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [o, [d, O], [l, b]], [/smart-tv.+(samsung)/i], [d, [l, m]], [/hbbtv.+maple;(\d+)/i], [[o, /^/, "SmartTV"], [d, j], [l, m]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[d, H], [l, m]], [/(apple) ?tv/i], [d, [o, y + " TV"], [l, m]], [/crkey/i], [[o, I + "cast"], [d, N], [l, m]], [/droid.+aft(\w+)( bui|\))/i], [o, [d, A], [l, m]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [o, [d, Q], [l, m]], [/(bravia[\w ]+)( bui|\))/i], [o, [d, te], [l, m]], [/(mitv-\w{5}) bui/i], [o, [d, L], [l, m]], [/Hbbtv.*(technisat) (.*);/i], [d, o, [l, m]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[d, Me], [o, Me], [l, m]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[l, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [d, o, [l, u]], [/droid.+; (shield) bui/i], [o, [d, "Nvidia"], [l, u]], [/(playstation [345portablevi]+)/i], [o, [d, te], [l, u]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [o, [d, K], [l, u]], [/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i], [o, [d, j], [l, S]], [/((pebble))app/i], [d, o, [l, S]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [o, [d, y], [l, S]], [/droid.+; (glass) \d/i], [o, [d, N], [l, S]], [/droid.+; (wt63?0{2,3})\)/i], [o, [d, O], [l, S]], [/droid.+; (glass) \d/i], [o, [d, N], [l, S]], [/(pico) (4|neo3(?: link|pro)?)/i], [d, o, [l, S]], [/; (quest( \d| pro)?)/i], [o, [d, M], [l, S]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [d, [l, R]], [/(aeobc)\b/i], [o, [d, A], [l, R]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [o, [l, b]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [o, [l, g]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[l, g]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[l, b]], [/(android[-\w\. ]{0,9});.+buil/i], [o, [d, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [h, [c, "EdgeHTML"]], [/(arkweb)\/([\w\.]+)/i], [c, h], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [h, [c, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [c, h], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [h, c]], os: [[/microsoft (windows) (vista|xp)/i], [c, h], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [c, [h, me, Se]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[h, me, Se], [c, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[h, /_/g, "."], [c, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[c, de], [h, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [h, c], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [c, h], [/\(bb(10);/i], [h, [c, E]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [h, [c, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [h, [c, k + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [h, [c, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [h, [c, "watchOS"]], [/crkey\/([\d\.]+)/i], [h, [c, I + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[c, x], h], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [c, h], [/(sunos) ?([\w\.\d]*)/i], [[c, "Solaris"], h], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [c, h]] }, ie = function(oe, ne) {
|
|
2358
2358
|
if (typeof oe === i && (ne = oe, oe = s), !(this instanceof ie))
|
|
2359
2359
|
return new ie(oe, ne).getResult();
|
|
2360
2360
|
var Y = typeof a !== t && a.navigator ? a.navigator : s, ge = oe || (Y && Y.userAgent ? Y.userAgent : ""), Pe = Y && Y.userAgentData ? Y.userAgentData : s, se = ne ? function(G, Te) {
|
|
@@ -2400,7 +2400,7 @@ Yi = _r, Zi = _r.exports, function(a, s) {
|
|
|
2400
2400
|
};
|
|
2401
2401
|
}
|
|
2402
2402
|
}(typeof window == "object" ? window : Di);
|
|
2403
|
-
var Zo = _r.exports,
|
|
2403
|
+
var Zo = _r.exports, Ne = ((a) => (a.KEEPALIVE = "keepalive", a.JOINCHANNEL = "joinchannel", a.NOTIFYJOIN = "notifyjoin", a.NOTIFYSTATUS = "notifystatus", a.STATUSREPORT = "statusreport", a.LEAVECHANNEL = "leavechannel", a.NOTIFYLEAVE = "notifyleave", a.NOTIFYPUBLISH = "notifypublish", a.BYE = "bye", a.RECONNECT = "reconnect", a.PUBLISH = "publish", a.REFRESHURL = "refreshurl", a.UNSUBSCRIBE = "unsubscribe", a.ROLEUPDATE = "roleupdate", a))(Ne || {});
|
|
2404
2404
|
class ji {
|
|
2405
2405
|
constructor(s, e) {
|
|
2406
2406
|
p(this, "authInfo");
|
|
@@ -2417,7 +2417,7 @@ class ji {
|
|
|
2417
2417
|
static get adaptInfo() {
|
|
2418
2418
|
var e, t, i, r;
|
|
2419
2419
|
let s = new Zo.UAParser().getResult();
|
|
2420
|
-
return { os_name: ((e = s.os.name) == null ? void 0 : e.replace(" ", "")) + "_" + ((t = s.browser.name) == null ? void 0 : t.replace(" ", "")), device_name: ((i = s.device.model) == null ? void 0 : i.replace(" ", "")) || "", brand_name: ((r = s.device.vendor) == null ? void 0 : r.replace(" ", "")) || "", device_key: window.navigator.userAgent, os_version: s.browser.version || "", sdk_version: "7.2.
|
|
2420
|
+
return { os_name: ((e = s.os.name) == null ? void 0 : e.replace(" ", "")) + "_" + ((t = s.browser.name) == null ? void 0 : t.replace(" ", "")), device_name: ((i = s.device.model) == null ? void 0 : i.replace(" ", "")) || "", brand_name: ((r = s.device.vendor) == null ? void 0 : r.replace(" ", "")) || "", device_key: window.navigator.userAgent, os_version: s.browser.version || "", sdk_version: "7.2.7", version: "v1" };
|
|
2421
2421
|
}
|
|
2422
2422
|
refreshAuthInfo(s) {
|
|
2423
2423
|
this.authInfo = s;
|
|
@@ -2460,7 +2460,7 @@ class ji {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
createBaseSendPackage(s) {
|
|
2462
2462
|
var e;
|
|
2463
|
-
return ++this.seqIndex, { version: 1, msgtype: s, tid:
|
|
2463
|
+
return ++this.seqIndex, { version: 1, msgtype: s, tid: ct(), header: { appid: this.authInfo.appId, channelid: this.authInfo.channelId, sessionid: (e = this.authInfo.sessionId) != null ? e : "", userid: this.authInfo.userId }, data: { seq: this.seqIndex } };
|
|
2464
2464
|
}
|
|
2465
2465
|
}
|
|
2466
2466
|
const Sa = "ALI_RTC_SDK_ALLOCATE_RESULT", ai = class ai {
|
|
@@ -2474,7 +2474,7 @@ const Sa = "ALI_RTC_SDK_ALLOCATE_RESULT", ai = class ai {
|
|
|
2474
2474
|
let i = localStorage.getItem(Sa);
|
|
2475
2475
|
if (i) {
|
|
2476
2476
|
const r = JSON.parse(i);
|
|
2477
|
-
r.appId === e.appId && r.expireTs - 3e5 > Date.now() ? this.result = r.allocatedData :
|
|
2477
|
+
r.appId === e.appId && r.expireTs - 3e5 > Date.now() ? this.result = r.allocatedData : T.info(`[${ai.logName}]`, "allocate", "cached data is invalid");
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
2480
|
fetchAndUpdate() {
|
|
@@ -2488,10 +2488,10 @@ const Sa = "ALI_RTC_SDK_ALLOCATE_RESULT", ai = class ai {
|
|
|
2488
2488
|
const h = d.data;
|
|
2489
2489
|
this.result = h;
|
|
2490
2490
|
const { ice_ufrag: f } = h.h5auth, [u, b] = atob(f).split("_"), g = { appId: s, expireTs: 1e3 * parseInt(b), allocatedData: h };
|
|
2491
|
-
return
|
|
2491
|
+
return T.info(`[${ai.logName}]`, "got allocate result and save", h.h5auth.ice_ufrag), localStorage.setItem(Sa, JSON.stringify(g)), h;
|
|
2492
2492
|
}
|
|
2493
2493
|
return null;
|
|
2494
|
-
}).catch((d) => (
|
|
2494
|
+
}).catch((d) => (T.error(`[${ai.logName}]`, "allocate", d), null)), this.pms;
|
|
2495
2495
|
}
|
|
2496
2496
|
};
|
|
2497
2497
|
p(ai, "logName", "Allocator");
|
|
@@ -3441,16 +3441,16 @@ function oc() {
|
|
|
3441
3441
|
} });
|
|
3442
3442
|
}, nr;
|
|
3443
3443
|
}
|
|
3444
|
-
var Ma, cr,
|
|
3444
|
+
var Ma, cr, Na, lr, La, xa, Oa, dr, Va, Ua, Ba, Ha, Fa, hr, ja, $a, Wa, za = {};
|
|
3445
3445
|
function Tr() {
|
|
3446
3446
|
return Ma || (Ma = 1, za.TIMING_KEYS = ["startTime", "fetchStart", "domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd", "requestStart", "responseStart", "responseEnd", "", "domInteractive", "", "domContentLoadedEventEnd", "", "loadEventStart", "", "msFirstPaint", "secureConnectionStart", "redirectStart", "redirectEnd"]), za;
|
|
3447
3447
|
}
|
|
3448
3448
|
function cc() {
|
|
3449
3449
|
return Oa || (Oa = 1, xa = function(a, s, e) {
|
|
3450
3450
|
var t = Ye(), i = function() {
|
|
3451
|
-
if (
|
|
3451
|
+
if (Na)
|
|
3452
3452
|
return cr;
|
|
3453
|
-
|
|
3453
|
+
Na = 1;
|
|
3454
3454
|
var g = Ye(), m = Tr().TIMING_KEYS;
|
|
3455
3455
|
return cr = function() {
|
|
3456
3456
|
var S = g.win || {}, R = S.performance;
|
|
@@ -3462,17 +3462,17 @@ function cc() {
|
|
|
3462
3462
|
E && (y = E);
|
|
3463
3463
|
}
|
|
3464
3464
|
return g.each({ dom: [10, 8], load: [14, 1] }, function(w, I) {
|
|
3465
|
-
var k = y[m[w[1]]],
|
|
3466
|
-
if (k > 0 &&
|
|
3467
|
-
var D = Math.round(
|
|
3465
|
+
var k = y[m[w[1]]], N = y[m[w[0]]];
|
|
3466
|
+
if (k > 0 && N > 0) {
|
|
3467
|
+
var D = Math.round(N - k);
|
|
3468
3468
|
D >= 0 && D < 6e5 && (A[I] = D);
|
|
3469
3469
|
}
|
|
3470
3470
|
}), A.res = JSON.stringify(v), A;
|
|
3471
3471
|
}, cr;
|
|
3472
3472
|
}(), r = function() {
|
|
3473
|
-
if (
|
|
3473
|
+
if (La)
|
|
3474
3474
|
return lr;
|
|
3475
|
-
|
|
3475
|
+
La = 1;
|
|
3476
3476
|
var g = Ye(), m = Tr().TIMING_KEYS;
|
|
3477
3477
|
return lr = function() {
|
|
3478
3478
|
var S = g.win || {}, R = S.performance;
|
|
@@ -3492,8 +3492,8 @@ function cc() {
|
|
|
3492
3492
|
});
|
|
3493
3493
|
var I = S.navigator.connection, k = R.navigation || {};
|
|
3494
3494
|
A.ct = I ? I.effectiveType || I.type : "";
|
|
3495
|
-
var
|
|
3496
|
-
if ((
|
|
3495
|
+
var N = I && (I.downlink || I.downlinkMax || I.bandwidth) || null;
|
|
3496
|
+
if ((N = N > 999 ? 999 : N) && (A.bandwidth = N), A.navtype = k.type === 1 ? "Reload" : "Other", E === 1 && y[m[16]] > 0 && y[m[1]] > 0) {
|
|
3497
3497
|
var D = y[m[16]] - y[m[1]];
|
|
3498
3498
|
D >= 0 && D < 36e5 && (A.fpt = D);
|
|
3499
3499
|
}
|
|
@@ -3752,17 +3752,17 @@ function dc() {
|
|
|
3752
3752
|
var k = w[I];
|
|
3753
3753
|
b[k] && (E[k] = b[k]);
|
|
3754
3754
|
}
|
|
3755
|
-
var
|
|
3756
|
-
return c.ignoreByRule(E.msg,
|
|
3755
|
+
var N = (this.getConfig("ignore") || {}).ignoreErrors;
|
|
3756
|
+
return c.ignoreByRule(E.msg, N) || c.ignoreByRule(c.decode(E.msg), N) ? this : (this.beforeSend && this.beforeSend("error", E), this._lg("error", E, 1));
|
|
3757
3757
|
}, behavior: function(u) {
|
|
3758
3758
|
if (u) {
|
|
3759
3759
|
var b = typeof u == "object" && u.behavior ? u : { behavior: u };
|
|
3760
3760
|
return this.beforeSend && this.beforeSend("behavior", b), this._lg("behavior", b, 1);
|
|
3761
3761
|
}
|
|
3762
|
-
}, api: function(u, b, g, m, S, R, A, y, v, E, w, I, k,
|
|
3762
|
+
}, api: function(u, b, g, m, S, R, A, y, v, E, w, I, k, N, D, H) {
|
|
3763
3763
|
if (!u)
|
|
3764
3764
|
return c.warn("[retcode] api is null"), this;
|
|
3765
|
-
if (u = typeof u == "string" ? { api: u, success: b, time: g, code: m, msg: S, begin: R, traceId: A, pv_id: y, apiSnapshot: v, domain: E, flag: I, tag: k, c1:
|
|
3765
|
+
if (u = typeof u == "string" ? { api: u, success: b, time: g, code: m, msg: S, begin: R, traceId: A, pv_id: y, apiSnapshot: v, domain: E, flag: I, tag: k, c1: N, c2: D, c3: H } : c.sub(u, d), !c.checkAPI(u.api, !0))
|
|
3766
3766
|
return this;
|
|
3767
3767
|
u.code = u.code || "";
|
|
3768
3768
|
var K = u.msg || "";
|
|
@@ -3919,12 +3919,12 @@ function dc() {
|
|
|
3919
3919
|
var l = this.__proto__.constructor(c);
|
|
3920
3920
|
return c.page && l.sendPV(), l;
|
|
3921
3921
|
} }), oc()(o, i), cc()(o, i, r), lc()(o, i, r), (Ba || (Ba = 1, Ua = function(c, l) {
|
|
3922
|
-
var d = Ye(), h = null, f = d.getCurDomain(), u = function(R, A, y, v, E, w, I, k,
|
|
3922
|
+
var d = Ye(), h = null, f = d.getCurDomain(), u = function(R, A, y, v, E, w, I, k, N, D, H, K, X) {
|
|
3923
3923
|
var z = d.J(E) || null, j = d.safetyCall(A, [z, v], null);
|
|
3924
3924
|
if (!j)
|
|
3925
3925
|
return !1;
|
|
3926
3926
|
var Q = j.code || w, te = !("success" in j) || j.success;
|
|
3927
|
-
R.api(y, te, I, Q, j.msg, k,
|
|
3927
|
+
R.api(y, te, I, Q, j.msg, k, N, D, te ? {} : H, f, K, X);
|
|
3928
3928
|
}, b = "fetch", g = "__oFetch_", m = "__oXMLHttpRequest_", S = "XMLHttpRequest";
|
|
3929
3929
|
return d.ext(c.prototype, { removeHook: function(R, A) {
|
|
3930
3930
|
return h && (A || this === h) ? (l[g] && (l[b] = l[g], delete l[g]), l[m] && (l[S] = l[m], delete l[m]), h = null, this) : this;
|
|
@@ -3937,13 +3937,13 @@ function dc() {
|
|
|
3937
3937
|
if (!w || !w.api || v && (v.method === "HEAD" || v.mode === "no-cors"))
|
|
3938
3938
|
return A.apply(l, E);
|
|
3939
3939
|
v || (v = {});
|
|
3940
|
-
var I = Date.now(), k = w._conf,
|
|
3940
|
+
var I = Date.now(), k = w._conf, N = d.duration(), D = (y && typeof y != "string" ? y.url : y) || "", H = D;
|
|
3941
3941
|
D = d.cutUrlSearch(D);
|
|
3942
3942
|
var K = (k.ignore || {}).ignoreApis, X = k.parseTraceId;
|
|
3943
3943
|
if (!d.checkAPI(D, !0) || d.ignoreByRule(D, K))
|
|
3944
3944
|
return A.apply(l, E);
|
|
3945
3945
|
D = d.filterByRule(D, H, k.ignoreApiPath ? k.ignoreApiPath : k.apiHelper);
|
|
3946
|
-
var z = k.enableLinkTrace, j = "", Q = "", te = w.getConfig("pid"),
|
|
3946
|
+
var z = k.enableLinkTrace, j = "", Q = "", te = w.getConfig("pid"), L = null, O = w.getConfig("sample"), M = w.getConfig("linkType"), x = 1;
|
|
3947
3947
|
if (O && !w.sampling(O) && (x = 0), z) {
|
|
3948
3948
|
var de = "";
|
|
3949
3949
|
try {
|
|
@@ -4016,17 +4016,17 @@ function dc() {
|
|
|
4016
4016
|
return ie;
|
|
4017
4017
|
if (!j) {
|
|
4018
4018
|
var ne = d.parseFetchHeaders(De);
|
|
4019
|
-
typeof ne == "object" && ne["eagleeye-traceid"] && (j = ne["eagleeye-traceid"],
|
|
4019
|
+
typeof ne == "object" && ne["eagleeye-traceid"] && (j = ne["eagleeye-traceid"], L = "response");
|
|
4020
4020
|
}
|
|
4021
4021
|
}
|
|
4022
|
-
var Y =
|
|
4022
|
+
var Y = N();
|
|
4023
4023
|
return Ae.text().then(function(ge) {
|
|
4024
4024
|
if (!j && d.isFunction(X)) {
|
|
4025
4025
|
var Pe = X(Ae, ge);
|
|
4026
4026
|
Pe && d.isString(Pe) && (j = Pe);
|
|
4027
4027
|
}
|
|
4028
4028
|
var se = d.getFetchSnapshot(E, ge, De);
|
|
4029
|
-
Ae.ok ? u(w, k.parseResponse, D, H, ge, Ae.status || 200, Y, I, j, Q, se,
|
|
4029
|
+
Ae.ok ? u(w, k.parseResponse, D, H, ge, Ae.status || 200, Y, I, j, Q, se, L, x) : (w.api(D, !1, Y, Ae.status || 404, Ae.statusText, I, j, Q, se, f, L, x), k.enableResource && h.fixResourceStatus && h.fixResourceStatus({ src: Ae.url, res_type: "api" }));
|
|
4030
4030
|
}), ie;
|
|
4031
4031
|
} catch (ge) {
|
|
4032
4032
|
return d.warn("[ARMS] fetch response error :", ge), ie;
|
|
@@ -4034,7 +4034,7 @@ function dc() {
|
|
|
4034
4034
|
}).catch(function(ie) {
|
|
4035
4035
|
if (!w || !w.api)
|
|
4036
4036
|
throw ie;
|
|
4037
|
-
var Ae =
|
|
4037
|
+
var Ae = N();
|
|
4038
4038
|
throw w.api(D, !1, Ae, ie.name || "Error", ie.message, I, j, Q, {}, f), k.enableResource && h.fixResourceStatus && h.fixResourceStatus({ src: H, res_type: "api" }), ie;
|
|
4039
4039
|
});
|
|
4040
4040
|
}, l[b].toString = d.createFakeToString(b);
|
|
@@ -4047,13 +4047,13 @@ function dc() {
|
|
|
4047
4047
|
var w = new y(E), I = h;
|
|
4048
4048
|
if (!I || !I.api || !w.addEventListener)
|
|
4049
4049
|
return w;
|
|
4050
|
-
var k,
|
|
4050
|
+
var k, N, D, H, K = w.send, X = w.open, z = w.setRequestHeader, j = I._conf, Q = (j.ignore || {}).ignoreApis, te = j.parseTraceId, L = I.getConfig("enableLinkTrace"), O = "", M = "", x = "", de = null, be = I.getConfig("sample"), Re = I.getConfig("linkType"), q = 1;
|
|
4051
4051
|
return be && !I.sampling(be) && (q = 0), w.open = function(pe, Me) {
|
|
4052
4052
|
A = pe;
|
|
4053
4053
|
var ve = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
4054
4054
|
X.apply(w, ve), H = Me || "", D = d.cutUrlSearch(H);
|
|
4055
4055
|
var me = !d.checkAPI(D, !0) || d.ignoreByRule(D, Q);
|
|
4056
|
-
if (D = D ? d.filterByRule(D, H, j.ignoreApiPath ? j.ignoreApiPath : j.apiHelper) : "", !me &&
|
|
4056
|
+
if (D = D ? d.filterByRule(D, H, j.ignoreApiPath ? j.ignoreApiPath : j.apiHelper) : "", !me && L) {
|
|
4057
4057
|
var Se = "";
|
|
4058
4058
|
try {
|
|
4059
4059
|
Se = location.origin ? location.origin : location.protocol + "//" + location.hostname + (location.port ? ":" + location.port : "");
|
|
@@ -4076,12 +4076,12 @@ function dc() {
|
|
|
4076
4076
|
}
|
|
4077
4077
|
}
|
|
4078
4078
|
}, w.send = function() {
|
|
4079
|
-
k = Date.now(),
|
|
4079
|
+
k = Date.now(), N = d.duration();
|
|
4080
4080
|
var pe = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
4081
4081
|
K.apply(w, pe);
|
|
4082
4082
|
}, d.on(w, "readystatechange", function() {
|
|
4083
4083
|
if (D && w.readyState === 4) {
|
|
4084
|
-
var pe =
|
|
4084
|
+
var pe = N(), Me = d.getXhrSnapshot(H, A, w);
|
|
4085
4085
|
if (!O) {
|
|
4086
4086
|
var ve = d.parseXhrHeaders(typeof w.getAllResponseHeaders == "function" && w.getAllResponseHeaders() || "");
|
|
4087
4087
|
typeof ve == "object" && ve["eagleeye-traceid"] && (O = ve["eagleeye-traceid"], de = "response");
|
|
@@ -4122,8 +4122,8 @@ function dc() {
|
|
|
4122
4122
|
if (!A || typeof A != "string" || A === v)
|
|
4123
4123
|
return E;
|
|
4124
4124
|
try {
|
|
4125
|
-
var w = v.split("#"), I = A.split("#"), k = d.cutUrlSearch(w[0]),
|
|
4126
|
-
D !== H ? u("historystatechange", H) : k !==
|
|
4125
|
+
var w = v.split("#"), I = A.split("#"), k = d.cutUrlSearch(w[0]), N = d.cutUrlSearch(I[0]), D = w[1] && w[1].replace(/^\/?(.*)/, "$1"), H = I[1] && I[1].replace(/^\/?(.*)/, "$1");
|
|
4126
|
+
D !== H ? u("historystatechange", H) : k !== N && u("historystatechange", N);
|
|
4127
4127
|
} catch (K) {
|
|
4128
4128
|
d.warn("[retcode] error in " + g + ": " + K);
|
|
4129
4129
|
}
|
|
@@ -4143,8 +4143,8 @@ function dc() {
|
|
|
4143
4143
|
if (g instanceof h.PerformanceResourceTiming && g.initiatorType) {
|
|
4144
4144
|
var R = c.getResType(g.initiatorType, g.name), A = m.resourceTypes || [], y = (m.ignore || {}).ignoreResources;
|
|
4145
4145
|
if (R && A.includes(R) && !c.ignoreByRule(g.name, y) && !c.ignoreByRule(c.decode(g.name), y)) {
|
|
4146
|
-
var v = g[l[0]], E = g[l[1]], w = g[l[2]], I = g[l[3]], k = g[l[4]],
|
|
4147
|
-
if (!S.has(g) && (!c.areInOrder(v, E, w, I, k,
|
|
4146
|
+
var v = g[l[0]], E = g[l[1]], w = g[l[2]], I = g[l[3]], k = g[l[4]], N = g[l[5]], D = g[l[6]], H = g[l[7]], K = g[l[8]], X = g[l[18]], z = g[l[19]];
|
|
4147
|
+
if (!S.has(g) && (!c.areInOrder(v, E, w, I, k, N, D, H, K) || v > H))
|
|
4148
4148
|
return;
|
|
4149
4149
|
if (X < v && (X = v), z < v && (z = E), c.areInOrder(v, X, z, E))
|
|
4150
4150
|
return { domain: c.getURL(g.name).domain, res_type: R, src_type: c.getSrcType(g.name, m.cdnHostList), success: 1, size: Math.round(g.decodedBodySize), duration: Math.round(g.duration), timeStamp: g.responseEnd, timing: g };
|
|
@@ -4201,16 +4201,16 @@ function dc() {
|
|
|
4201
4201
|
var A = [];
|
|
4202
4202
|
c.each(R, function(w) {
|
|
4203
4203
|
var I = g[w], k = { domain: "", res_type: "", src_type: "", size: 0, duration: 0, count: 0, err_count: 0, err_duration: 0, slow_count: 0, slow_duration: 0, timings: [] };
|
|
4204
|
-
c.each(I, function(
|
|
4205
|
-
var D =
|
|
4206
|
-
k.domain =
|
|
4204
|
+
c.each(I, function(N) {
|
|
4205
|
+
var D = N.timing || {}, H = S.get(N.timing), K = H ? H.success : 1, X = N.duration > m ? 1 : 0;
|
|
4206
|
+
k.domain = N.domain, k.res_type = N.res_type, k.src_type = N.src_type, k.count += 1, k.duration += N.duration, k.size += N.size, K || (k.err_count += 1, k.err_duration += N.duration), X && (k.slow_count += 1, k.slow_duration += N.duration);
|
|
4207
4207
|
try {
|
|
4208
4208
|
var z = JSON.parse(JSON.stringify(D));
|
|
4209
4209
|
z.success = K, z.resourceSlow = m, z.isSlow = X, k.timings.push(z);
|
|
4210
4210
|
} catch (j) {
|
|
4211
4211
|
}
|
|
4212
|
-
}), k.count && (k.size = Math.round(k.size / k.count), k.duration = Math.round(k.duration / k.count)), k.slow_count && (k.slow_duration = Math.round(k.slow_duration / k.slow_count)), k.err_count && (k.err_duration = Math.round(k.err_duration / k.err_count)), k.timings.length > 20 && (k.timings.sort(function(
|
|
4213
|
-
return D.duration -
|
|
4212
|
+
}), k.count && (k.size = Math.round(k.size / k.count), k.duration = Math.round(k.duration / k.count)), k.slow_count && (k.slow_duration = Math.round(k.slow_duration / k.slow_count)), k.err_count && (k.err_duration = Math.round(k.err_duration / k.err_count)), k.timings.length > 20 && (k.timings.sort(function(N, D) {
|
|
4213
|
+
return D.duration - N.duration;
|
|
4214
4214
|
}), k.timings.length = 20), k.timings = encodeURIComponent(JSON.stringify(k.timings)), A.push(k);
|
|
4215
4215
|
});
|
|
4216
4216
|
var y = { _combo: 1, resource: JSON.stringify(A) }, v = h.navigator.connection;
|
|
@@ -4268,7 +4268,7 @@ function Rn(a, s) {
|
|
|
4268
4268
|
`);
|
|
4269
4269
|
return t < 0 || e < t;
|
|
4270
4270
|
}
|
|
4271
|
-
function
|
|
4271
|
+
function Et(a, s, e) {
|
|
4272
4272
|
return typeof a == "function" ? function(t, i, r) {
|
|
4273
4273
|
if (Reflect.get(t, "__v_skip") === !0)
|
|
4274
4274
|
return t;
|
|
@@ -4279,10 +4279,10 @@ function _t(a, s, e) {
|
|
|
4279
4279
|
} catch (h) {
|
|
4280
4280
|
throw r(h), h;
|
|
4281
4281
|
}
|
|
4282
|
-
return
|
|
4282
|
+
return Et(d, i, r);
|
|
4283
4283
|
}, MediaboxWrapperFunctionGet(o, c) {
|
|
4284
4284
|
const l = Object.getOwnPropertyDescriptor(o, c);
|
|
4285
|
-
return !l || l.writable || l.configurable ?
|
|
4285
|
+
return !l || l.writable || l.configurable ? Et(o[c], i, r) : o[c];
|
|
4286
4286
|
}, MediaboxWrapperClassConstructor(o, c) {
|
|
4287
4287
|
let l;
|
|
4288
4288
|
try {
|
|
@@ -4290,11 +4290,11 @@ function _t(a, s, e) {
|
|
|
4290
4290
|
} catch (d) {
|
|
4291
4291
|
throw r(d), d;
|
|
4292
4292
|
}
|
|
4293
|
-
return
|
|
4293
|
+
return Et(l, i, r);
|
|
4294
4294
|
} };
|
|
4295
4295
|
return Object.defineProperty(t, "__v_skip", { configurable: !0, enumerable: !1, writable: !1, value: !0 }), new Proxy(t, { apply: n.MediaboxWrapperFunctionApply, get: n.MediaboxWrapperFunctionGet, construct: n.MediaboxWrapperClassConstructor });
|
|
4296
|
-
}(a, s + 1, e) : a instanceof Promise ? a.then((t) =>
|
|
4297
|
-
a[i] =
|
|
4296
|
+
}(a, s + 1, e) : a instanceof Promise ? a.then((t) => Et(t, s + 1, e)).catch((t) => (e(t), Promise.reject(t))) : Array.isArray(a) ? (a.forEach((t, i) => {
|
|
4297
|
+
a[i] = Et(t, s + 1, e);
|
|
4298
4298
|
}), a) : ((t) => t !== null && typeof t == "object")(a) && uc(a) ? function(t, i, r) {
|
|
4299
4299
|
var n;
|
|
4300
4300
|
if (Reflect.get(t, "__v_skip") === !0)
|
|
@@ -4310,13 +4310,13 @@ function _t(a, s, e) {
|
|
|
4310
4310
|
} catch (b) {
|
|
4311
4311
|
throw r(b), b;
|
|
4312
4312
|
}
|
|
4313
|
-
return
|
|
4313
|
+
return Et(u, i, r);
|
|
4314
4314
|
}
|
|
4315
4315
|
if (i > 10)
|
|
4316
4316
|
return d[h];
|
|
4317
4317
|
const f = Reflect.getOwnPropertyDescriptor(d, h);
|
|
4318
|
-
return !f || f.writable || f.configurable ?
|
|
4319
|
-
}, MediaboxWrapperObjectSetter: (d, h, f) => (d[h] =
|
|
4318
|
+
return !f || f.writable || f.configurable ? Et(d[h], i, r) : d[h];
|
|
4319
|
+
}, MediaboxWrapperObjectSetter: (d, h, f) => (d[h] = Et(f, i, r), !0) };
|
|
4320
4320
|
return Object.defineProperty(t, "__v_skip", { configurable: !0, enumerable: !1, writable: !1, value: !0 }), new Proxy(t, { get: l.MediaboxWrapperObjectGetter, set: l.MediaboxWrapperObjectSetter });
|
|
4321
4321
|
}(a, s + 1, e) : a;
|
|
4322
4322
|
}
|
|
@@ -4382,7 +4382,7 @@ class Br {
|
|
|
4382
4382
|
} });
|
|
4383
4383
|
}
|
|
4384
4384
|
wrap(s) {
|
|
4385
|
-
return this.options.disabled || typeof Proxy == "undefined" ? s :
|
|
4385
|
+
return this.options.disabled || typeof Proxy == "undefined" ? s : Et(s, 0, (e) => {
|
|
4386
4386
|
var t;
|
|
4387
4387
|
e instanceof Error && typeof e.stack == "string" && pr(e.stack) && ((t = this.armsLogger) == null || t.error(e), e.stack = Ya(e.stack, this.marker));
|
|
4388
4388
|
});
|
|
@@ -4559,7 +4559,7 @@ class wn {
|
|
|
4559
4559
|
return { micOpen: !!(1 & e), micInterrupted: !!(2 & e), cameraOpen: !!(4 & e), screenShare: !!(128 & e), audioDisable: !!(8 & e), videoDisable: !!(16 & e), screenDisable: !!(256 & e), backgroundMode: !!(32 & e), accompanyPlaying: !!(64 & e) };
|
|
4560
4560
|
}
|
|
4561
4561
|
}
|
|
4562
|
-
const
|
|
4562
|
+
const C = (a, s) => (e, t, i) => {
|
|
4563
4563
|
const r = i.value;
|
|
4564
4564
|
return i.value = function(...n) {
|
|
4565
4565
|
var h;
|
|
@@ -4570,7 +4570,7 @@ const T = (a, s) => (e, t, i) => {
|
|
|
4570
4570
|
l = a(n);
|
|
4571
4571
|
} catch (f) {
|
|
4572
4572
|
}
|
|
4573
|
-
|
|
4573
|
+
T.interface(o, t, ...l);
|
|
4574
4574
|
const d = r.apply(this, n);
|
|
4575
4575
|
return Promise.resolve(d).then((f) => f).catch((f) => f).then((f) => {
|
|
4576
4576
|
var m;
|
|
@@ -4592,7 +4592,7 @@ const T = (a, s) => (e, t, i) => {
|
|
|
4592
4592
|
} catch (S) {
|
|
4593
4593
|
}
|
|
4594
4594
|
}
|
|
4595
|
-
|
|
4595
|
+
T.interfaceResult(o, t, !(b && g), Date.now() - c + "ms", u);
|
|
4596
4596
|
}
|
|
4597
4597
|
}), d;
|
|
4598
4598
|
}, i;
|
|
@@ -4601,7 +4601,7 @@ var ui = ((a) => (a[a.ERROR_DEVICE_UNKNOWNERROR = 1e4] = "ERROR_DEVICE_UNKNOWNER
|
|
|
4601
4601
|
const gc = { 1e4: Be.AliEngineLocalDeviceExceptionTypeUnknown, 2e4: Be.AliEngineLocalDeviceExceptionTypeUnknown, 10001: Be.AliEngineLocalDeviceExceptionTypeMicNotAvailable, 10002: Be.AliEngineLocalDeviceExceptionTypeMicAuthFail, 10003: Be.AliEngineLocalDeviceExceptionTypeMicOpenFail, 10005: Be.AliEngineLocalDeviceExceptionTypeCameraAuthFail, 10004: Be.AliEngineLocalDeviceExceptionTypeVideoDeviceException, 10006: Be.AliEngineLocalDeviceExceptionTypeCameraOpenFail, 10010: Be.AliEngineLocalDeviceExceptionTypeDisplayException, 10011: Be.AliEngineLocalDeviceExceptionTypeDisplayException, 10012: Be.AliEngineLocalDeviceExceptionTypeDisplayException, 10013: Be.AliEngineLocalDeviceExceptionTypeDisplayException, 10014: Be.AliEngineLocalDeviceExceptionTypeDisplayException, 10019: Be.AliEngineLocalDeviceExceptionTypeDisplayException };
|
|
4602
4602
|
var qe = ((a) => (a.CREATE_ENGINE = "create_engine", a.JOIN = "join", a.WANT_INSERT_PUB_TASK = "wantInsertPubTask", a.INSERT_PUB_TASK = "InsertPubTask", a.HANDLE_PUB_TASK = "HandlePubTask", a.RECV_NOTIFY_PUBLISH = "RecvNotifyPublish", a.INSERT_SUB_TASK = "InsertSubTask", a.HANDLE_SUB_TASK = "HandleSubTask", a.FIRST_REMOTE = "first_remote", a))(qe || {}), et = ((a) => (a.START = "start", a.SEND_SIG = "send_sig", a.RECV_RST = "recv_rst", a.END = "end", a.RECEIVED = "received", a.DECODED = "decoded", a.PLAYED = "played", a))(et || {});
|
|
4603
4603
|
const In = (a, s, e = !1) => {
|
|
4604
|
-
const t = () => (a.muted = !0, Promise.race([
|
|
4604
|
+
const t = () => (a.muted = !0, Promise.race([Ct(500), a._playPromise || Promise.resolve()]).catch(() => {
|
|
4605
4605
|
}).then(() => {
|
|
4606
4606
|
let i;
|
|
4607
4607
|
return e && a.srcObject === s ? i = Promise.resolve() : (a.load(), a.srcObject = s, i = a.play(), a._playPromise = i), i;
|
|
@@ -4624,7 +4624,7 @@ const In = (a, s, e = !1) => {
|
|
|
4624
4624
|
}, 0);
|
|
4625
4625
|
});
|
|
4626
4626
|
}, yt = (a) => {
|
|
4627
|
-
Promise.race([
|
|
4627
|
+
Promise.race([Ct(100), a._playPromise || Promise.resolve()]).catch(() => {
|
|
4628
4628
|
}).then(() => {
|
|
4629
4629
|
a.srcObject = null, a._playPromise = void 0;
|
|
4630
4630
|
});
|
|
@@ -4804,8 +4804,8 @@ class di extends je {
|
|
|
4804
4804
|
this._state = e, this.time = Date.now(), this.emit("change", t, e, Math.floor((this.time - i) / 1e3));
|
|
4805
4805
|
}
|
|
4806
4806
|
}
|
|
4807
|
-
var
|
|
4808
|
-
const we = (
|
|
4807
|
+
var ot;
|
|
4808
|
+
const we = (ot = class extends An {
|
|
4809
4809
|
constructor(e) {
|
|
4810
4810
|
const { rtsManager: t, localStreamManager: i, slsReporter: r, signalingManager: n, audioVolumeIndicationInterval: o, parameter: c } = e;
|
|
4811
4811
|
super("", "", t, o);
|
|
@@ -4819,7 +4819,7 @@ const we = (gt = class extends An {
|
|
|
4819
4819
|
p(this, "streamManager");
|
|
4820
4820
|
p(this, "dc");
|
|
4821
4821
|
p(this, "streamTracks");
|
|
4822
|
-
p(this, "publishId",
|
|
4822
|
+
p(this, "publishId", ct());
|
|
4823
4823
|
p(this, "signalingManager");
|
|
4824
4824
|
p(this, "shouldPublish", !1);
|
|
4825
4825
|
p(this, "monitorTimerId");
|
|
@@ -4981,19 +4981,19 @@ const we = (gt = class extends An {
|
|
|
4981
4981
|
this.streamManager.setMicAudioConstraints(e);
|
|
4982
4982
|
}
|
|
4983
4983
|
updatePubId() {
|
|
4984
|
-
this.publishId =
|
|
4984
|
+
this.publishId = ct();
|
|
4985
4985
|
}
|
|
4986
4986
|
clearPublishState() {
|
|
4987
4987
|
this.streamTracks = void 0;
|
|
4988
4988
|
}
|
|
4989
4989
|
leave() {
|
|
4990
4990
|
return _(this, null, function* () {
|
|
4991
|
-
this.shouldPublish = !1, this.isPublishing && (yield this.unPublish()), this.joinTime = 0, this.dc = void 0;
|
|
4991
|
+
this.shouldPublish = !1, this.isPublishing && (yield this.unPublish()), this.joinTime = 0, this.dc = void 0, this.dataPubState.setState(Z.AliRtcStateNoPublish);
|
|
4992
4992
|
});
|
|
4993
4993
|
}
|
|
4994
4994
|
clear() {
|
|
4995
4995
|
return _(this, null, function* () {
|
|
4996
|
-
Ji(
|
|
4996
|
+
Ji(ot.prototype, this, "clear").call(this), this.stopPreview(), this.resetPreviewElements(), this.resetSecondayPreviewElements(), this.clearStream(), yield this.leave(), this.streamManager.cameraCaptureDisabled = !1;
|
|
4997
4997
|
});
|
|
4998
4998
|
}
|
|
4999
4999
|
resetElement(e) {
|
|
@@ -5057,7 +5057,7 @@ const we = (gt = class extends An {
|
|
|
5057
5057
|
let r = i ? this.streamManager.screenStreamInfo.previewStream : this.streamManager.cameraStreamInfo.previewStream;
|
|
5058
5058
|
if (!t)
|
|
5059
5059
|
throw new V(U.ERR_INVALID_ARGUMENTS, "no video element found", { videoElement: t });
|
|
5060
|
-
return r ? (In(t, r.mediaStream), this.setPreviewElement(e), r.mediaStream) : void
|
|
5060
|
+
return r ? (In(t, r.mediaStream), this.setPreviewElement(e), r.mediaStream) : void T.info(`[${ot.logName}]`, "preview no stream founded");
|
|
5061
5061
|
} catch (r) {
|
|
5062
5062
|
const n = U.ERR_INNER;
|
|
5063
5063
|
throw V.fromError(r, n, "preview failed");
|
|
@@ -5118,7 +5118,7 @@ const we = (gt = class extends An {
|
|
|
5118
5118
|
return t != null && t.audioTrack && this.audioVolumeIndicationInterval > 0 && this.audioLevelMonitor.start(t.audioTrack, this.audioVolumeIndicationInterval), e.video ? this.previewAll({ primary: !0 }) : e.screen && this.previewAll({ screen: !0 }), t;
|
|
5119
5119
|
} catch (t) {
|
|
5120
5120
|
const i = gc[t.errorCode];
|
|
5121
|
-
throw i && (e.audio ? this.emit("localDeviceException",
|
|
5121
|
+
throw i && (e.audio ? this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeMic, i, "") : e.video ? this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeCamera, i, "") : e.screen ? this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeDisplay, i, "") : this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeUnknown, i, "")), t;
|
|
5122
5122
|
}
|
|
5123
5123
|
});
|
|
5124
5124
|
}
|
|
@@ -5166,33 +5166,47 @@ const we = (gt = class extends An {
|
|
|
5166
5166
|
const e = yield this.rtsManager.publishAddDataChannel(this.url);
|
|
5167
5167
|
e ? (this.updateDataChannel(e), this.dataPubState.setState(Z.AliRtcStatePublished)) : (this.dataPubState.setState(Z.AliRtcStateNoPublish), this.emit("publishDataError", new V(U.ERR_INNER, "publishDataError")));
|
|
5168
5168
|
} catch (e) {
|
|
5169
|
-
|
|
5169
|
+
T.error("[LocalUser]", "publishDataChannel error", e), this.dataPubState.setState(Z.AliRtcStateNoPublish);
|
|
5170
5170
|
}
|
|
5171
5171
|
}
|
|
5172
5172
|
});
|
|
5173
5173
|
}
|
|
5174
5174
|
startPublish() {
|
|
5175
5175
|
return _(this, arguments, function* (e = !1, t = Rt.MANUAL) {
|
|
5176
|
-
var l;
|
|
5176
|
+
var l, d, h;
|
|
5177
5177
|
if (!this.joined)
|
|
5178
5178
|
return;
|
|
5179
5179
|
this.shouldPublish = !0;
|
|
5180
5180
|
const i = this.streamManager.publishStreams, { audio: r, video: n, videoSmall: o, screen: c } = i;
|
|
5181
5181
|
if (r || n || o || c)
|
|
5182
5182
|
try {
|
|
5183
|
-
const
|
|
5183
|
+
const f = (/* @__PURE__ */ new Date()).getTime();
|
|
5184
5184
|
r && this.audioPubState.setState(Z.AliRtcStatePublishing), n && this.videoPubState.setState(Z.AliRtcStatePublishing), o && this.videoSmallPubState.setState(Z.AliRtcStatePublishing), c && this.screenPubState.setState(Z.AliRtcStatePublishing), this.publishPromise = this.rtsManager.publish(this, e, t);
|
|
5185
|
-
const { traceId:
|
|
5186
|
-
this.streamTracks = this.rtsManager.publishingTracks, this.traceId =
|
|
5187
|
-
const
|
|
5185
|
+
const { traceId: u, l1ip: b } = yield this.publishPromise;
|
|
5186
|
+
this.streamTracks = this.rtsManager.publishingTracks, this.traceId = u;
|
|
5187
|
+
const g = { type: _t.Add, userid: this.userId, sessionid: this.sessionId, displayname: this.name, pubid: this.publishId, resume: e, subscribe: { signal: "", pullstreamurl: this.url }, l1ip: this.parameter.reportL1IP ? b : void 0, callid: this.callId, tracks: this.streamTracks, traceid: u };
|
|
5188
5188
|
(l = this.parameter.data) != null && l.enablePubDataChannel && this.publishDataChannel().then(() => {
|
|
5189
|
-
this.syncPublishToRoomServer(
|
|
5190
|
-
}),
|
|
5191
|
-
} catch (
|
|
5192
|
-
throw r && this.audioPubState.setState(Z.AliRtcStateNoPublish), n && this.videoPubState.setState(Z.AliRtcStateNoPublish), o && this.videoSmallPubState.setState(Z.AliRtcStateNoPublish), c && this.screenPubState.setState(Z.AliRtcStateNoPublish),
|
|
5189
|
+
this.syncPublishToRoomServer(g, i, f);
|
|
5190
|
+
}), u && (this.traceId = u), r && this.reportAudioProfile(), n && this.reportVideoProfile(), c && this.reportScreenProfile(), yield this.syncPublishToRoomServer(g, i, f), r && this.audioPubState.setState(Z.AliRtcStatePublished), n && this.videoPubState.setState(Z.AliRtcStatePublished), o && this.videoSmallPubState.setState(Z.AliRtcStatePublished), c && this.screenPubState.setState(Z.AliRtcStatePublished);
|
|
5191
|
+
} catch (f) {
|
|
5192
|
+
throw r && this.audioPubState.setState(Z.AliRtcStateNoPublish), n && this.videoPubState.setState(Z.AliRtcStateNoPublish), o && this.videoSmallPubState.setState(Z.AliRtcStateNoPublish), c && this.screenPubState.setState(Z.AliRtcStateNoPublish), f;
|
|
5193
5193
|
}
|
|
5194
|
-
else
|
|
5195
|
-
|
|
5194
|
+
else {
|
|
5195
|
+
if ((d = this.parameter.data) != null && d.enablePubSubDataWithoutMedia && ((h = this.parameter.data) != null && h.enablePubDataChannel)) {
|
|
5196
|
+
T.event(`[${ot.logName}]`, "startPublish no media stream, publish data channel only");
|
|
5197
|
+
try {
|
|
5198
|
+
const f = (/* @__PURE__ */ new Date()).getTime();
|
|
5199
|
+
if (yield this.publishDataChannel(), this.dc) {
|
|
5200
|
+
const u = { type: _t.Add, userid: this.userId, sessionid: this.sessionId, displayname: this.name, pubid: this.publishId, resume: e, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: [], traceid: this.traceId };
|
|
5201
|
+
yield this.syncPublishToRoomServer(u, i, f);
|
|
5202
|
+
}
|
|
5203
|
+
} catch (f) {
|
|
5204
|
+
T.error(`[${ot.logName}]`, "publishDataChannel without media failed", f);
|
|
5205
|
+
}
|
|
5206
|
+
return;
|
|
5207
|
+
}
|
|
5208
|
+
T.event(`[${ot.logName}]`, "startPublish no stream founded");
|
|
5209
|
+
}
|
|
5196
5210
|
});
|
|
5197
5211
|
}
|
|
5198
5212
|
updateStreams() {
|
|
@@ -5203,7 +5217,7 @@ const we = (gt = class extends An {
|
|
|
5203
5217
|
publishUpdate(e) {
|
|
5204
5218
|
return _(this, null, function* () {
|
|
5205
5219
|
var n, o, c, l, d;
|
|
5206
|
-
if (
|
|
5220
|
+
if (T.info(`[${ot.logName}]`, "publishUpdate", e || "-", this.shouldPublish), !this.shouldPublish)
|
|
5207
5221
|
return;
|
|
5208
5222
|
if (!this.rtsManager.isConnecting && !this.rtsManager.isConnected)
|
|
5209
5223
|
return void (yield this.startPublish());
|
|
@@ -5219,7 +5233,7 @@ const we = (gt = class extends An {
|
|
|
5219
5233
|
const g = (c = this.streamTracks) == null ? void 0 : c.find(({ ssrc: A, type: y, msid: v }) => y === "video" && A && v === P.VideoSmall), m = yield this.compareAndPublish(g, t.videoSmall, P.VideoSmall);
|
|
5220
5234
|
m && (i = m);
|
|
5221
5235
|
const S = (l = this.streamTracks) == null ? void 0 : l.find(({ ssrc: A, type: y, msid: v }) => y === "video" && A && v === P.Screen), R = yield this.compareAndPublish(S, t.screen, P.Screen);
|
|
5222
|
-
R && (i = R), (d = this.parameter.data) != null && d.enablePubDataChannel && !this.dc && (yield this.publishDataChannel()), i || e !== Rt.RECONNECT ? i && (yield this.syncPublishToRoomServer(i, t, r)) : this.syncPublishToRoomServer({ type:
|
|
5236
|
+
R && (i = R), (d = this.parameter.data) != null && d.enablePubDataChannel && !this.dc && (yield this.publishDataChannel()), i || e !== Rt.RECONNECT ? i && (yield this.syncPublishToRoomServer(i, t, r)) : this.syncPublishToRoomServer({ type: _t.Add, userid: this.userId, sessionid: this.sessionId, displayname: this.name, pubid: this.publishId, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: this.rtsManager.publishingTracks, traceid: this.traceId }, t, Date.now());
|
|
5223
5237
|
} catch (h) {
|
|
5224
5238
|
const { code: f } = h != null ? h : {}, u = this.url;
|
|
5225
5239
|
throw f === 403 && u && (yield this.refreshPushStreamUrl(), i = yield this.publishUpdate()), h;
|
|
@@ -5231,11 +5245,11 @@ const we = (gt = class extends An {
|
|
|
5231
5245
|
return _(this, null, function* () {
|
|
5232
5246
|
var c;
|
|
5233
5247
|
if (!e)
|
|
5234
|
-
return void
|
|
5248
|
+
return void T.event(`[${ot.logName}]`, "sync publish to room server failed because no publishInfo");
|
|
5235
5249
|
let r = e;
|
|
5236
5250
|
if (this.dc) {
|
|
5237
5251
|
const o = e, { tracks: l } = o, d = At(o, ["tracks"]);
|
|
5238
|
-
r =
|
|
5252
|
+
r = dt(J({}, d), { tracks: [...l, { type: "data", msid: P.Data, ssrc: `web_${this.callId.substring(0, 8)}_${((c = this.dc.datachannel) == null ? void 0 : c.id) || "0"}`, codec: "text" }] });
|
|
5239
5253
|
}
|
|
5240
5254
|
const n = yield this.signalingManager.publish(r);
|
|
5241
5255
|
e.signaltid = n.tid;
|
|
@@ -5259,7 +5273,7 @@ const we = (gt = class extends An {
|
|
|
5259
5273
|
try {
|
|
5260
5274
|
const d = yield this.rtsManager.publishAdd(this, e, t, !1, !0);
|
|
5261
5275
|
d && (this.traceId = d), n && (this.audioPubState.setState(Z.AliRtcStatePublished), this.reportAudioProfile()), o && (this.videoPubState.setState(Z.AliRtcStatePublished), this.reportVideoProfile()), c && this.videoSmallPubState.setState(Z.AliRtcStatePublished), l && (this.screenPubState.setState(Z.AliRtcStatePublished), this.reportScreenProfile()), this.streamTracks = this.rtsManager.publishingTracks;
|
|
5262
|
-
const h = { type:
|
|
5276
|
+
const h = { type: _t.Add, userid: this.userId, sessionid: "", displayname: this.name, pubid: this.publishId, resume: i, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: this.streamTracks, traceid: d };
|
|
5263
5277
|
return this.reportSelfDeviceStatus(), this.monitorTimerId || this.startStreamMonitor(), h;
|
|
5264
5278
|
} catch (d) {
|
|
5265
5279
|
let h = U.ERR_SDK_PUBLISH_INVAILD;
|
|
@@ -5275,7 +5289,7 @@ const we = (gt = class extends An {
|
|
|
5275
5289
|
yield this.rtsManager.publishReplace(this.url, e, t), this.streamTracks = this.rtsManager.publishingTracks;
|
|
5276
5290
|
const i = (t == null ? void 0 : t.vMsid) === P.VideoLarge, r = (t == null ? void 0 : t.vMsid) === P.Screen;
|
|
5277
5291
|
i && this.streamManager.setVideoProfile(void 0, void 0, !0), r && this.streamManager.setScreenProfile(void 0, void 0);
|
|
5278
|
-
const n = { type:
|
|
5292
|
+
const n = { type: _t.Replace, userid: this.userId, sessionid: "", pubid: this.publishId, displayname: this.name, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: this.streamTracks };
|
|
5279
5293
|
return this.reportSelfDeviceStatus(), n;
|
|
5280
5294
|
} catch (i) {
|
|
5281
5295
|
throw V.fromError(i, U.ERR_INNER, `publish replace failed, vMsid: ${t == null ? void 0 : t.vMsid} aMsid: ${t == null ? void 0 : t.aMsid}`);
|
|
@@ -5284,7 +5298,7 @@ const we = (gt = class extends An {
|
|
|
5284
5298
|
}
|
|
5285
5299
|
publishDeleteTracks(e) {
|
|
5286
5300
|
return _(this, null, function* () {
|
|
5287
|
-
const t = { type:
|
|
5301
|
+
const t = { type: _t.Delete, userid: this.userId, sessionid: "", displayname: this.displayname, callid: this.callId, pubid: this.publishId, subscribe: { signal: "", pullstreamurl: this.url }, tracks: [] };
|
|
5288
5302
|
try {
|
|
5289
5303
|
return yield this.rtsManager.publishDelete(this.url, e), this.streamTracks = this.rtsManager.publishingTracks, e.audio && this.audioPubState.setState(Z.AliRtcStateNoPublish), e.video && (e.vMsid === P.VideoSmall ? this.videoSmallPubState.setState(Z.AliRtcStateNoPublish) : this.videoPubState.setState(Z.AliRtcStateNoPublish)), e.screen && this.screenPubState.setState(Z.AliRtcStateNoPublish), t.tracks = this.streamTracks, this.reportSelfDeviceStatus(), t;
|
|
5290
5304
|
} catch (i) {
|
|
@@ -5294,14 +5308,14 @@ const we = (gt = class extends An {
|
|
|
5294
5308
|
}
|
|
5295
5309
|
publishStop() {
|
|
5296
5310
|
return _(this, null, function* () {
|
|
5297
|
-
|
|
5311
|
+
T.info(`[${ot.logName}]`, "publishStop", { url: this.url });
|
|
5298
5312
|
const e = (/* @__PURE__ */ new Date()).getTime();
|
|
5299
5313
|
try {
|
|
5300
5314
|
const t = this.hasAudioTrackInMS, i = this.hasCameraTrackInMS, r = this.hasCameraDualTrackInMS, n = this.hasScreenTrackInMS;
|
|
5301
5315
|
yield this.rtsManager.publishStop(this.url), t && this.audioPubState.setState(Z.AliRtcStateNoPublish), i && this.videoPubState.setState(Z.AliRtcStateNoPublish), r && this.videoSmallPubState.setState(Z.AliRtcStateNoPublish), n && this.screenPubState.setState(Z.AliRtcStateNoPublish), this.traceId = "", Object.keys(this.monitorDataCache).forEach((c) => {
|
|
5302
5316
|
this.reportPublishMonitor(c);
|
|
5303
5317
|
}), this.streamTracks = [];
|
|
5304
|
-
const o = { type:
|
|
5318
|
+
const o = { type: _t.Stop, userid: this.userId, sessionid: this.sessionId, displayname: this.displayname, callid: this.callId, pubid: this.publishId, subscribe: { signal: "", pullstreamurl: this.url }, tracks: [] };
|
|
5305
5319
|
return this.syncPublishToRoomServer(o, {}, e), o;
|
|
5306
5320
|
} catch (t) {
|
|
5307
5321
|
throw V.fromError(t, U.ERR_INNER, "publish stop failed");
|
|
@@ -5312,7 +5326,7 @@ const we = (gt = class extends An {
|
|
|
5312
5326
|
return _(this, null, function* () {
|
|
5313
5327
|
this.shouldPublish = !1;
|
|
5314
5328
|
const e = (/* @__PURE__ */ new Date()).getTime();
|
|
5315
|
-
let t = { type:
|
|
5329
|
+
let t = { type: _t.UnPublish, userid: this.userId, sessionid: "", displayname: this.displayname, callid: this.callId, pubid: this.publishId, subscribe: { signal: "", pullstreamurl: this.url }, tracks: [] };
|
|
5316
5330
|
try {
|
|
5317
5331
|
if (this.isPublishing) {
|
|
5318
5332
|
const i = this.hasAudioTrackInMS, r = this.hasCameraTrackInMS, n = this.hasCameraDualTrackInMS, o = this.hasScreenTrackInMS;
|
|
@@ -5492,10 +5506,10 @@ const we = (gt = class extends An {
|
|
|
5492
5506
|
n.setState(Z.AliRtcStatePublished);
|
|
5493
5507
|
});
|
|
5494
5508
|
}
|
|
5495
|
-
}, p(
|
|
5496
|
-
Ee([
|
|
5509
|
+
}, p(ot, "logName", "LocalUser"), ot);
|
|
5510
|
+
Ee([C()], we.prototype, "clearPublishState", 1), Ee([C()], we.prototype, "clear", 1), Ee([C(B)], we.prototype, "startDefaultCameraAndMic", 1), Ee([C()], we.prototype, "setViewConfig", 1), Ee([C()], we.prototype, "startCameraCapture", 1), Ee([C()], we.prototype, "stopCameraCapture", 1), Ee([C()], we.prototype, "startAudioCapture", 1), Ee([C()], we.prototype, "stopAudioCapture", 1), Ee([C()], we.prototype, "startCameraAndMic", 1), Ee([C()], we.prototype, "stopPreview", 1), Ee([C()], we.prototype, "resumePublish", 1), Ee([C()], we.prototype, "createLocalStream", 1), Ee([C()], we.prototype, "stopLocalStream", 1), Ee([C()], we.prototype, "updateDataChannel", 1), Ee([C(B)], we.prototype, "startPublish", 1), Ee([C()], we.prototype, "updateStreams", 1), Ee([C(([a]) => [a])], we.prototype, "syncPublishToRoomServer", 1), Ee([C()], we.prototype, "refreshPushStreamUrl", 1), Ee([C(([a, s, e]) => [JSON.stringify(e)])], we.prototype, "publishAdd", 1), Ee([C(([a, s]) => [JSON.stringify(s)])], we.prototype, "publishReplace", 1), Ee([C(B)], we.prototype, "publishDeleteTracks", 1), Ee([C()], we.prototype, "publishStop", 1), Ee([C()], we.prototype, "unPublish", 1), Ee([C(([a, s, e]) => [a.length, s, e])], we.prototype, "sendSEI", 1), Ee([C(B)], we.prototype, "markReconnect", 1), Ee([C(B)], we.prototype, "markReconnected", 1);
|
|
5497
5511
|
let Sc = we;
|
|
5498
|
-
var
|
|
5512
|
+
var pt = ((a) => (a.OPUS = "opus", a.H264 = "H264", a.H265 = "H265", a.AV1 = "AV1", a.UNKNOWN = "", a))(pt || {}), ce = ((a) => (a[a.NotSubscribe = 0] = "NotSubscribe", a[a.Subscribing = 1] = "Subscribing", a[a.Subscribed = 2] = "Subscribed", a))(ce || {}), Yt = ((a) => (a.VideoTrackEnded = "videoTrackEnded", a.AudioTrackEnded = "audioTrackEnded", a.ScreenTrackEnded = "screenTrackEnded", a))(Yt || {});
|
|
5499
5513
|
const Cn = (a) => _(void 0, null, function* () {
|
|
5500
5514
|
return yield fe.createStream({ custom: !0, mediaStream: a });
|
|
5501
5515
|
}), hi = (a) => _(void 0, null, function* () {
|
|
@@ -5509,11 +5523,11 @@ var vc = Object.defineProperty, yc = Object.getOwnPropertyDescriptor;
|
|
|
5509
5523
|
class Hr extends je {
|
|
5510
5524
|
constructor() {
|
|
5511
5525
|
super();
|
|
5512
|
-
p(this, "audioInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec:
|
|
5513
|
-
p(this, "videoLargeInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec:
|
|
5514
|
-
p(this, "videoSmallInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec:
|
|
5515
|
-
p(this, "screenInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec:
|
|
5516
|
-
p(this, "dataInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec:
|
|
5526
|
+
p(this, "audioInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec: pt.UNKNOWN });
|
|
5527
|
+
p(this, "videoLargeInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec: pt.UNKNOWN });
|
|
5528
|
+
p(this, "videoSmallInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec: pt.UNKNOWN });
|
|
5529
|
+
p(this, "screenInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec: pt.UNKNOWN });
|
|
5530
|
+
p(this, "dataInfo", { subscribeState: ce.NotSubscribe, ssrc: "", msid: "", pt: 0, red: 0, codec: pt.UNKNOWN });
|
|
5517
5531
|
p(this, "audioVolume", 1);
|
|
5518
5532
|
p(this, "audioMuted", !1);
|
|
5519
5533
|
p(this, "userStatus");
|
|
@@ -5597,7 +5611,7 @@ class Hr extends je {
|
|
|
5597
5611
|
return this.audioInfo.codec;
|
|
5598
5612
|
}
|
|
5599
5613
|
get videoCodec() {
|
|
5600
|
-
return this.hasVideoLarge ? this.videoLargeInfo.codec : this.hasVideoSmall ? this.videoSmallInfo.codec : this.hasScreen ? this.screenInfo.codec :
|
|
5614
|
+
return this.hasVideoLarge ? this.videoLargeInfo.codec : this.hasVideoSmall ? this.videoSmallInfo.codec : this.hasScreen ? this.screenInfo.codec : pt.UNKNOWN;
|
|
5601
5615
|
}
|
|
5602
5616
|
get audioTrackInfo() {
|
|
5603
5617
|
return this.hasAudio ? ci.AliRtcAudioTrackMic : ci.AliRtcAudioTrackNo;
|
|
@@ -5609,7 +5623,7 @@ class Hr extends je {
|
|
|
5609
5623
|
let t = "", i = "", r = "", n = "", o = "";
|
|
5610
5624
|
return e ? (e.forEach((c) => {
|
|
5611
5625
|
var f;
|
|
5612
|
-
let l =
|
|
5626
|
+
let l = pt.UNKNOWN;
|
|
5613
5627
|
const d = ((f = c == null ? void 0 : c.attr) == null ? void 0 : f.reason) === "reconnect";
|
|
5614
5628
|
if (c.userdata) {
|
|
5615
5629
|
const { codec: u } = JSON.parse(c.userdata);
|
|
@@ -5639,7 +5653,7 @@ p(Hr, "logName", "RemoteStreamInfo");
|
|
|
5639
5653
|
for (var i, r = t > 1 ? void 0 : t ? yc(s, e) : s, n = a.length - 1; n >= 0; n--)
|
|
5640
5654
|
(i = a[n]) && (r = (t ? i(s, e, r) : i(r)) || r);
|
|
5641
5655
|
t && r && vc(s, e, r);
|
|
5642
|
-
})([
|
|
5656
|
+
})([C()], Hr.prototype, "updateRemoteTrackSubState", 1);
|
|
5643
5657
|
class Rc {
|
|
5644
5658
|
constructor(s) {
|
|
5645
5659
|
p(this, "remoteUser");
|
|
@@ -5718,7 +5732,7 @@ class ri extends je {
|
|
|
5718
5732
|
}
|
|
5719
5733
|
}
|
|
5720
5734
|
var Zt;
|
|
5721
|
-
const
|
|
5735
|
+
const Le = (Zt = class extends An {
|
|
5722
5736
|
constructor(e) {
|
|
5723
5737
|
var u;
|
|
5724
5738
|
const { userId: t, displayName: i, rtsManager: r, usersViewMap: n, slsReporter: o, signalingManager: c, localUser: l, audioVolumeIndicationInterval: d, playoutVolume: h, parameter: f } = e;
|
|
@@ -5784,9 +5798,9 @@ const Ne = (Zt = class extends An {
|
|
|
5784
5798
|
this.dcMsgWaitingPieces = [], i || (i = Qt.parse(t.body));
|
|
5785
5799
|
} else
|
|
5786
5800
|
i = Qt.parse(t.body);
|
|
5787
|
-
i ||
|
|
5801
|
+
i || T.event(`[${this.logName}]`, `parse data channel message fail, piece count: ${this.dcMsgWaitingPieces.length + 1}`);
|
|
5788
5802
|
}
|
|
5789
|
-
i && (
|
|
5803
|
+
i && (T.event(`[${this.logName}]`, `receive dc message, length(${(r = i.data) == null ? void 0 : r.byteLength})`), this.emit("remoteDataChannelMessage", this.uid, i));
|
|
5790
5804
|
});
|
|
5791
5805
|
p(this, "onDataChannelError", (e) => {
|
|
5792
5806
|
this.emit("occurError", V.fromError(e, U.ERR_SDK_SUBSCRIBE_DATA_ERROR));
|
|
@@ -5937,7 +5951,7 @@ const Ne = (Zt = class extends An {
|
|
|
5937
5951
|
clear(e = !0) {
|
|
5938
5952
|
return _(this, null, function* () {
|
|
5939
5953
|
Ji(Zt.prototype, this, "clear").call(this), this.stopPlayAudio(), this.stopStreamMonitor(), e && this.subscribeDeleteAllTracks(this.streamUrl).catch((t) => {
|
|
5940
|
-
|
|
5954
|
+
T.event(`[${this.logName}]`, `stopSubscribeAllTracks error: ${t.message || t}`);
|
|
5941
5955
|
}), this.clearStream(), this.clearScreenStream(), this.playoutGainNode && (this.playoutGainNode.disconnect(), this.playoutGainNode = void 0, Xt.getInstance().removeEventListener("statechange", this.handleAudioContextSuspended)), this.streamInfo.removeAllListeners(Ze.Remote);
|
|
5942
5956
|
});
|
|
5943
5957
|
}
|
|
@@ -5983,7 +5997,7 @@ const Ne = (Zt = class extends An {
|
|
|
5983
5997
|
const h = (/* @__PURE__ */ new Date()).getTime() - r, f = Date.now();
|
|
5984
5998
|
setTimeout(() => {
|
|
5985
5999
|
this.slsReporter.reportSubscribe(this.callId, this.remoteCallId, !!e.video && e.vMsid === P.VideoLarge, !!e.video && e.vMsid === P.VideoSmall, !!e.screen, !!e.audio, 0, "", h, { pctid: this.rtsManager.pcTraceId, subtid: this.traceId, ajsub: t === ue.Join ? 1 : 0, url: this.streamUrl, est: r }, f);
|
|
5986
|
-
}, 6e3), this.startStreamMonitor(), l.isHTTP && l.statsCheckPromise && (yield Promise.race([l.statsCheckPromise,
|
|
6000
|
+
}, 6e3), this.startStreamMonitor(), l.isHTTP && l.statsCheckPromise && (yield Promise.race([l.statsCheckPromise, Ct(1500)]));
|
|
5987
6001
|
} catch (l) {
|
|
5988
6002
|
const d = (/* @__PURE__ */ new Date()).getTime() - r;
|
|
5989
6003
|
e.audio && this.audioSubState.setState(ae.AliRtcStateNoSubscribe), e.video && this.videoSubState.setState(ae.AliRtcStateNoSubscribe), e.screen && this.screenSubState.setState(ae.AliRtcStateNoSubscribe), this.streamInfo.updateRemoteTrackSubState({ audio: e.audio !== !0 && void 0, video: e.video !== !0 && void 0, screen: e.screen !== !0 && void 0, vMsid: e.vMsid }), l && (l.message = `user(${this.uid}) subscribe error, ${(l == null ? void 0 : l.message) || ""}`);
|
|
@@ -6065,7 +6079,7 @@ const Ne = (Zt = class extends An {
|
|
|
6065
6079
|
if (e.mediaStream) {
|
|
6066
6080
|
n = document.createElement("video");
|
|
6067
6081
|
const o = () => {
|
|
6068
|
-
|
|
6082
|
+
T.event(`[${this.logName}]`, "new mediaStream canplay"), n && n.removeEventListener("canplaythrough", o, !1), n = void 0, clearTimeout(r), i(!0);
|
|
6069
6083
|
};
|
|
6070
6084
|
n.addEventListener("canplaythrough", o, !1), (n._playPromise || Promise.resolve()).then(() => {
|
|
6071
6085
|
n && e.mediaStream && (n.srcObject = e.mediaStream);
|
|
@@ -6073,7 +6087,7 @@ const Ne = (Zt = class extends An {
|
|
|
6073
6087
|
} else
|
|
6074
6088
|
i(!0);
|
|
6075
6089
|
r = window.setTimeout(() => {
|
|
6076
|
-
|
|
6090
|
+
T.event(`[${this.logName}]`, "new mediaStream timeout"), n = void 0, i(!0);
|
|
6077
6091
|
}, 3e3);
|
|
6078
6092
|
}), this.updateSubscribe(ue.User)), this.stream = e, this.playAll(!1, t), !this.subscribed && e && (this.subscribed = !0), e.hasAudio && this.isAudioSubscribing && e.enableAudio(), e.hasVideo && this.isVideoSubscribing && e.enableVideo();
|
|
6079
6093
|
});
|
|
@@ -6090,20 +6104,21 @@ const Ne = (Zt = class extends An {
|
|
|
6090
6104
|
(e = this.screenStream) == null || e.stop(), this.screenStream = void 0;
|
|
6091
6105
|
}
|
|
6092
6106
|
subscribeDataChannel() {
|
|
6107
|
+
var e;
|
|
6093
6108
|
if (this.dc)
|
|
6094
6109
|
try {
|
|
6095
6110
|
this.dcMsgWaitingPieces = [], this.dc.off("message", this.onDataChannelMessage), this.dc = void 0;
|
|
6096
|
-
} catch (
|
|
6111
|
+
} catch (t) {
|
|
6097
6112
|
}
|
|
6098
|
-
if (!this.streamInfo.hasAudio
|
|
6113
|
+
if (!((e = this.parameter.data) != null && e.enablePubSubDataWithoutMedia || this.streamInfo.hasAudio || this.streamInfo.hasVideo || this.streamInfo.hasScreen))
|
|
6099
6114
|
return this.dataSubState.setState(ae.AliRtcStateNoSubscribe), void this.streamInfo.updateRemoteTrackSubState({ data: !1 });
|
|
6100
|
-
this.dataSubState.setState(ae.AliRtcStateSubscribing), this.rtsManager.subscribeAddDataChannel(this.streamUrl).then((
|
|
6101
|
-
if (
|
|
6102
|
-
return this.dataChannelConnected(
|
|
6115
|
+
this.dataSubState.setState(ae.AliRtcStateSubscribing), this.rtsManager.subscribeAddDataChannel(this.streamUrl).then((t) => {
|
|
6116
|
+
if (t)
|
|
6117
|
+
return this.dataChannelConnected(t), this.dataSubState.setState(ae.AliRtcStateSubscribed), void this.streamInfo.updateRemoteTrackSubState({ data: !0 });
|
|
6103
6118
|
throw new Error("no dc founded");
|
|
6104
|
-
}).catch((
|
|
6105
|
-
const
|
|
6106
|
-
this.emit("remoteSubscribeError",
|
|
6119
|
+
}).catch((t) => {
|
|
6120
|
+
const i = V.fromError(t, U.ERR_INNER, "subscribe data failed");
|
|
6121
|
+
this.emit("remoteSubscribeError", i), this.dataSubState.setState(ae.AliRtcStateNoSubscribe), this.streamInfo.updateRemoteTrackSubState({ data: !1 });
|
|
6107
6122
|
});
|
|
6108
6123
|
}
|
|
6109
6124
|
subscribeDeleteDataChannel() {
|
|
@@ -6135,7 +6150,7 @@ const Ne = (Zt = class extends An {
|
|
|
6135
6150
|
return this.wantSubAudio && !this.isAudioSubscribing && this.streamInfo.hasAudio && this.audioSubState.currentState !== ae.AliRtcStateReconnecting ? (i.audio = !0, i.aMsid = ((n = this.streamInfo.getAudioInfo()) == null ? void 0 : n.msid) || P.Audio) : this.wantSubAudio && this.streamInfo.hasAudio || !this.isAudioSubscribing || (r.audio = !0, r.aMsid = ((o = this.streamInfo.getAudioInfo()) == null ? void 0 : o.msid) || P.Audio), this.wantSubVideo && this.streamInfo.hasVideo ? (this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeLow && !this.isVideoSmallSubscribing && this.streamInfo.hasVideoSmall && this.videoSmallSubState.currentState !== ae.AliRtcStateReconnecting ? (i.video = !0, i.vMsid = P.VideoSmall) : this.isVideoLargeSubscribing || !this.streamInfo.hasVideoLarge || this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeLow && this.isVideoSmallSubscribing && this.streamInfo.hasVideoSmall || this.videoLargeSubState.currentState === ae.AliRtcStateReconnecting || (i.video = !0, i.vMsid = ((c = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : c.msid) || P.VideoLarge), this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeLow && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && this.streamInfo.hasVideoSmall ? (r.video = !0, r.vMsid = P.VideoLarge) : this.defaultVideoStreamType !== Ke.AliRtcVideoStreamTypeHigh && this.streamInfo.hasVideoSmall || !this.isVideoLargeSubscribing || !this.isVideoSmallSubscribing || (r.video = !0, r.vMsid = P.VideoSmall)) : this.wantSubVideo && this.streamInfo.hasVideo || !this.isVideoSubscribing || (r.video = !0, r.vMsid = this.streamInfo.isVideoSmallSubscribed || this.streamInfo.isVideoSmallSubscribing ? P.VideoSmall : ((l = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : l.msid) || P.VideoLarge), this.wantSubScreen && !this.isScreenSubscribing && this.streamInfo.hasScreen && this.screenSubState.currentState !== ae.AliRtcStateReconnecting ? i.screen = !0 : this.wantSubScreen && this.streamInfo.hasScreen || !this.isScreenSubscribing || (r.screen = !0), (d = this.parameter.data) != null && d.enableSubDataChannel && !this.isDataSubscribing && this.streamInfo.hasData && this.dataSubState.currentState !== ae.AliRtcStateReconnecting ? i.data = !0 : (h = this.parameter.data) != null && h.enableSubDataChannel && this.streamInfo.hasData || !this.isDataSubscribing || (r.data = !0), this.dc && i.data && this.subscribeDeleteDataChannel(), (i.audio || i.video || i.screen || i.data) && this.subscribe(i, e, t), (r.audio || r.video || r.screen) && this.subscribeDeleteTracks(r), { addOption: i, deleteOption: r };
|
|
6136
6151
|
}
|
|
6137
6152
|
handleAutoPlayFailed() {
|
|
6138
|
-
|
|
6153
|
+
T.event(`[${this.logName}]`, "auto play failed"), this.emit("remoteAudioAutoPlayFail", this.uid);
|
|
6139
6154
|
const e = () => {
|
|
6140
6155
|
this.resumeAudio().then(() => {
|
|
6141
6156
|
document.removeEventListener("click", e, !1), document.removeEventListener("touchstart", e, !1);
|
|
@@ -6156,14 +6171,14 @@ const Ne = (Zt = class extends An {
|
|
|
6156
6171
|
return _(this, null, function* () {
|
|
6157
6172
|
var e, t;
|
|
6158
6173
|
if (this.audioTrack) {
|
|
6159
|
-
if (this.toggleAudio(!this.audioMuted), this.audioElement || (
|
|
6174
|
+
if (this.toggleAudio(!this.audioMuted), this.audioElement || (T.event(`[${this.logName}]`, "create audio element"), this.audioElement = document.createElement("audio"), this.audioElement.setAttribute("autoplay", "autoplay"), this.audioElement.addEventListener("pause", this.handleAudioPaused), this.setPlayoutVolume(this.playoutVolume)), ((t = (e = this.audioElement.srcObject) == null ? void 0 : e.getAudioTracks()) == null ? void 0 : t[0]) !== this.audioTrack) {
|
|
6160
6175
|
let i = this.audioElement.srcObject;
|
|
6161
6176
|
i ? i.getAudioTracks().forEach((r) => {
|
|
6162
6177
|
i.removeTrack(r);
|
|
6163
6178
|
}) : (i = new MediaStream(), this.audioElement.srcObject = i), i.addTrack(this.audioTrack);
|
|
6164
6179
|
}
|
|
6165
6180
|
if (fe.SystenUtil.isIos && parseInt(fe.SystenUtil.systemVersion) <= 13) {
|
|
6166
|
-
|
|
6181
|
+
T.event(`[${this.logName}]`, "play audio for iOS 13-");
|
|
6167
6182
|
const i = this.audioElement;
|
|
6168
6183
|
i.setAttribute("autoplay", "");
|
|
6169
6184
|
const r = () => {
|
|
@@ -6175,14 +6190,14 @@ const Ne = (Zt = class extends An {
|
|
|
6175
6190
|
} else
|
|
6176
6191
|
(() => {
|
|
6177
6192
|
var i;
|
|
6178
|
-
|
|
6179
|
-
|
|
6193
|
+
T.event(`[${this.logName}]`, "try play audio"), (i = this.audioElement) == null || i.play().then(() => {
|
|
6194
|
+
T.event(`[${this.logName}]`, "play audio success");
|
|
6180
6195
|
}).catch(() => {
|
|
6181
6196
|
this.handleAutoPlayFailed();
|
|
6182
6197
|
});
|
|
6183
6198
|
})();
|
|
6184
6199
|
} else
|
|
6185
|
-
|
|
6200
|
+
T.event(`[${this.logName}]`, "audio track is null");
|
|
6186
6201
|
});
|
|
6187
6202
|
}
|
|
6188
6203
|
stopPlayAudio() {
|
|
@@ -6323,9 +6338,9 @@ const Ne = (Zt = class extends An {
|
|
|
6323
6338
|
}), e || this.updateSubscribe(ue.Reconnect);
|
|
6324
6339
|
}
|
|
6325
6340
|
}, p(Zt, "logName", "RemoteUser"), Zt);
|
|
6326
|
-
Ve([
|
|
6327
|
-
let _c =
|
|
6328
|
-
var
|
|
6341
|
+
Ve([C()], Le.prototype, "clear", 1), Ve([C()], Le.prototype, "updateRemoteUserDeviceStatus", 1), Ve([C()], Le.prototype, "updateRemoteTracks", 1), Ve([C(B)], Le.prototype, "subscribe", 1), Ve([C()], Le.prototype, "subscribeProxy", 1), Ve([C(B)], Le.prototype, "subscribeDeleteProxy", 1), Ve([C()], Le.prototype, "restore", 1), Ve([C(B)], Le.prototype, "resumeAudio", 1), Ve([C(B)], Le.prototype, "stopSubscribe", 1), Ve([C(B)], Le.prototype, "subscribeDeleteAllTracks", 1), Ve([C()], Le.prototype, "clearStream", 1), Ve([C()], Le.prototype, "clearScreenStream", 1), Ve([C()], Le.prototype, "updateSubscribe", 1), Ve([C()], Le.prototype, "playAudio", 1), Ve([C()], Le.prototype, "stopPlayAudio", 1), Ve([C((a, s, e) => [typeof a == "string" ? a : a == null ? void 0 : a.nodeType, s || "-", e || "-"])], Le.prototype, "play", 1), Ve([C()], Le.prototype, "stopPlayAll", 1), Ve([C(B)], Le.prototype, "markReconnect", 1), Ve([C(B)], Le.prototype, "markReconnected", 1);
|
|
6342
|
+
let _c = Le;
|
|
6343
|
+
var Lt = ((a) => (a[a.AliRtcPluginErrorCodeSuccess = 0] = "AliRtcPluginErrorCodeSuccess", a[a.AliRtcPluginErrorCodeFailed = -1] = "AliRtcPluginErrorCodeFailed", a[a.AliRtcPluginErrorNoFindPlugin = -2] = "AliRtcPluginErrorNoFindPlugin", a[a.AliRtcPluginErrorParameterError = -3] = "AliRtcPluginErrorParameterError", a[a.AliRtcPluginErrorLoadError = -4] = "AliRtcPluginErrorLoadError", a[a.AliRtcPluginErrorCreateError = -5] = "AliRtcPluginErrorCreateError", a[a.AliRtcPluginErrorInitError = -6] = "AliRtcPluginErrorInitError", a[a.AliRtcPluginErrorInitTokenError = -7] = "AliRtcPluginErrorInitTokenError", a))(Lt || {});
|
|
6329
6344
|
class Ec extends je {
|
|
6330
6345
|
constructor() {
|
|
6331
6346
|
super(...arguments);
|
|
@@ -6333,13 +6348,13 @@ class Ec extends je {
|
|
|
6333
6348
|
}
|
|
6334
6349
|
add(e, t) {
|
|
6335
6350
|
if (this.plugins.has(e.name))
|
|
6336
|
-
throw new V(
|
|
6351
|
+
throw new V(Lt.AliRtcPluginErrorCreateError, `Plugin ${e.name} already exists`);
|
|
6337
6352
|
this.plugins.set(e.name, e), t && e.setOptions(t), this.emit("added", e), e.on("enabled", () => this.emit("added", e)), e.on("disabled", () => this.emit("removed", e)), e.on("updated", () => this.emit("updated", e));
|
|
6338
6353
|
}
|
|
6339
6354
|
remove(e) {
|
|
6340
6355
|
const t = this.plugins.get(e);
|
|
6341
6356
|
if (!t)
|
|
6342
|
-
throw new V(
|
|
6357
|
+
throw new V(Lt.AliRtcPluginErrorNoFindPlugin, `Plugin ${e} not founded`);
|
|
6343
6358
|
this.plugins.delete(e), t.removeAllListeners(), this.emit("removed", t);
|
|
6344
6359
|
}
|
|
6345
6360
|
removeAll() {
|
|
@@ -6406,21 +6421,21 @@ class Tc {
|
|
|
6406
6421
|
}
|
|
6407
6422
|
addPerUserRTSListener(s, e) {
|
|
6408
6423
|
s.on("connectStatusChange", (t) => {
|
|
6409
|
-
|
|
6424
|
+
T.event(`[${St}]`, `[multi-pc:${e}] connectStatusChange to:`, t.status);
|
|
6410
6425
|
const i = this.rtsClientMap.get(e);
|
|
6411
|
-
i && (t.status ===
|
|
6426
|
+
i && (t.status === Ni.CONNECT_STATUS_DISCONNECTED ? (i.connected = !1, e === this.pubBaseUrl && (this.ctx.slsReporter.reportWarning("rts disconnected (multi-pc pub)"), this.ctx.emit("disconnected"))) : t.status === Ni.CONNECT_STATUS_CONNECTED && (i.connected = !0, e === this.pubBaseUrl && this.ctx.emit("connected", !1, pi.PUBLISH)));
|
|
6412
6427
|
}), s.on("reconnect", (t) => {
|
|
6413
6428
|
var i, r, n;
|
|
6414
|
-
|
|
6429
|
+
T.debug(`[${St}]`, `[multi-pc:${e}] reconnect`, t), this.ctx.emit("reconnect", t.type, (i = t.extraInfo) == null ? void 0 : i.url, (n = (r = t.extraInfo) == null ? void 0 : r.msids) == null ? void 0 : n.map((o) => o.name));
|
|
6415
6430
|
}), s.on("reconnectFinish", (t) => {
|
|
6416
6431
|
var r;
|
|
6417
|
-
|
|
6432
|
+
T.debug(`[${St}]`, `[multi-pc:${e}] reconnectFinish`, t), this.ctx.emit("reconnectFinish", (t == null ? void 0 : t.type) || "pc", t == null ? void 0 : t.latestUrl, (r = t == null ? void 0 : t.msids) == null ? void 0 : r.map((n) => n.name));
|
|
6418
6433
|
const i = this.rtsClientMap.get(e);
|
|
6419
6434
|
if (i && (i.connected = !0), e === this.pubBaseUrl)
|
|
6420
6435
|
try {
|
|
6421
6436
|
this.ctx.emit("connected", !0, pi.PUBLISH);
|
|
6422
6437
|
} catch (n) {
|
|
6423
|
-
|
|
6438
|
+
T.error(`[${St}]`, "emit connected error:", n);
|
|
6424
6439
|
}
|
|
6425
6440
|
}), s.on("receivedSEI", (t) => {
|
|
6426
6441
|
this.ctx.emit("seimessage", t.url, t.sei.payloadType, t.sei.data);
|
|
@@ -6431,7 +6446,7 @@ class Tc {
|
|
|
6431
6446
|
const r = this.rtsClientMap.get(e);
|
|
6432
6447
|
r && (r.traceId = i), this.ctx.emit("traceIdUpdated", t, i);
|
|
6433
6448
|
}), s.on("onError", (t) => {
|
|
6434
|
-
|
|
6449
|
+
T.event(`[${St}]`, `[multi-pc:${e}] onError:`, t);
|
|
6435
6450
|
});
|
|
6436
6451
|
}
|
|
6437
6452
|
get isConnected() {
|
|
@@ -6458,7 +6473,7 @@ class Tc {
|
|
|
6458
6473
|
let l;
|
|
6459
6474
|
const { publishStream: d, vMsid: h } = yield this.ctx.localStreamManager.createHTTPPublishStream();
|
|
6460
6475
|
if (!d)
|
|
6461
|
-
return
|
|
6476
|
+
return T.warn(`[${St}]`, "multiPCPublish: publishStream is null"), { traceId: "", l1ip: l };
|
|
6462
6477
|
const f = this.ctx.getPubMsid(d, { vMsid: h });
|
|
6463
6478
|
f.answerSdpHook = (R) => {
|
|
6464
6479
|
const A = /\d+\.\d+\.\d+\.\d+(?=\s+1106|\s+8000)/.exec(R);
|
|
@@ -6476,7 +6491,7 @@ class Tc {
|
|
|
6476
6491
|
this.ctx.emit("disconnected");
|
|
6477
6492
|
}, A), this.ctx.slsReporter.reportPublish(e, i, r, d.hasVideo && (!h || h === P.VideoLarge), d.hasVideo && h === P.VideoSmall, d.hasVideo && h === P.Screen, d.hasAudio, (R == null ? void 0 : R.errorCode) || -1, this.ctx.pcTraceId, "", u, u), V.fromRtsError(R);
|
|
6478
6493
|
}
|
|
6479
|
-
b && (this.ctx.pcTraceId = b, o.traceId = b), o.connected = !0, this.ctx.publishingTracks = o.client.getPublishTrackInfoList(),
|
|
6494
|
+
b && (this.ctx.pcTraceId = b, o.traceId = b), o.connected = !0, this.ctx.publishingTracks = o.client.getPublishTrackInfoList(), T.event(`[${St}]`, "multiPCPublish success", b);
|
|
6480
6495
|
const g = Date.now();
|
|
6481
6496
|
setTimeout(() => {
|
|
6482
6497
|
this.ctx.slsReporter.reportPublish(e, i, r, d.hasVideo && (!h || h === P.VideoLarge), d.hasVideo && h === P.VideoSmall, d.hasVideo && h === P.Screen, d.hasAudio, 0, this.ctx.pcTraceId, s.traceId, u, g);
|
|
@@ -6503,7 +6518,7 @@ class Tc {
|
|
|
6503
6518
|
return _(this, null, function* () {
|
|
6504
6519
|
const { options: n, remoteUser: o } = s;
|
|
6505
6520
|
if (n.screen)
|
|
6506
|
-
return
|
|
6521
|
+
return T.warn(`[${St}]`, "screen subscribe not supported in multi-PC mode"), null;
|
|
6507
6522
|
const c = o.streamUrl, l = c.split("?")[0];
|
|
6508
6523
|
this.ctx.subUrlMap[o.userId] = l;
|
|
6509
6524
|
const d = this.getOrCreateClientEntry(l), h = this.ctx.getSubConfig(o.streamInfo, n);
|
|
@@ -6524,7 +6539,7 @@ class Tc {
|
|
|
6524
6539
|
let A = 0, y = 0, v = 0;
|
|
6525
6540
|
const E = ((w, I) => {
|
|
6526
6541
|
let k = 0;
|
|
6527
|
-
const
|
|
6542
|
+
const N = () => {
|
|
6528
6543
|
if (!this.rtsClientMap.has(l))
|
|
6529
6544
|
return Promise.resolve();
|
|
6530
6545
|
let D;
|
|
@@ -6532,19 +6547,19 @@ class Tc {
|
|
|
6532
6547
|
if (H.packetsReceived > 0)
|
|
6533
6548
|
A = Date.now();
|
|
6534
6549
|
else if (!S)
|
|
6535
|
-
return k < w && (k++, new Promise((K) => setTimeout(() => K(
|
|
6550
|
+
return k < w && (k++, new Promise((K) => setTimeout(() => K(N()), I)));
|
|
6536
6551
|
return !0;
|
|
6537
6552
|
})), S && !v && (D = d.client.getSubscribeVideoStats(c, m).then((H) => {
|
|
6538
6553
|
if (typeof H.packetsReceived == "number") {
|
|
6539
6554
|
if (!y && H.packetsReceived > 0 && (y = Date.now()), H.framesDecoded > 0)
|
|
6540
6555
|
v = Date.now();
|
|
6541
6556
|
else if (k < w)
|
|
6542
|
-
return k++, new Promise((K) => setTimeout(() => K(
|
|
6557
|
+
return k++, new Promise((K) => setTimeout(() => K(N()), I));
|
|
6543
6558
|
return !0;
|
|
6544
6559
|
}
|
|
6545
6560
|
})), Promise.resolve(D);
|
|
6546
6561
|
};
|
|
6547
|
-
return
|
|
6562
|
+
return N();
|
|
6548
6563
|
})(20, 100);
|
|
6549
6564
|
return E.then(() => {
|
|
6550
6565
|
y && this.ctx.slsReporter.reportSubscribeFirstPacket(e === ue.Resume, t, i, m, { fprt: y - f, ifsprtc: v ? v - f : 0, ajsub: e === ue.Join ? 1 : 0, pctid: d.traceId, subtid: (b == null ? void 0 : b.traceId) || "", sstc: g - f }), v && this.ctx.slsReporter.reportSubscribeFirstFrame(e === ue.Resume, t, i, m, { fvfrt: v - f, fp2fftc: v - y, ajsub: e === ue.Join ? 1 : 0, tffrtc: e === ue.Join ? v - this.ctx.localJoinTime : v - r, pctid: d.traceId, subtid: (b == null ? void 0 : b.traceId) || "", fvfdtc: v - f }), A && (this.ctx.slsReporter.reportConnectionLatencyEvent(qe.FIRST_REMOTE, et.DECODED, t, P.Audio, A), this.ctx.slsReporter.reportSubscribeFirstPacket(e === ue.Resume, t, i, P.Audio, { fprt: A - f, ifsprtc: A - f, ajsub: e === ue.Join ? 1 : 0, pctid: d.traceId, subtid: (b == null ? void 0 : b.traceId) || "", sstc: g - f }));
|
|
@@ -6565,9 +6580,9 @@ class Tc {
|
|
|
6565
6580
|
this.ctx.handleHTTPConfig(l), l.disableHeartbeat = !0;
|
|
6566
6581
|
try {
|
|
6567
6582
|
const d = this.ctx.suffixHttpUrl(e.streamUrl, l), h = yield c.client.subscribe(d, l);
|
|
6568
|
-
c.connected = !0, c.traceId = h.traceId,
|
|
6583
|
+
c.connected = !0, c.traceId = h.traceId, T.info(`[${St}]`, "multiPCSubscribeDelete: re-subscribed remaining tracks", o);
|
|
6569
6584
|
} catch (d) {
|
|
6570
|
-
|
|
6585
|
+
T.error(`[${St}]`, "multiPCSubscribeDelete: re-subscribe failed", d), this.destroyClientEntry(i);
|
|
6571
6586
|
}
|
|
6572
6587
|
return null;
|
|
6573
6588
|
});
|
|
@@ -6663,7 +6678,7 @@ class Tc {
|
|
|
6663
6678
|
var r;
|
|
6664
6679
|
const i = this.pubBaseUrl ? (r = this.rtsClientMap.get(this.pubBaseUrl)) == null ? void 0 : r.client : void 0;
|
|
6665
6680
|
if (i)
|
|
6666
|
-
return Promise.race([
|
|
6681
|
+
return Promise.race([Ct(1e3), ((n, o) => {
|
|
6667
6682
|
let c = 0;
|
|
6668
6683
|
const l = () => (e ? i.getPublishAudioStats(s, t) : i.getPublishVideoStats(s, t)).then((d) => !(d.bytesSent > 0) && c < n ? (c++, new Promise((h) => setTimeout(() => h(l()), o))) : Promise.resolve());
|
|
6669
6684
|
return l();
|
|
@@ -6722,7 +6737,7 @@ class Pc {
|
|
|
6722
6737
|
}
|
|
6723
6738
|
handleError(s, e) {
|
|
6724
6739
|
var t;
|
|
6725
|
-
(t = s == null ? void 0 : s.message) != null && t.includes("Message too large") ? (this.disabled = !0,
|
|
6740
|
+
(t = s == null ? void 0 : s.message) != null && t.includes("Message too large") ? (this.disabled = !0, T.warn("[Batcher]", "Message too large, batcher disabled, fallback to single request"), this.fallbackToSingleRequest(e)) : e.forEach((i) => i.reject(s));
|
|
6726
6741
|
}
|
|
6727
6742
|
flush() {
|
|
6728
6743
|
if (this.queue.length === 0 && this.queue2.length === 0)
|
|
@@ -6786,7 +6801,7 @@ const xe = (ee = class extends je {
|
|
|
6786
6801
|
const l = (sn.browserName || "").toLowerCase(), d = parseInt(sn.browserVersion || "0", 10);
|
|
6787
6802
|
return l === "firefox" && d >= 148;
|
|
6788
6803
|
})()) {
|
|
6789
|
-
|
|
6804
|
+
T.info(`[${ee.logName}]`, "Multi-PC mode enabled (Firefox 148+)"), this.subscribeAddBatcher.disabled = !0;
|
|
6790
6805
|
const l = this, d = { emit: (h, ...f) => l.emit(h, ...f), suffixHttpUrl: l.suffixHttpUrl.bind(l), handleHTTPConfig: l.handleHTTPConfig.bind(l), getSubConfig: l.getSubConfig.bind(l), getPubMsid: l.getPubMsid.bind(l), reportSubscribeLatency: l.reportSubscribeLatency.bind(l), localStreamManager: l.localStreamManager, slsReporter: l.slsReporter, traceIdMap: l.traceIdMap, subUrlMap: l.subUrlMap, get pcTraceId() {
|
|
6791
6806
|
return l._pcTraceId;
|
|
6792
6807
|
}, set pcTraceId(h) {
|
|
@@ -6807,7 +6822,7 @@ const xe = (ee = class extends je {
|
|
|
6807
6822
|
}
|
|
6808
6823
|
subscribeAddWithRetry(e) {
|
|
6809
6824
|
return is((t) => _(this, null, function* () {
|
|
6810
|
-
return this._dcReady || (yield this.dcConnectingPromise), t > 0 &&
|
|
6825
|
+
return this._dcReady || (yield this.dcConnectingPromise), t > 0 && T.event(`[${ee.logName}]`, `subscribeAdd retry times: ${t}`), this.isConnected ? this.rts.subscribeAdd(e) : Promise.reject();
|
|
6811
6826
|
}), 10, 100, (t) => {
|
|
6812
6827
|
var i, r, n, o;
|
|
6813
6828
|
return (t == null ? void 0 : t.errorCode) === 15006 || (t == null ? void 0 : t.errorCode) === 15004 && ((o = (n = (r = (i = t.extraInfo) == null ? void 0 : i.parsedData) == null ? void 0 : r.streams) == null ? void 0 : n[0]) == null ? void 0 : o.res_code) === 404;
|
|
@@ -6820,29 +6835,29 @@ const xe = (ee = class extends je {
|
|
|
6820
6835
|
addRTSListener() {
|
|
6821
6836
|
this.rts.on("connectStatusChange", (t) => {
|
|
6822
6837
|
var i, r, n, o;
|
|
6823
|
-
if (
|
|
6838
|
+
if (T.event(`[${ee.logName}]`, "rts connectStatusChange to:", t.status), t.status === Ni.CONNECT_STATUS_DISCONNECTED)
|
|
6824
6839
|
this.dcReject && this.dcReject(), this.setConnected(!1), this.rtsDisconnected = !0, this.slsReporter.reportWarning("rts disconnected"), this.emit("disconnected");
|
|
6825
|
-
else if (t.status ===
|
|
6840
|
+
else if (t.status === Ni.CONNECT_STATUS_CONNECTED) {
|
|
6826
6841
|
if (this.rtsDisconnected) {
|
|
6827
6842
|
const c = (o = (n = (r = (i = this.rts.commonController) == null ? void 0 : i.peerCore) == null ? void 0 : r.getSignal()) == null ? void 0 : n.getDatachannelCore()) == null ? void 0 : o.readyState;
|
|
6828
|
-
|
|
6843
|
+
T.event(`[${ee.logName}]`, "dcReadyState:", c), c === "open" && this.dcResolve && this.dcResolve(!0);
|
|
6829
6844
|
}
|
|
6830
6845
|
this.rtsDisconnected = !1, this.setConnected(!0);
|
|
6831
6846
|
}
|
|
6832
6847
|
}), this.rts.on("reconnect", (t) => {
|
|
6833
6848
|
var i, r, n;
|
|
6834
|
-
|
|
6849
|
+
T.debug(`[${ee.logName}]`, "reconnect", t), this.emit("reconnect", t.type, (i = t.extraInfo) == null ? void 0 : i.url, (n = (r = t.extraInfo) == null ? void 0 : r.msids) == null ? void 0 : n.map((o) => o.name));
|
|
6835
6850
|
}), this.rts.on("reconnectFinish", (t) => {
|
|
6836
6851
|
var i;
|
|
6837
|
-
|
|
6852
|
+
T.debug(`[${ee.logName}]`, "reconnectFinish", t), this.emit("reconnectFinish", (t == null ? void 0 : t.type) || "pc", t == null ? void 0 : t.latestUrl, (i = t == null ? void 0 : t.msids) == null ? void 0 : i.map((r) => r.name));
|
|
6838
6853
|
try {
|
|
6839
6854
|
this.emit("connected", !0, this._rtsPeerConnectionType);
|
|
6840
6855
|
} catch (r) {
|
|
6841
|
-
|
|
6856
|
+
T.error(`[${ee.logName}]`, "emit connected error:", r);
|
|
6842
6857
|
}
|
|
6843
6858
|
this.logCandidateProtocol("reconnectFinish");
|
|
6844
6859
|
}), this.rts.on("datachannelStatusChange", (t) => {
|
|
6845
|
-
|
|
6860
|
+
T.event(`[${ee.logName}]`, "rts datachannelStatusChange to:", t.status), t.status === es.DATACHANNEL_STATUS_OPEN ? (this._dcReady = !0, this.dcResolve && this.dcResolve(!0)) : t.status === es.DATACHANNEL_STATUS_CLOSE && (this._dcReady = !1, this.dcReject && this.dcReject(new Error("signal datachannel closed")), this.dcConnectingPromise = new Promise((i, r) => {
|
|
6846
6861
|
this.dcResolve = i, this.dcReject = r;
|
|
6847
6862
|
}));
|
|
6848
6863
|
}), this.rts.on("receivedSEI", (t) => {
|
|
@@ -6854,9 +6869,9 @@ const xe = (ee = class extends je {
|
|
|
6854
6869
|
} catch (r) {
|
|
6855
6870
|
}
|
|
6856
6871
|
}), this.rts.on("onError", (t) => {
|
|
6857
|
-
|
|
6872
|
+
T.event(`[${ee.logName}]`, "rts onError event:", t);
|
|
6858
6873
|
}), this.rts.on("reconnect", (t) => {
|
|
6859
|
-
|
|
6874
|
+
T.event(`[${ee.logName}]`, "rts reconnect event:", t);
|
|
6860
6875
|
}), this.rts.on("traceId", ({ url: t, traceId: i }) => {
|
|
6861
6876
|
t && i && this.traceIdMap[t] !== i && (this.traceIdMap[t] = i, this.emit("traceIdUpdated", t, i));
|
|
6862
6877
|
});
|
|
@@ -6866,13 +6881,13 @@ const xe = (ee = class extends je {
|
|
|
6866
6881
|
let l = i.length > 1 ? `[${c}]` : "";
|
|
6867
6882
|
return l += o.method || "", t.type === "sub" && o.url && (l += ` ${Object.keys(this.subUrlMap).find((d) => this.subUrlMap[d] === o.url.split("?")[0]) || ""}`), o.msid && (l += ` ${o.msid.map((d) => e[d.name] || d.name).join("+")}`), l;
|
|
6868
6883
|
}), n = `${t.type} ${r.join(", ")}`;
|
|
6869
|
-
|
|
6884
|
+
T.event(`[${ee.logName}]`, "rts signalSent event:", n, t);
|
|
6870
6885
|
}), this.rts.on("signalReceived", (t) => {
|
|
6871
6886
|
const i = t.streams || [], r = i.map((o, c) => {
|
|
6872
6887
|
let l = i.length > 1 ? `[${c}]` : "";
|
|
6873
6888
|
return l += o.method || "", t.type === "sub" && o.url && (l += ` ${Object.keys(this.subUrlMap).find((d) => this.subUrlMap[d] === o.url.split("?")[0]) || ""}`), l += ` ${o.res_code || ""}`, o.msid && (l += ` ${o.msid.map((d) => e[d.name] || d.name).join("+")}`), l;
|
|
6874
6889
|
}), n = `${t.type} ${r.join(", ")}`;
|
|
6875
|
-
|
|
6890
|
+
T.event(`[${ee.logName}]`, "rts signalReceived event:", n, t);
|
|
6876
6891
|
}), this.rts.on("hebtSent", (t) => {
|
|
6877
6892
|
var i, r, n;
|
|
6878
6893
|
if ((n = (r = (i = this.parameter) == null ? void 0 : i.net) == null ? void 0 : r.heartbeat) != null && n.enableLog) {
|
|
@@ -6880,7 +6895,7 @@ const xe = (ee = class extends je {
|
|
|
6880
6895
|
var l, d;
|
|
6881
6896
|
return this.subUrlMap[c] === ((d = (l = t.streams) == null ? void 0 : l[0]) == null ? void 0 : d.url.split("?")[0]);
|
|
6882
6897
|
}) || (t.streams ? "pub" : "empty");
|
|
6883
|
-
|
|
6898
|
+
T.event(`[${ee.logName}]`, "rts hebtSent event:", o, t);
|
|
6884
6899
|
}
|
|
6885
6900
|
}), this.rts.on("hebtReceived", (t) => {
|
|
6886
6901
|
var i, r, n, o, c, l, d;
|
|
@@ -6889,7 +6904,7 @@ const xe = (ee = class extends je {
|
|
|
6889
6904
|
var u, b;
|
|
6890
6905
|
return this.subUrlMap[f] === ((b = (u = t.streams) == null ? void 0 : u[0]) == null ? void 0 : b.url.split("?")[0]);
|
|
6891
6906
|
}) || (t.streams ? "pub" : "empty")} ${((c = (o = t.streams) == null ? void 0 : o[0]) == null ? void 0 : c.res_code) || ""}`;
|
|
6892
|
-
(d = (l = t.streams) == null ? void 0 : l[0]) != null && d.msid && (h += ` ${t.streams[0].msid.map((f) => e[f.name] || f.name).join("+")}`),
|
|
6907
|
+
(d = (l = t.streams) == null ? void 0 : l[0]) != null && d.msid && (h += ` ${t.streams[0].msid.map((f) => e[f.name] || f.name).join("+")}`), T.event(`[${ee.logName}]`, "rts hebtReceived event:", h, t);
|
|
6893
6908
|
}
|
|
6894
6909
|
});
|
|
6895
6910
|
}
|
|
@@ -6933,10 +6948,10 @@ const xe = (ee = class extends je {
|
|
|
6933
6948
|
}
|
|
6934
6949
|
supportVideoCodec(e) {
|
|
6935
6950
|
var t, i, r;
|
|
6936
|
-
return e ===
|
|
6951
|
+
return e === pt.H265 ? (t = RTCRtpSender.getCapabilities("video")) == null ? void 0 : t.codecs.some((n) => n.mimeType === "video/H265") : e === pt.H264 ? (i = RTCRtpSender.getCapabilities("video")) == null ? void 0 : i.codecs.some((n) => n.mimeType === "video/H264") : e === pt.AV1 && ((r = RTCRtpSender.getCapabilities("video")) == null ? void 0 : r.codecs.some((n) => n.mimeType === "video/AV1"));
|
|
6937
6952
|
}
|
|
6938
6953
|
changeVideoCodec(e) {
|
|
6939
|
-
this.supportVideoCodec(e) ? (
|
|
6954
|
+
this.supportVideoCodec(e) ? (T.info(`[${ee.logName}]`, "changeVideoCodec to:", e), pt.H265 === e && (this.setSenderPreferredVideoCodecH265(), this.setReceiverPreferredVideoCodecH265())) : T.warn(`[${ee.logName}]`, `not support video codec: ${e}`);
|
|
6940
6955
|
}
|
|
6941
6956
|
setAudioRedEnabled(e) {
|
|
6942
6957
|
var t;
|
|
@@ -7016,7 +7031,7 @@ const xe = (ee = class extends je {
|
|
|
7016
7031
|
this.startConnect();
|
|
7017
7032
|
const { publishStream: d, videoSmallStream: h, screenStream: f, vMsid: u } = yield this.localStreamManager.createHTTPPublishStream();
|
|
7018
7033
|
if (!d)
|
|
7019
|
-
return
|
|
7034
|
+
return T.warn(`[${ee.logName}]`, "publishStream is null"), { traceId: "", l1ip: n };
|
|
7020
7035
|
const b = this.getPubMsid(d, { vMsid: u });
|
|
7021
7036
|
b.answerSdpHook = (y) => {
|
|
7022
7037
|
const v = /\d+\.\d+\.\d+\.\d+(?=\s+1106|\s+8000)/.exec(y);
|
|
@@ -7033,7 +7048,7 @@ const xe = (ee = class extends je {
|
|
|
7033
7048
|
this.emit("disconnected");
|
|
7034
7049
|
}, v), this.slsReporter.reportPublish(t, c, l, d.hasVideo && (!u || u === P.VideoLarge), d.hasVideo && u === P.VideoSmall, d.hasVideo && u === P.Screen, d.hasAudio, (y == null ? void 0 : y.errorCode) || -1, this.pcTraceId, "", R, R), V.fromRtsError(y);
|
|
7035
7050
|
}
|
|
7036
|
-
S && (this._pcTraceId = S),
|
|
7051
|
+
S && (this._pcTraceId = S), T.event(`[${ee.logName}]`, "rts publish success", S);
|
|
7037
7052
|
const A = Date.now();
|
|
7038
7053
|
setTimeout(() => {
|
|
7039
7054
|
this.slsReporter.reportPublish(t, c, l, d.hasVideo && (!u || u === P.VideoLarge), d.hasVideo && u === P.VideoSmall, d.hasVideo && u === P.Screen, d.hasAudio, 0, this.pcTraceId, e.traceId, R, A);
|
|
@@ -7048,7 +7063,7 @@ const xe = (ee = class extends je {
|
|
|
7048
7063
|
}
|
|
7049
7064
|
waitPublishSender(e, t = !1, i) {
|
|
7050
7065
|
return _(this, null, function* () {
|
|
7051
|
-
return this.multiPC ? this.multiPC.waitPublishSender(e, t, i) : Promise.race([
|
|
7066
|
+
return this.multiPC ? this.multiPC.waitPublishSender(e, t, i) : Promise.race([Ct(1e3), ((r, n) => {
|
|
7052
7067
|
let o = 0;
|
|
7053
7068
|
const c = () => (t ? this.rts.getPublishAudioStats(e, i) : this.rts.getPublishVideoStats(e, i)).then((l) => !(l.bytesSent > 0) && o < r ? (o++, new Promise((d) => setTimeout(() => d(c()), n))) : Promise.resolve());
|
|
7054
7069
|
return c();
|
|
@@ -7070,19 +7085,19 @@ const xe = (ee = class extends je {
|
|
|
7070
7085
|
return _(this, arguments, function* (e, t, i, r = !1, n = !1, o = Rt.MANUAL) {
|
|
7071
7086
|
var g, m, S, R;
|
|
7072
7087
|
if (this.multiPC)
|
|
7073
|
-
return
|
|
7088
|
+
return T.warn(`[${ee.logName}]`, "publishAdd not supported in multi-PC mode"), "";
|
|
7074
7089
|
const h = e.url, f = e.callId;
|
|
7075
7090
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7076
7091
|
const u = Date.now(), b = this.getPubMsid(t, i);
|
|
7077
7092
|
try {
|
|
7078
7093
|
const A = yield is((y) => _(this, null, function* () {
|
|
7079
|
-
return y > 0 &&
|
|
7094
|
+
return y > 0 && T.event(`[${ee.logName}]`, `publishAdd retry times: ${y}`), this.isConnected ? (this._dcReady || (yield this.dcConnectingPromise), this.rts.publishAdd([J({ url: h, stream: t, updateSourceStream: !1 }, b)])) : Promise.reject(new V(U.ERR_INNER, "rts not connected"));
|
|
7080
7095
|
}), 10, 0, (y) => (y == null ? void 0 : y.errorCode) === 15006);
|
|
7081
7096
|
if (A) {
|
|
7082
7097
|
const y = Date.now(), [v] = A, E = Date.now();
|
|
7083
7098
|
return setTimeout(() => {
|
|
7084
|
-
var w, I, k,
|
|
7085
|
-
this.slsReporter.reportPublish(!1, h, f, ((w = b.vMsid) == null ? void 0 : w[0]) === P.VideoLarge, ((I = b.vMsid) == null ? void 0 : I[0]) === P.VideoSmall, ((k = b.vMsid) == null ? void 0 : k[0]) === P.Screen, ((
|
|
7099
|
+
var w, I, k, N;
|
|
7100
|
+
this.slsReporter.reportPublish(!1, h, f, ((w = b.vMsid) == null ? void 0 : w[0]) === P.VideoLarge, ((I = b.vMsid) == null ? void 0 : I[0]) === P.VideoSmall, ((k = b.vMsid) == null ? void 0 : k[0]) === P.Screen, ((N = b.aMsid) == null ? void 0 : N[0]) === P.Audio, 0, this.pcTraceId, v.traceId || "", u, E);
|
|
7086
7101
|
}, 6e3), v.traceId && (this._pcTraceId = v.traceId), this.updatePublishingTracks(v.trackInfoList), n && (yield this.waitPublishSender(h, !t.hasVideo, t.hasVideo ? i == null ? void 0 : i.vMsid : i == null ? void 0 : i.aMsid)), this.slsReporter.reportPublishFirstPacket(r, f, u, y, this._localJoinTime, (t.hasVideo ? i == null ? void 0 : i.vMsid : i == null ? void 0 : i.aMsid) || "", this.pcTraceId, v.traceId || "", o), v.traceId || "";
|
|
7087
7102
|
}
|
|
7088
7103
|
} catch (A) {
|
|
@@ -7095,15 +7110,15 @@ const xe = (ee = class extends je {
|
|
|
7095
7110
|
return _(this, null, function* () {
|
|
7096
7111
|
var l, d, h, f, u, b, g, m;
|
|
7097
7112
|
if (this.multiPC)
|
|
7098
|
-
return
|
|
7113
|
+
return T.warn(`[${ee.logName}]`, "publishDelete not supported in multi-PC mode"), "";
|
|
7099
7114
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7100
7115
|
const i = (d = (l = this.publishingTracks) == null ? void 0 : l.find(({ msid: S }) => S === P.Audio)) == null ? void 0 : d.msid, r = (f = (h = this.publishingTracks) == null ? void 0 : h.find(({ msid: S }) => S === P.VideoLarge)) == null ? void 0 : f.msid, n = (b = (u = this.publishingTracks) == null ? void 0 : u.find(({ msid: S }) => S === P.Screen)) == null ? void 0 : b.msid, o = [];
|
|
7101
7116
|
t.screen && n ? o.push(n) : t.video && o.push(t.vMsid || r);
|
|
7102
7117
|
const c = [];
|
|
7103
|
-
t.audio && i && c.push(i),
|
|
7118
|
+
t.audio && i && c.push(i), T.event(ee.logName, "publishDelete", { streamUrl: e, aMsid: c, vMsid: o });
|
|
7104
7119
|
try {
|
|
7105
7120
|
const [S] = (yield this.rts.publishDeleteTracks([{ url: e, aMsid: c, vMsid: o }])) || [];
|
|
7106
|
-
return
|
|
7121
|
+
return T.event(ee.logName, "publishDelete", { result: S }), S && this.updatePublishingTracks(S.trackInfoList), ((m = (g = S == null ? void 0 : S.trackInfoList) == null ? void 0 : g[0]) == null ? void 0 : m.trackId) || "";
|
|
7107
7122
|
} catch (S) {
|
|
7108
7123
|
throw V.fromRtsError(S);
|
|
7109
7124
|
}
|
|
@@ -7113,7 +7128,7 @@ const xe = (ee = class extends je {
|
|
|
7113
7128
|
return _(this, null, function* () {
|
|
7114
7129
|
var o, c;
|
|
7115
7130
|
if (this.multiPC)
|
|
7116
|
-
return
|
|
7131
|
+
return T.warn(`[${ee.logName}]`, "publishReplace not supported in multi-PC mode"), "";
|
|
7117
7132
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7118
7133
|
const { vMsid: r, aMsid: n } = i != null ? i : {};
|
|
7119
7134
|
try {
|
|
@@ -7132,7 +7147,7 @@ const xe = (ee = class extends je {
|
|
|
7132
7147
|
publishAddDataChannel(e) {
|
|
7133
7148
|
return _(this, null, function* () {
|
|
7134
7149
|
if (this.multiPC)
|
|
7135
|
-
return
|
|
7150
|
+
return T.warn(`[${ee.logName}]`, "publishAddDataChannel not supported in multi-PC mode"), null;
|
|
7136
7151
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7137
7152
|
const t = yield this.rts.publishAddDatachannel({ signalUrl: e, url: this.getSuffixedUrl(e, !0), label: P.Data, msid: P.Data }), i = t == null ? void 0 : t.datachannel;
|
|
7138
7153
|
if (i && i.send) {
|
|
@@ -7144,7 +7159,7 @@ const xe = (ee = class extends je {
|
|
|
7144
7159
|
}
|
|
7145
7160
|
publishStopDataChannel(e, t) {
|
|
7146
7161
|
return _(this, null, function* () {
|
|
7147
|
-
return this.multiPC ? void
|
|
7162
|
+
return this.multiPC ? void T.warn(`[${ee.logName}]`, "publishStopDataChannel not supported in multi-PC mode") : yield this.rts.publishStopDatachannel({ url: e, datachannel: t });
|
|
7148
7163
|
});
|
|
7149
7164
|
}
|
|
7150
7165
|
unpublish() {
|
|
@@ -7197,15 +7212,15 @@ const xe = (ee = class extends je {
|
|
|
7197
7212
|
e.offerSdpHook = eo;
|
|
7198
7213
|
let t = 0;
|
|
7199
7214
|
e.beforeRetry = (m) => _(this, null, function* () {
|
|
7200
|
-
if (t++,
|
|
7215
|
+
if (t++, T.info(`[${ee.logName}]`, `before retry, retryCount: ${t}`), t >= 2 && m.url.includes("ali_prefer_media_server"))
|
|
7201
7216
|
try {
|
|
7202
7217
|
const S = new URL(m.url);
|
|
7203
|
-
S.searchParams.delete("ali_prefer_media_server"), m.url = S.toString(),
|
|
7218
|
+
S.searchParams.delete("ali_prefer_media_server"), m.url = S.toString(), T.info(`[${ee.logName}]`, `removed ali_prefer_media_server, fallback url: ${m.url}`);
|
|
7204
7219
|
} catch (S) {
|
|
7205
|
-
|
|
7220
|
+
T.error(`[${ee.logName}]`, "failed to parse url for removing ali_prefer_media_server", m.url, S);
|
|
7206
7221
|
}
|
|
7207
7222
|
return m;
|
|
7208
|
-
}), e.retryTimes = 17, e.retryInterval = 5e3,
|
|
7223
|
+
}), e.retryTimes = 17, e.retryInterval = 5e3, T.info(`[${ee.logName}]`, "http config", e);
|
|
7209
7224
|
}
|
|
7210
7225
|
httpSubscribe(e) {
|
|
7211
7226
|
return _(this, null, function* () {
|
|
@@ -7231,7 +7246,7 @@ const xe = (ee = class extends je {
|
|
|
7231
7246
|
return this.logCandidateProtocol("subscribe (preferred L1)"), o;
|
|
7232
7247
|
} catch (o) {
|
|
7233
7248
|
if (o.message === "PREFERRED_L1_TIMEOUT") {
|
|
7234
|
-
|
|
7249
|
+
T.warn(`[${ee.logName}]`, "Preferred L1 subscribe timeout, clearing preferredSubL1Ip and falling back to DNS"), this.preferredSubL1Ip = void 0;
|
|
7235
7250
|
const c = yield this.rts.subscribe(this.suffixHttpUrl(e, t), t);
|
|
7236
7251
|
return this.logCandidateProtocol("subscribe (fallback)"), c;
|
|
7237
7252
|
}
|
|
@@ -7253,7 +7268,7 @@ const xe = (ee = class extends je {
|
|
|
7253
7268
|
return this.logCandidateProtocol("publish (preferred L1)"), c;
|
|
7254
7269
|
} catch (c) {
|
|
7255
7270
|
if (c.message === "PREFERRED_L1_TIMEOUT") {
|
|
7256
|
-
|
|
7271
|
+
T.warn(`[${ee.logName}]`, "Preferred L1 publish timeout, clearing preferredPubL1Ip and falling back to DNS"), this.preferredPubL1Ip = void 0;
|
|
7257
7272
|
const l = yield this.rts.publish(this.suffixHttpUrl(e), t, i);
|
|
7258
7273
|
return this.logCandidateProtocol("publish (fallback)"), l;
|
|
7259
7274
|
}
|
|
@@ -7267,13 +7282,13 @@ const xe = (ee = class extends je {
|
|
|
7267
7282
|
subscribeAdd(e) {
|
|
7268
7283
|
return _(this, null, function* () {
|
|
7269
7284
|
var n, o, c, l;
|
|
7270
|
-
const { remoteUser: t, options: i } = e, r =
|
|
7285
|
+
const { remoteUser: t, options: i } = e, r = dt(J({ url: t.streamUrl, subAudio: !!i.audio, subVideo: !(!i.screen && !i.video) }, this.getSubConfig(t.streamInfo, i)), { targetStream: i.screen ? t.getScreenStream : t.getCameraStream });
|
|
7271
7286
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7272
7287
|
try {
|
|
7273
7288
|
return this.subscribeAddBatcher.disabled ? (yield this.subscribeAddWithRetry([r]))[0] : yield this.subscribeAddBatcher.add(r);
|
|
7274
7289
|
} catch (d) {
|
|
7275
7290
|
if ((d == null ? void 0 : d.errorCode) === 15011)
|
|
7276
|
-
return
|
|
7291
|
+
return T.info(`[${ee.logName}]`, "subscribeAdd ignored", d == null ? void 0 : d.message), null;
|
|
7277
7292
|
if (((l = (c = (o = (n = d == null ? void 0 : d.extraInfo) == null ? void 0 : n.parsedData) == null ? void 0 : o.streams) == null ? void 0 : c[0]) == null ? void 0 : l.res_code) === 508)
|
|
7278
7293
|
return this.emit("subscribeexceeds"), null;
|
|
7279
7294
|
throw V.fromRtsError(d);
|
|
@@ -7286,13 +7301,13 @@ const xe = (ee = class extends je {
|
|
|
7286
7301
|
if (this.multiPC)
|
|
7287
7302
|
return this.multiPC.subscribeDelete(e);
|
|
7288
7303
|
yield this.subscribeAddBatcher.waitForPending();
|
|
7289
|
-
const { remoteUser: t, options: i } = e, r =
|
|
7304
|
+
const { remoteUser: t, options: i } = e, r = dt(J({ url: t.streamUrl, subAudio: !!i.audio, subVideo: !(!i.screen && !i.video) }, this.getSubConfig(t.streamInfo, i)), { targetStream: i.screen ? t.getScreenStream : t.getCameraStream });
|
|
7290
7305
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7291
7306
|
try {
|
|
7292
|
-
return
|
|
7307
|
+
return T.event(`[${ee.logName}]`, "subscribeDeleteTracks", JSON.stringify({ url: r.url, subAudio: r.subAudio, subVideo: r.subVideo, aMsid: r.aMsid, vMsid: r.vMsid })), (yield this.rts.subscribeDeleteTracks([r]))[0];
|
|
7293
7308
|
} catch (d) {
|
|
7294
7309
|
if ((d == null ? void 0 : d.errorCode) === 15011)
|
|
7295
|
-
return
|
|
7310
|
+
return T.info(`[${ee.logName}]`, "subscribeDelete ignored", d == null ? void 0 : d.message), null;
|
|
7296
7311
|
if (((l = (c = (o = (n = d == null ? void 0 : d.extraInfo) == null ? void 0 : n.parsedData) == null ? void 0 : o.streams) == null ? void 0 : c[0]) == null ? void 0 : l.res_code) === 404)
|
|
7297
7312
|
return null;
|
|
7298
7313
|
throw V.fromRtsError(d);
|
|
@@ -7305,7 +7320,7 @@ const xe = (ee = class extends je {
|
|
|
7305
7320
|
subscribeAddDataChannel(e) {
|
|
7306
7321
|
return _(this, null, function* () {
|
|
7307
7322
|
if (this.multiPC)
|
|
7308
|
-
return
|
|
7323
|
+
return T.warn(`[${ee.logName}]`, "subscribeAddDataChannel not supported in multi-PC mode"), null;
|
|
7309
7324
|
yield this.subscribeAddBatcher.waitForPending(), this._dcReady || (yield this.dcConnectingPromise);
|
|
7310
7325
|
const t = yield this.rts.subscribeAddDatachannel({ signalUrl: e, url: this.getSuffixedUrl(e, !1), label: P.Data, msid: P.Data }), i = t == null ? void 0 : t.datachannel;
|
|
7311
7326
|
if (i && i.send) {
|
|
@@ -7318,7 +7333,7 @@ const xe = (ee = class extends je {
|
|
|
7318
7333
|
subscribeDeleteDatachannel(e, t) {
|
|
7319
7334
|
return _(this, null, function* () {
|
|
7320
7335
|
if (this.multiPC)
|
|
7321
|
-
return void
|
|
7336
|
+
return void T.warn(`[${ee.logName}]`, "subscribeDeleteDatachannel not supported in multi-PC mode");
|
|
7322
7337
|
let i;
|
|
7323
7338
|
yield this.subscribeAddBatcher.waitForPending();
|
|
7324
7339
|
try {
|
|
@@ -7338,7 +7353,7 @@ const xe = (ee = class extends je {
|
|
|
7338
7353
|
this._dcReady || (yield this.dcConnectingPromise);
|
|
7339
7354
|
let l, d = !1;
|
|
7340
7355
|
const { audio: h, video: f, videoSmall: u, screen: b } = this.localStreamManager.publishStreams;
|
|
7341
|
-
h && (c = yield this.publishAdd(e, h, { aMsid: P.Audio }, t), d = !0, l = P.Audio, yield
|
|
7356
|
+
h && (c = yield this.publishAdd(e, h, { aMsid: P.Audio }, t), d = !0, l = P.Audio, yield Ct(100)), f && (c = yield this.publishAdd(e, f, { vMsid: P.VideoLarge }, t), d = !1, l = P.VideoLarge, yield Ct(100)), u && (c = yield this.publishAdd(e, u, { vMsid: P.VideoSmall }, t), d = !1, l = P.VideoSmall, yield Ct(100)), b && (c = yield this.publishAdd(e, b, { isScreen: !0, vMsid: P.Screen }, t), d = !1, l = P.Screen), l && (yield this.waitPublishSender(n, d, l));
|
|
7342
7357
|
} else {
|
|
7343
7358
|
const l = yield this.httpPublish(e, t, i);
|
|
7344
7359
|
c = l.traceId, o = l.l1ip;
|
|
@@ -7376,13 +7391,13 @@ const xe = (ee = class extends je {
|
|
|
7376
7391
|
let I;
|
|
7377
7392
|
return g && !m && (I = this.rts.getSubscribeAudioStats(l.streamUrl).then((k) => {
|
|
7378
7393
|
if (k.packetsReceived > 0)
|
|
7379
|
-
m = Date.now(),
|
|
7394
|
+
m = Date.now(), T.debug(`[${ee.logName}]`, l.userId, "Stats 音频首包");
|
|
7380
7395
|
else if (!b)
|
|
7381
|
-
return E < y && (E++, new Promise((
|
|
7396
|
+
return E < y && (E++, new Promise((N) => setTimeout(() => N(w()), v)));
|
|
7382
7397
|
return !0;
|
|
7383
7398
|
})), b && !R && (I = this.rts.getSubscribeVideoStats(l.streamUrl, u).then((k) => {
|
|
7384
7399
|
if (typeof k.packetsReceived == "number")
|
|
7385
|
-
return !S && k.packetsReceived > 0 && (S = Date.now(),
|
|
7400
|
+
return !S && k.packetsReceived > 0 && (S = Date.now(), T.debug(`[${ee.logName}]`, l.userId, "Stats 视频首包")), k.framesDecoded > 0 ? (R = Date.now(), T.debug(`[${ee.logName}]`, l.userId, "Stats 视频首帧数据"), !0) : E < y ? (E++, new Promise((N) => setTimeout(() => N(w()), v))) : (T.event(`[${ee.logName}]`, l.userId, "尝试获取首帧数据失败"), !1);
|
|
7386
7401
|
})), Promise.resolve(I);
|
|
7387
7402
|
};
|
|
7388
7403
|
return w();
|
|
@@ -7412,7 +7427,7 @@ const xe = (ee = class extends je {
|
|
|
7412
7427
|
}
|
|
7413
7428
|
getDatachannelByMsid(e) {
|
|
7414
7429
|
var t;
|
|
7415
|
-
return this.multiPC ? (
|
|
7430
|
+
return this.multiPC ? (T.warn(`[${ee.logName}]`, "getDatachannelByMsid not supported in multi-PC mode"), null) : (t = this.rts.commonController.datachannelManager) == null ? void 0 : t.getByMsid(e);
|
|
7416
7431
|
}
|
|
7417
7432
|
getPCStats() {
|
|
7418
7433
|
return _(this, null, function* () {
|
|
@@ -7426,7 +7441,7 @@ const xe = (ee = class extends je {
|
|
|
7426
7441
|
try {
|
|
7427
7442
|
const r = (i = (t = this.rts.commonController) == null ? void 0 : t.peerCore) == null ? void 0 : i.pc;
|
|
7428
7443
|
if (!r)
|
|
7429
|
-
return void
|
|
7444
|
+
return void T.debug(`[${ee.logName}]`, `${e} - PC not available`);
|
|
7430
7445
|
const n = yield r.getStats();
|
|
7431
7446
|
let o, c, l, d;
|
|
7432
7447
|
n.forEach((h) => {
|
|
@@ -7435,9 +7450,9 @@ const xe = (ee = class extends je {
|
|
|
7435
7450
|
h.type !== "candidate-pair" || h.state !== "succeeded" && h.state !== "in-progress" || o || (o = h.localCandidateId, c = h.remoteCandidateId);
|
|
7436
7451
|
}), n.forEach((h) => {
|
|
7437
7452
|
h.type === "local-candidate" && h.id === o && (l = h.protocol), h.type === "remote-candidate" && h.id === c && (d = h.protocol);
|
|
7438
|
-
}),
|
|
7453
|
+
}), T.event(`[${ee.logName}]`, `${e} - Candidate Protocol: local=${l || "unknown"}, remote=${d || "unknown"}`);
|
|
7439
7454
|
} catch (r) {
|
|
7440
|
-
|
|
7455
|
+
T.warn(`[${ee.logName}]`, `${e} - Failed to get candidate protocol:`, r);
|
|
7441
7456
|
}
|
|
7442
7457
|
});
|
|
7443
7458
|
}
|
|
@@ -7447,7 +7462,7 @@ const xe = (ee = class extends je {
|
|
|
7447
7462
|
});
|
|
7448
7463
|
}
|
|
7449
7464
|
}, p(ee, "logName", "RtsManager"), ee);
|
|
7450
|
-
Ue([
|
|
7465
|
+
Ue([C(B)], xe.prototype, "startConnect", 1), Ue([C()], xe.prototype, "updatePublishingTracks", 1), Ue([C(B, B)], xe.prototype, "httpPublish", 1), Ue([C(B, B)], xe.prototype, "waitPublishSender", 1), Ue([C(([a, s, e]) => [a, JSON.stringify(e)], B)], xe.prototype, "publishAdd", 1), Ue([C(B, B)], xe.prototype, "publishDelete", 1), Ue([C(([a, s, e]) => [a, JSON.stringify(e)])], xe.prototype, "publishReplace", 1), Ue([C(B)], xe.prototype, "publishStop", 1), Ue([C(B)], xe.prototype, "publishAddDataChannel", 1), Ue([C(B)], xe.prototype, "publishStopDataChannel", 1), Ue([C()], xe.prototype, "unpublish", 1), Ue([C(ki, ({ traceId: a }) => a)], xe.prototype, "httpSubscribe", 1), Ue([C(ki, ({ traceId: a }) => a)], xe.prototype, "subscribeAdd", 1), Ue([C(ki)], xe.prototype, "subscribeDelete", 1), Ue([C(B)], xe.prototype, "subscribeAddDataChannel", 1), Ue([C(B)], xe.prototype, "subscribeDeleteDatachannel", 1), Ue([C(B)], xe.prototype, "publish", 1), Ue([C(ki)], xe.prototype, "subscribe", 1), Ue([C()], xe.prototype, "sendSEI", 1);
|
|
7451
7466
|
let Dc = xe;
|
|
7452
7467
|
class gr {
|
|
7453
7468
|
constructor(s = Cr) {
|
|
@@ -7530,7 +7545,7 @@ class an extends je {
|
|
|
7530
7545
|
return _(this, null, function* () {
|
|
7531
7546
|
var o, c, l, d, h, f;
|
|
7532
7547
|
const { videoTrack: r, audioTrack: n } = e;
|
|
7533
|
-
r && ((o = this.originVideoTrack) == null || o.removeEventListener("ended", this.onVideoTrackEnded)), n && ((c = this.originAudioTrack) == null || c.removeEventListener("ended", this.onAudioTrackEnded)), this.type === Oe.AliRtcSdkStreamTypeScreen ? this.stop() : (r && ((l = this.originVideoTrack) == null || l.stop()), n && ((d = this.originAudioTrack) == null || d.stop())), r && (this.originVideoTrack = r, (h = this.originVideoTrack) == null || h.addEventListener("ended", this.onVideoTrackEnded), this.videoSource = t || Si.Camera, this.updateVideoTrack(r)), n && (this.originAudioTrack = n, (f = this.originAudioTrack) == null || f.addEventListener("ended", this.onAudioTrackEnded), this.audioSource = i ||
|
|
7548
|
+
r && ((o = this.originVideoTrack) == null || o.removeEventListener("ended", this.onVideoTrackEnded)), n && ((c = this.originAudioTrack) == null || c.removeEventListener("ended", this.onAudioTrackEnded)), this.type === Oe.AliRtcSdkStreamTypeScreen ? this.stop() : (r && ((l = this.originVideoTrack) == null || l.stop()), n && ((d = this.originAudioTrack) == null || d.stop())), r && (this.originVideoTrack = r, (h = this.originVideoTrack) == null || h.addEventListener("ended", this.onVideoTrackEnded), this.videoSource = t || Si.Camera, this.updateVideoTrack(r)), n && (this.originAudioTrack = n, (f = this.originAudioTrack) == null || f.addEventListener("ended", this.onAudioTrackEnded), this.audioSource = i || Li.Microphone, this.updateAudioTrack(n));
|
|
7534
7549
|
});
|
|
7535
7550
|
}
|
|
7536
7551
|
get currentProfile() {
|
|
@@ -7648,12 +7663,12 @@ class an extends je {
|
|
|
7648
7663
|
return t > -1 && (e.clear(this), this.plugins.splice(t, 1), !0);
|
|
7649
7664
|
}
|
|
7650
7665
|
}
|
|
7651
|
-
var Mc = Object.defineProperty,
|
|
7652
|
-
for (var i, r = t > 1 ? void 0 : t ?
|
|
7666
|
+
var Mc = Object.defineProperty, Nc = Object.getOwnPropertyDescriptor, gt = (a, s, e, t) => {
|
|
7667
|
+
for (var i, r = t > 1 ? void 0 : t ? Nc(s, e) : s, n = a.length - 1; n >= 0; n--)
|
|
7653
7668
|
(i = a[n]) && (r = (t ? i(s, e, r) : i(r)) || r);
|
|
7654
7669
|
return t && r && Mc(s, e, r), r;
|
|
7655
7670
|
}, xt;
|
|
7656
|
-
const
|
|
7671
|
+
const ut = (xt = class extends je {
|
|
7657
7672
|
constructor(e, t) {
|
|
7658
7673
|
super();
|
|
7659
7674
|
p(this, "pluginManager");
|
|
@@ -7675,12 +7690,12 @@ const ht = (xt = class extends je {
|
|
|
7675
7690
|
})), this.screenStreamInfo.on("videotrackended", () => _(this, null, function* () {
|
|
7676
7691
|
yield this.stopLocalStream({ screen: !0 }), this.emit("trackended", Yt.ScreenTrackEnded);
|
|
7677
7692
|
})), this.pluginManager.on("added", (i) => _(this, null, function* () {
|
|
7678
|
-
if (
|
|
7693
|
+
if (T.info(`[${xt.logName}]`, "plugin added", i.name), !i.isSupported("7.2.7"))
|
|
7679
7694
|
return console.warn(`${i.name} is not supported!!!`), void i.emit("unsupported");
|
|
7680
7695
|
try {
|
|
7681
7696
|
yield i.init();
|
|
7682
7697
|
} catch (r) {
|
|
7683
|
-
i.emit("error", V.fromError(r,
|
|
7698
|
+
i.emit("error", V.fromError(r, Lt.AliRtcPluginErrorInitError));
|
|
7684
7699
|
}
|
|
7685
7700
|
i.streamType === Oe.AliRtcSdkStreamTypeCapture && (this.cameraStreamInfo.addPlugin(i), yield this.cameraStreamInfo.process(this.streamInfos)), i.streamType === Oe.AliRtcSdkStreamTypeScreen && (this.screenStreamInfo.addPlugin(i), yield this.screenStreamInfo.process(this.streamInfos)), this.emit("publishupdate");
|
|
7686
7701
|
})), this.pluginManager.on("removed", (i) => _(this, null, function* () {
|
|
@@ -7781,18 +7796,18 @@ const ht = (xt = class extends je {
|
|
|
7781
7796
|
i || (o === !0 && this.cameraStreamInfo.cameraVideoConstraints ? (yield this.setAvailableCameraDeviceId(), o = J({}, this.cameraStreamInfo.cameraVideoConstraints)) : typeof o == "object" && (yield this.setAvailableCameraDeviceId(), o = J(J({}, o), this.cameraStreamInfo.cameraVideoConstraints)), c === void 0 && this.audioCaptureDisabled ? c = !1 : c && (c === !0 && this.cameraStreamInfo.micAudioConstraints ? (yield this.setAvailableMicrophoneDeviceId(), c = J({}, this.cameraStreamInfo.micAudioConstraints)) : typeof c == "object" && (yield this.setAvailableMicrophoneDeviceId(), c = J(J({}, c), this.cameraStreamInfo.micAudioConstraints)), this._audioCaptureDisabled = !1));
|
|
7782
7797
|
const f = Date.now();
|
|
7783
7798
|
try {
|
|
7784
|
-
d = yield fe.createStream({ audio: c, video: o, screen: t, custom: !!i, mediaStream: i, skipProfile: !0 }),
|
|
7799
|
+
d = yield fe.createStream({ audio: c, video: o, screen: t, custom: !!i, mediaStream: i, skipProfile: !0 }), T.info(`[${xt.logName}]`, "createLocalStream", { audio: c, video: o, screen: t, custom: !!i, time: Date.now() - f }), c && !i && this.slsReporter.reportAudio(null, Date.now() - f, ((h = d == null ? void 0 : d.audioTrack) == null ? void 0 : h.label) || ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - f);
|
|
7785
7800
|
} catch (u) {
|
|
7786
7801
|
throw c && !i && this.slsReporter.reportAudio(u, Date.now() - f, ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - f), u;
|
|
7787
7802
|
}
|
|
7788
7803
|
if (t)
|
|
7789
|
-
yield this.screenStreamInfo.updateSource(d, Si.Screen,
|
|
7790
|
-
else if (yield this.cameraStreamInfo.updateSource(d, Si.Camera,
|
|
7804
|
+
yield this.screenStreamInfo.updateSource(d, Si.Screen, Li.Screen), yield this.setScreenProfile(n || En), this.setScreenContentHint(), this.publishingScreenVideoStream = void 0;
|
|
7805
|
+
else if (yield this.cameraStreamInfo.updateSource(d, Si.Camera, Li.Microphone), d.hasVideo && (yield this.setVideoProfile(r || _n), this.setVideoContentHint(), this.publishingCameraVideoStream = void 0), d.hasAudio && typeof c == "boolean") {
|
|
7791
7806
|
const u = this.cameraStreamInfo.audioProfile;
|
|
7792
7807
|
u && (yield d.setAudioProfile(u));
|
|
7793
7808
|
}
|
|
7794
7809
|
}
|
|
7795
|
-
return fe.SystenUtil.isIos && fe.SystenUtil.compareVersion("15.1") && !fe.SystenUtil.compareVersion("15.2") && (yield
|
|
7810
|
+
return fe.SystenUtil.isIos && fe.SystenUtil.compareVersion("15.1") && !fe.SystenUtil.compareVersion("15.2") && (yield Ct(1e3)), yield this.updateStreams(), d;
|
|
7796
7811
|
});
|
|
7797
7812
|
}
|
|
7798
7813
|
stopLocalStream(e) {
|
|
@@ -7813,7 +7828,7 @@ const ht = (xt = class extends je {
|
|
|
7813
7828
|
const o = this.publishStreams;
|
|
7814
7829
|
try {
|
|
7815
7830
|
if (!(o.audio || o.video || o.videoSmall || o.screen))
|
|
7816
|
-
throw
|
|
7831
|
+
throw T.error(`[${xt.logName}]`, "no tracks founded"), new V(U.ERR_SDK_PUBLISH_INVAILD, "no tracks founded");
|
|
7817
7832
|
const f = new MediaStream();
|
|
7818
7833
|
(c = o.audio) != null && c.audioTrack && f.addTrack(o.audio.audioTrack), (l = o.video) != null && l.videoTrack ? (f.addTrack(o.video.videoTrack), i = o.videoSmall, r = o.screen) : (d = o.screen) != null && d.videoTrack && (t = P.Screen, f.addTrack((h = o.screen) == null ? void 0 : h.videoTrack), n = !0), e = yield Cn(f), n ? (this.screenStreamInfo.cloneVideoProfile(e), this.publishingScreenVideoStream = e) : (this.cameraStreamInfo.cloneVideoProfile(e), this.publishingCameraVideoStream = e), this.cameraStreamInfo.cloneAudioProfile(e);
|
|
7819
7834
|
} catch (f) {
|
|
@@ -7855,11 +7870,11 @@ const ht = (xt = class extends je {
|
|
|
7855
7870
|
this.cameraStreamInfo.micAudioConstraints = J(J({}, (t = this.cameraStreamInfo.micAudioConstraints) != null ? t : {}), e);
|
|
7856
7871
|
}
|
|
7857
7872
|
}, p(xt, "logName", "LocalStreamManager"), xt);
|
|
7858
|
-
|
|
7873
|
+
gt([C(([a]) => {
|
|
7859
7874
|
const { audio: s, video: e, screen: t, custom: i, skipProfile: r, videoProfile: n, screenProfile: o } = a;
|
|
7860
7875
|
return [{ audio: s, video: e, screen: t, custom: i, skipProfile: r, videoProfile: n, screenProfile: o }];
|
|
7861
|
-
})],
|
|
7862
|
-
let
|
|
7876
|
+
})], ut.prototype, "createLocalStream", 1), gt([C(B)], ut.prototype, "stopLocalStream", 1), gt([C()], ut.prototype, "createHTTPPublishStream", 1), gt([C()], ut.prototype, "stop", 1), gt([C(B)], ut.prototype, "setVideoProfile", 1), gt([C(B)], ut.prototype, "setVideoContentHint", 1), gt([C(B)], ut.prototype, "setAudioProfile", 1), gt([C(B)], ut.prototype, "setScreenProfile", 1), gt([C(B)], ut.prototype, "setScreenContentHint", 1), gt([C(B)], ut.prototype, "setCameraVideoConstraints", 1), gt([C(B)], ut.prototype, "setMicAudioConstraints", 1);
|
|
7877
|
+
let Lc = ut;
|
|
7863
7878
|
var xc = ((a) => (a[a.PRE_PROCESSOR = 0] = "PRE_PROCESSOR", a[a.POST_PROCESSOR = 1] = "POST_PROCESSOR", a))(xc || {}), Ai = ((a) => (a[a.AUDIO = 0] = "AUDIO", a[a.VIDEO = 1] = "VIDEO", a[a.BOTH = 2] = "BOTH", a))(Ai || {});
|
|
7864
7879
|
class Ut extends je {
|
|
7865
7880
|
constructor(e, t = Oe.AliRtcSdkStreamTypeCapture, i = 1) {
|
|
@@ -8224,7 +8239,7 @@ function si(a, s, e, t) {
|
|
|
8224
8239
|
c((t = t.apply(a, s || [])).next());
|
|
8225
8240
|
});
|
|
8226
8241
|
}
|
|
8227
|
-
var
|
|
8242
|
+
var Nt, vt;
|
|
8228
8243
|
function nn() {
|
|
8229
8244
|
return si(this, void 0, void 0, function* () {
|
|
8230
8245
|
let a = !1;
|
|
@@ -8238,30 +8253,30 @@ function nn() {
|
|
|
8238
8253
|
return console.log("isSupportedSIMD", a), a;
|
|
8239
8254
|
});
|
|
8240
8255
|
}
|
|
8241
|
-
typeof SuppressedError == "function" && SuppressedError, (vt =
|
|
8256
|
+
typeof SuppressedError == "function" && SuppressedError, (vt = Nt || (Nt = {}))[vt.ERROR = 0] = "ERROR", vt[vt.WARN = 1] = "WARN", vt[vt.INFO = 2] = "INFO", vt[vt.LOG = 3] = "LOG", vt[vt.DEBUG = 4] = "DEBUG";
|
|
8242
8257
|
class ye {
|
|
8243
8258
|
static error(...s) {
|
|
8244
8259
|
var e;
|
|
8245
|
-
ye.logLevel >=
|
|
8260
|
+
ye.logLevel >= Nt.ERROR && ((e = console.error) === null || e === void 0 || e.call(console, `[${ye.logTag}] `, ...s));
|
|
8246
8261
|
}
|
|
8247
8262
|
static warn(...s) {
|
|
8248
8263
|
var e;
|
|
8249
|
-
ye.logLevel >=
|
|
8264
|
+
ye.logLevel >= Nt.WARN && ((e = console.warn) === null || e === void 0 || e.call(console, `[${ye.logTag}] `, ...s));
|
|
8250
8265
|
}
|
|
8251
8266
|
static info(...s) {
|
|
8252
8267
|
var e;
|
|
8253
|
-
ye.logLevel >=
|
|
8268
|
+
ye.logLevel >= Nt.INFO && ((e = console.info) === null || e === void 0 || e.call(console, `[${ye.logTag}] `, ...s));
|
|
8254
8269
|
}
|
|
8255
8270
|
static log(...s) {
|
|
8256
8271
|
var e;
|
|
8257
|
-
ye.logLevel >=
|
|
8272
|
+
ye.logLevel >= Nt.LOG && ((e = console.log) === null || e === void 0 || e.call(console, `[${ye.logTag}] `, ...s));
|
|
8258
8273
|
}
|
|
8259
8274
|
static debug(...s) {
|
|
8260
8275
|
var e;
|
|
8261
|
-
ye.logLevel >=
|
|
8276
|
+
ye.logLevel >= Nt.DEBUG && ((e = console.debug) === null || e === void 0 || e.call(console, `[${ye.logTag}] `, ...s));
|
|
8262
8277
|
}
|
|
8263
8278
|
}
|
|
8264
|
-
ye.logLevel =
|
|
8279
|
+
ye.logLevel = Nt.WARN, ye.logTag = "aliyun-audio-3a";
|
|
8265
8280
|
class Fc {
|
|
8266
8281
|
}
|
|
8267
8282
|
class on extends Fc {
|
|
@@ -8547,7 +8562,7 @@ const kr = (Ot = class extends je {
|
|
|
8547
8562
|
if (this.sendReadyMsg && !this.readyMsgSuccess)
|
|
8548
8563
|
try {
|
|
8549
8564
|
const n = new TextDecoder().decode(t.data), o = JSON.parse(n);
|
|
8550
|
-
o.key === "aliyun_aigc" && o.type === "ready_resp" && ((i = o.data) == null ? void 0 : i.ready) === !0 && (
|
|
8565
|
+
o.key === "aliyun_aigc" && o.type === "ready_resp" && ((i = o.data) == null ? void 0 : i.ready) === !0 && (T.event(`[${Ot.logName}]`, "onCheckReadyMsg success"), this.readyMsgSuccess = !0, this.emit("dcready", e), (r = this.remoteUser) == null || r.off("remoteDataChannelMessage", this.onCheckReadyMsg), window.clearTimeout(this.sendReadyMsgTimer));
|
|
8551
8566
|
} catch (n) {
|
|
8552
8567
|
}
|
|
8553
8568
|
});
|
|
@@ -8560,7 +8575,7 @@ const kr = (Ot = class extends je {
|
|
|
8560
8575
|
this.self.off("dataPublishStateChanged", this.onDataPublishStateChange), window.clearTimeout(this.sendReadyMsgTimer), this.remoteUser = void 0, this.sendReadyMsg = !1, this.hasPubDataChannel = !1, this.hasSubDataChannel = !1, this.readyMsgSuccess = !1, this.startReadyMsgTime = 0;
|
|
8561
8576
|
}
|
|
8562
8577
|
trySendReadyMsg() {
|
|
8563
|
-
|
|
8578
|
+
T.event(`[${Ot.logName}]`, `trySendReadyMsg: pub(${this.hasPubDataChannel}, sub: ${this.hasSubDataChannel})`), this.hasPubDataChannel && this.hasSubDataChannel && (this.sendReadyMsg = !0, this.sendReadyMsgLoop());
|
|
8564
8579
|
}
|
|
8565
8580
|
sendReadyMsgLoop(e = 0) {
|
|
8566
8581
|
return _(this, null, function* () {
|
|
@@ -8572,13 +8587,13 @@ const kr = (Ot = class extends je {
|
|
|
8572
8587
|
this.startReadyMsgTime || (this.startReadyMsgTime = Date.now());
|
|
8573
8588
|
let i = 50;
|
|
8574
8589
|
const r = Date.now() - this.startReadyMsgTime;
|
|
8575
|
-
i = r < 1e3 ? 50 : r < 2e3 ? 100 : r < 3e3 ? 500 : 2e3, e > 30 ?
|
|
8590
|
+
i = r < 1e3 ? 50 : r < 2e3 ? 100 : r < 3e3 ? 500 : 2e3, e > 30 ? T.event(`[${Ot.logName}]`, "sendReadyMsgLoop fail after 30 times") : this.sendReadyMsgTimer = window.setTimeout(() => {
|
|
8576
8591
|
this.sendReadyMsgLoop(e + 1);
|
|
8577
8592
|
}, i);
|
|
8578
8593
|
});
|
|
8579
8594
|
}
|
|
8580
8595
|
}, p(Ot, "logName", "DataChannelReadyHelper"), Ot);
|
|
8581
|
-
cn([
|
|
8596
|
+
cn([C()], kr.prototype, "destroy", 1), cn([C()], kr.prototype, "sendReadyMsgLoop", 1);
|
|
8582
8597
|
let zc = kr;
|
|
8583
8598
|
class Kc {
|
|
8584
8599
|
constructor(s) {
|
|
@@ -8679,7 +8694,7 @@ class Kc {
|
|
|
8679
8694
|
const c = ii(s, "useSysAutoGainControl");
|
|
8680
8695
|
c !== void 0 && (this.useSysAutoGainControl = c);
|
|
8681
8696
|
}
|
|
8682
|
-
|
|
8697
|
+
T.info("setAudio3AConfig:", "enableSoft3A", this.enableSoft3A, ", enableSoft3ACheck", this.enableSoft3ACheck, ", useAIAEC", this.useAIAEC, ", useSysNoiseSuppression", this.useSysNoiseSuppression, ", useSysEchoCancellation", this.useSysEchoCancellation, ", useSysAutoGainControl", this.useSysAutoGainControl);
|
|
8683
8698
|
}
|
|
8684
8699
|
}
|
|
8685
8700
|
}
|
|
@@ -8723,7 +8738,7 @@ class Je extends je {
|
|
|
8723
8738
|
p(this, "dcReadyHelper");
|
|
8724
8739
|
p(this, "networkQualityTimer");
|
|
8725
8740
|
const { signalingManager: t, slsReporter: i, parameter: r } = e;
|
|
8726
|
-
this.signalingManager = t, this.addSignalingManagerListener(), this.slsReporter = i, r && (this.parameter = r), this.pluginManager = new Ec(), this.localStreamManager = new
|
|
8741
|
+
this.signalingManager = t, this.addSignalingManagerListener(), this.slsReporter = i, r && (this.parameter = r), this.pluginManager = new Ec(), this.localStreamManager = new Lc(this.pluginManager, this.slsReporter), this.rtsManager = new Dc(this.localStreamManager, this.slsReporter, this.parameter), this.addRTSListener(), this.self = new Sc({ rtsManager: this.rtsManager, localStreamManager: this.localStreamManager, slsReporter: this.slsReporter, signalingManager: this.signalingManager, pluginManager: this.pluginManager, audioVolumeIndicationInterval: this.audioVolumeIndicationInterval, parameter: this.parameter }), this.audioMixerPlugin = new Bc(), this.pluginManager.add(this.audioMixerPlugin), this.dualVideoPlugin = new Hc("dualVideoPlugin"), new fe.SupportUtil().checkScreenCapture() && this.pluginManager.add(new Oc());
|
|
8727
8742
|
}
|
|
8728
8743
|
addSignalingManagerListener() {
|
|
8729
8744
|
this.signalingManager.on("onNotifyPublish", (e) => {
|
|
@@ -8739,7 +8754,7 @@ class Je extends je {
|
|
|
8739
8754
|
console.error("Failed to parse userdata:", o);
|
|
8740
8755
|
}
|
|
8741
8756
|
});
|
|
8742
|
-
}), this.slsReporter.reportConnectionLatencyEvent(qe.RECV_NOTIFY_PUBLISH, "", "", ""),
|
|
8757
|
+
}), this.slsReporter.reportConnectionLatencyEvent(qe.RECV_NOTIFY_PUBLISH, "", "", ""), T.event("[Signaling] Notify Publish ", e), e.forEach((t) => {
|
|
8743
8758
|
this.onRemotePublishStateChange(t);
|
|
8744
8759
|
});
|
|
8745
8760
|
});
|
|
@@ -8760,7 +8775,7 @@ class Je extends je {
|
|
|
8760
8775
|
const r = this.remoteUsers.find((n) => ke.removeQueryString(n.streamUrl) === ke.removeQueryString(t || ""));
|
|
8761
8776
|
r == null || r.markReconnect(i);
|
|
8762
8777
|
}), this.rtsManager.on("reconnectFinish", (e, t, i) => {
|
|
8763
|
-
if (
|
|
8778
|
+
if (T.event("[RtsManager]", "reconnectFinish", e, t, i), !e || e === "pc" || e === "all")
|
|
8764
8779
|
return this.self.markReconnected(), void this.remoteUsers.forEach((n) => {
|
|
8765
8780
|
n.markReconnected();
|
|
8766
8781
|
});
|
|
@@ -9007,7 +9022,7 @@ class Je extends je {
|
|
|
9007
9022
|
e.forEach((n) => {
|
|
9008
9023
|
n.userid && (this.userMap[n.userid] ? i.push(n) : t.push(n));
|
|
9009
9024
|
});
|
|
9010
|
-
const r = Object.keys(this.userMap).filter((n) => !e.find((o) => o.userid === n)).map((n) => ({ userid: n, reason: "", leavecode:
|
|
9025
|
+
const r = Object.keys(this.userMap).filter((n) => !e.find((o) => o.userid === n)).map((n) => ({ userid: n, reason: "", leavecode: Lr.AliRtcUserOfflineQuit }));
|
|
9011
9026
|
return { joinList: t, leaveList: r, presentList: i };
|
|
9012
9027
|
}
|
|
9013
9028
|
getRemoteUser(e) {
|
|
@@ -9090,7 +9105,7 @@ class Je extends je {
|
|
|
9090
9105
|
this.audio3AConfig.enableSoft3ACheck && (e = 1e4), setTimeout(() => {
|
|
9091
9106
|
this.audioProcessorPlugin || (this.audioProcessorPlugin = new jc({ dumpAudioData: this.audio3AConfig.dumpAudioData, aiaecOn: this.audio3AConfig.useAIAEC, slsReporter: this.slsReporter, enableSoft3ACheck: this.audio3AConfig.enableSoft3ACheck, useHardOnly: this.audio3AConfig.useHardOnly })), this.audioProcessorPlugin && !this.pluginManager.has(this.audioProcessorPlugin.name) && (this.audioProcessorPlugin.on("error", ({ message: t }) => {
|
|
9092
9107
|
var i;
|
|
9093
|
-
|
|
9108
|
+
T.error("audioProcessorPlugin error:", t), (i = this.self.audioTrack) == null || i.applyConstraints({ echoCancellation: !0, noiseSuppression: !0, autoGainControl: !0 });
|
|
9094
9109
|
}), this.pluginManager.add(this.audioProcessorPlugin));
|
|
9095
9110
|
}, e);
|
|
9096
9111
|
} else
|
|
@@ -9105,12 +9120,12 @@ class Je extends je {
|
|
|
9105
9120
|
}
|
|
9106
9121
|
}
|
|
9107
9122
|
p(Je, "logName", "BizControl");
|
|
9108
|
-
it([
|
|
9123
|
+
it([C()], Je.prototype, "init", 1), it([C()], Je.prototype, "leave", 1), it([C()], Je.prototype, "clear", 1), it([C(B)], Je.prototype, "addUser", 1), it([C()], Je.prototype, "removeLeftUser", 1), it([C()], Je.prototype, "diffUsers", 1), it([C(B)], Je.prototype, "updateAudioWant", 1), it([C(B)], Je.prototype, "updateVideoWant", 1), it([C(B)], Je.prototype, "updateScreenWant", 1), it([C()], Je.prototype, "stopIndication", 1), it([C()], Je.prototype, "startIndication", 1), it([C(B)], Je.prototype, "setEnableDualVideoStream", 1), it([C(B)], Je.prototype, "setAudioVolume", 1), it([C()], Je.prototype, "enableAudioVolumeIndication", 1);
|
|
9109
9124
|
var Ui = ((a) => (a[a.LiveTranscodingSingle = 0] = "LiveTranscodingSingle", a[a.LiveTranscodingMix = 1] = "LiveTranscodingMix", a))(Ui || {}), Pn = ((a) => (a[a.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", a[a.LiveTranscodingAudio = 1] = "LiveTranscodingAudio", a[a.LiveTranscodingVideo = 2] = "LiveTranscodingVideo", a))(Pn || {}), yi = ((a) => (a[a.LiveTranscodingCamera = 0] = "LiveTranscodingCamera", a[a.LiveTranscodingShareScreen = 1] = "LiveTranscodingShareScreen", a))(yi || {});
|
|
9110
9125
|
const gi = { 0: "camera", 1: "shareScreen" };
|
|
9111
9126
|
var Dn = ((a) => (a[a.LiveTranscoding_Profile_1IN_1080P = 0] = "LiveTranscoding_Profile_1IN_1080P", a[a.LiveTranscoding_Profile_1IN_720P = 1] = "LiveTranscoding_Profile_1IN_720P", a[a.LiveTranscoding_Profile_1IN_360P = 2] = "LiveTranscoding_Profile_1IN_360P", a[a.LiveTranscoding_Profile_2IN_1080P = 3] = "LiveTranscoding_Profile_2IN_1080P", a[a.LiveTranscoding_Profile_2IN_720P = 4] = "LiveTranscoding_Profile_2IN_720P", a[a.LiveTranscoding_Profile_2IN_360P = 5] = "LiveTranscoding_Profile_2IN_360P", a[a.LiveTranscoding_Profile_4IN_1080P = 6] = "LiveTranscoding_Profile_4IN_1080P", a[a.LiveTranscoding_Profile_4IN_720P = 7] = "LiveTranscoding_Profile_4IN_720P", a[a.LiveTranscoding_Profile_4IN_360P = 8] = "LiveTranscoding_Profile_4IN_360P", a[a.LiveTranscoding_Profile_9IN_1080P = 9] = "LiveTranscoding_Profile_9IN_1080P", a[a.LiveTranscoding_Profile_9IN_720P = 10] = "LiveTranscoding_Profile_9IN_720P", a[a.LiveTranscoding_Profile_9IN_360P = 11] = "LiveTranscoding_Profile_9IN_360P", a[a.LiveTranscoding_Profile_12IN_1080P = 12] = "LiveTranscoding_Profile_12IN_1080P", a[a.LiveTranscoding_Profile_12IN_720P = 13] = "LiveTranscoding_Profile_12IN_720P", a[a.LiveTranscoding_Profile_12IN_360P = 14] = "LiveTranscoding_Profile_12IN_360P", a[a.LiveTranscoding_Profile_16IN_1080P = 15] = "LiveTranscoding_Profile_16IN_1080P", a[a.LiveTranscoding_Profile_16IN_720P = 16] = "LiveTranscoding_Profile_16IN_720P", a[a.LiveTranscoding_Profile_16IN_360P = 17] = "LiveTranscoding_Profile_16IN_360P", a[a.LiveTranscoding_Profile_Mixed = 9999] = "LiveTranscoding_Profile_Mixed", a))(Dn || {});
|
|
9112
9127
|
const Gc = { 0: "1IN_1080P", 1: "1IN_720P", 2: "1IN_360P", 3: "2IN_1080P", 4: "2IN_720P", 5: "2IN_360P", 6: "4IN_1080P", 7: "4IN_720P", 8: "4IN_360P", 9: "9IN_1080P", 10: "9IN_720P", 11: "9IN_360P", 12: "12IN_1080P", 13: "12IN_720P", 14: "12IN_360P", 15: "16IN_1080P", 16: "16IN_720P", 17: "16IN_360P", 9999: "Mixed_Audio" };
|
|
9113
|
-
var Fr = ((a) => (a[a.LiveTranscoding_HZ_48000 = 48e3] = "LiveTranscoding_HZ_48000", a[a.LiveTranscoding_HZ_44100 = 44100] = "LiveTranscoding_HZ_44100", a[a.LiveTranscoding_HZ_32000 = 32e3] = "LiveTranscoding_HZ_32000", a[a.LiveTranscoding_HZ_16000 = 16e3] = "LiveTranscoding_HZ_16000", a[a.LiveTranscoding_HZ_8000 = 8e3] = "LiveTranscoding_HZ_8000", a))(Fr || {}), Bi = ((a) => (a[a.LiveTranscodingNoBody = 0] = "LiveTranscodingNoBody", a[a.LiveTranscodingBody = 1] = "LiveTranscodingBody", a))(Bi || {}), zi = ((a) => (a[a.NOTO_SERIF_CJKSC_REGULAR = 0] = "NOTO_SERIF_CJKSC_REGULAR", a[a.ALIBABA_PUHUITI_REGULAR = 1] = "ALIBABA_PUHUITI_REGULAR", a[a.ALIBABA_PUHUITI_BOLD = 2] = "ALIBABA_PUHUITI_BOLD", a[a.ALIBABA_PUHUITI_Heavy = 3] = "ALIBABA_PUHUITI_Heavy", a[a.ALIBABA_PUHUITI_LIGHT = 4] = "ALIBABA_PUHUITI_LIGHT", a[a.ALIBABA_PUHUITI_MEDIUM = 5] = "ALIBABA_PUHUITI_MEDIUM", a))(zi || {}), Mn = ((a) => (a[a.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", a[a.LiveTranscodingCrop = 1] = "LiveTranscodingCrop", a[a.LiveTranscodingFill = 2] = "LiveTranscodingFill", a))(Mn || {}), jr = ((a) => (a[a.LiveTranscodingNormal = 0] = "LiveTranscodingNormal", a[a.LiveTranscodingVirtualBackground = 1] = "LiveTranscodingVirtualBackground", a))(jr || {}),
|
|
9128
|
+
var Fr = ((a) => (a[a.LiveTranscoding_HZ_48000 = 48e3] = "LiveTranscoding_HZ_48000", a[a.LiveTranscoding_HZ_44100 = 44100] = "LiveTranscoding_HZ_44100", a[a.LiveTranscoding_HZ_32000 = 32e3] = "LiveTranscoding_HZ_32000", a[a.LiveTranscoding_HZ_16000 = 16e3] = "LiveTranscoding_HZ_16000", a[a.LiveTranscoding_HZ_8000 = 8e3] = "LiveTranscoding_HZ_8000", a))(Fr || {}), Bi = ((a) => (a[a.LiveTranscodingNoBody = 0] = "LiveTranscodingNoBody", a[a.LiveTranscodingBody = 1] = "LiveTranscodingBody", a))(Bi || {}), zi = ((a) => (a[a.NOTO_SERIF_CJKSC_REGULAR = 0] = "NOTO_SERIF_CJKSC_REGULAR", a[a.ALIBABA_PUHUITI_REGULAR = 1] = "ALIBABA_PUHUITI_REGULAR", a[a.ALIBABA_PUHUITI_BOLD = 2] = "ALIBABA_PUHUITI_BOLD", a[a.ALIBABA_PUHUITI_Heavy = 3] = "ALIBABA_PUHUITI_Heavy", a[a.ALIBABA_PUHUITI_LIGHT = 4] = "ALIBABA_PUHUITI_LIGHT", a[a.ALIBABA_PUHUITI_MEDIUM = 5] = "ALIBABA_PUHUITI_MEDIUM", a))(zi || {}), Mn = ((a) => (a[a.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", a[a.LiveTranscodingCrop = 1] = "LiveTranscodingCrop", a[a.LiveTranscodingFill = 2] = "LiveTranscodingFill", a))(Mn || {}), jr = ((a) => (a[a.LiveTranscodingNormal = 0] = "LiveTranscodingNormal", a[a.LiveTranscodingVirtualBackground = 1] = "LiveTranscodingVirtualBackground", a))(jr || {}), Nn = ((a) => (a[a.LiveTranscodingState_IDLE = 0] = "LiveTranscodingState_IDLE", a[a.LiveTranscodingState_CONNNECT = 1] = "LiveTranscodingState_CONNNECT", a[a.LiveTranscodingState_RUNNING = 2] = "LiveTranscodingState_RUNNING", a[a.LiveTranscodingState_RECOVERING = 3] = "LiveTranscodingState_RECOVERING", a[a.LiveTranscodingState_FAILURE = 4] = "LiveTranscodingState_FAILURE", a[a.LiveTranscodingState_END = 5] = "LiveTranscodingState_END", a))(Nn || {}), It = ((a) => (a[a.LiveTranscodingErrorPublishOk = 0] = "LiveTranscodingErrorPublishOk", a[a.LiveTranscodingErrorStreamNotFound = 17825793] = "LiveTranscodingErrorStreamNotFound", a[a.LiveTranscodingErrorStreamAlreadyExist = 17825794] = "LiveTranscodingErrorStreamAlreadyExist", a[a.LiveTranscodingErrorInvalidParam = 17825795] = "LiveTranscodingErrorInvalidParam", a[a.LiveTranscodingErrorInternalError = 17825796] = "LiveTranscodingErrorInternalError", a[a.LiveTranscodingErrorRtmpServerError = 17825797] = "LiveTranscodingErrorRtmpServerError", a[a.LiveTranscodingErrorRtmpStreamUrlError = 17825798] = "LiveTranscodingErrorRtmpStreamUrlError", a[a.LiveTranscodingErrorPublishTimeout = 17825799] = "LiveTranscodingErrorPublishTimeout", a[a.LiveTranscodingErrorNotAuthorized = 17825800] = "LiveTranscodingErrorNotAuthorized", a))(It || {}), Ln = ((a) => (a[a.TrascodingPublishTaskStatusStart = 0] = "TrascodingPublishTaskStatusStart", a[a.TrascodingPublishTaskStatusUpdate = 1] = "TrascodingPublishTaskStatusUpdate", a[a.TrascodingPublishTaskStatusStop = 2] = "TrascodingPublishTaskStatusStop", a))(Ln || {}), rt = ((a) => (a[a.MPU_TASK_TRANSACTION_START = 0] = "MPU_TASK_TRANSACTION_START", a[a.MPU_TASK_TRANSACTION_UPDATE = 1] = "MPU_TASK_TRANSACTION_UPDATE", a[a.MPU_TASK_TRANSACTION_STOP = 2] = "MPU_TASK_TRANSACTION_STOP", a[a.MPU_TASK_TRANSACTION_LIST = 3] = "MPU_TASK_TRANSACTION_LIST", a[a.MPU_TASK_TRANSACTION_POLLING = 4] = "MPU_TASK_TRANSACTION_POLLING", a[a.MPU_TASK_TRANSACTION_ACKNOWLEDGE = 5] = "MPU_TASK_TRANSACTION_ACKNOWLEDGE", a[a.MPU_TASK_TRANSACTION_END = 6] = "MPU_TASK_TRANSACTION_END", a))(rt || {});
|
|
9114
9129
|
const Xc = { 0: "/libra/v1/sdk/start-task", 1: "/libra/v1/sdk/update-task", 2: "/libra/v1/sdk/stop-task", 3: "/libra/v1/sdk/list-task", 4: "/libra/v1/sdk/polling", 5: "/libra/v1/sdk/acknowledge", 6: "/" };
|
|
9115
9130
|
class xn {
|
|
9116
9131
|
constructor(s, e, t, i, r, n, o, c) {
|
|
@@ -9125,7 +9140,7 @@ class xn {
|
|
|
9125
9140
|
this.videoWidth = s, this.videoHeight = e, t && (this.videoFramerate = t), i && (this.videoBitrate = i), r && (this.videoGop = r), n && (this.audioSamplerate = n), o && (this.audioBitrate = o), c && (this.audioChannels = c);
|
|
9126
9141
|
}
|
|
9127
9142
|
}
|
|
9128
|
-
const $r = (a) => ((16711680 & a) >> 16) + (65280 & a) + ((255 & a) << 16),
|
|
9143
|
+
const $r = (a) => ((16711680 & a) >> 16) + (65280 & a) + ((255 & a) << 16), mt = (a = 0, s) => {
|
|
9129
9144
|
if (s == 0)
|
|
9130
9145
|
return 0;
|
|
9131
9146
|
let e = a / s;
|
|
@@ -9183,7 +9198,7 @@ class Qc {
|
|
|
9183
9198
|
var o;
|
|
9184
9199
|
const t = this.authInfo;
|
|
9185
9200
|
if (!t)
|
|
9186
|
-
return Promise.reject(
|
|
9201
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9187
9202
|
const i = Xc[s], r = { appid: t.appId, userid: t.userId, channelid: t.channelId, timestamp: t.timestamp, token: t.token, nonce: t.nonce ? t.nonce : "", requestid: ke.createCallid(), tokensid: !1, session: (o = t.sessionId) != null ? o : ke.createCallid() }, n = Object.keys(r).map((c) => `${c}=${encodeURIComponent(r[c])}`).join("&");
|
|
9188
9203
|
return fetch(`https://gw.rtn.aliyuncs.com${i}?${n}`, { method: "POST", headers: { "Content-Type": "application/json; charset=UTF-8" }, body: JSON.stringify(e) }).then((c) => c.status !== 200 ? (this.slsReporter.reportTranscodingError(c.status, e.taskid || ""), Promise.reject(new V(U.ERR_INNER, `transcoding request failed, status: ${c.status}`))) : c).catch((c) => Promise.reject(new V(U.ERR_INNER, `transcoding request failed, err: ${c.message}`)));
|
|
9189
9204
|
}
|
|
@@ -9196,7 +9211,7 @@ class Qc {
|
|
|
9196
9211
|
startPublishLiveStream(s, e) {
|
|
9197
9212
|
return _(this, null, function* () {
|
|
9198
9213
|
if (!this.authInfo)
|
|
9199
|
-
return Promise.reject(
|
|
9214
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9200
9215
|
const t = yield fr(s.split("?")[0]), i = rt.MPU_TASK_TRANSACTION_UPDATE, r = e.toJson(i, this.authInfo, t, s);
|
|
9201
9216
|
return this.doRequest(i, r);
|
|
9202
9217
|
});
|
|
@@ -9204,7 +9219,7 @@ class Qc {
|
|
|
9204
9219
|
startPublishLiveStreamWithTaskId(s, e) {
|
|
9205
9220
|
return _(this, null, function* () {
|
|
9206
9221
|
if (!this.authInfo)
|
|
9207
|
-
return Promise.reject(
|
|
9222
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9208
9223
|
const t = rt.MPU_TASK_TRANSACTION_UPDATE, i = e.toJson(t, this.authInfo, s);
|
|
9209
9224
|
return this.doRequest(t, i);
|
|
9210
9225
|
});
|
|
@@ -9212,7 +9227,7 @@ class Qc {
|
|
|
9212
9227
|
updatePublishLiveStream(s, e) {
|
|
9213
9228
|
return _(this, null, function* () {
|
|
9214
9229
|
if (!this.authInfo)
|
|
9215
|
-
return Promise.reject(
|
|
9230
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9216
9231
|
const t = yield fr(s.split("?")[0]), i = rt.MPU_TASK_TRANSACTION_UPDATE, r = e.toJson(i, this.authInfo, t, s);
|
|
9217
9232
|
return this.doRequest(i, r);
|
|
9218
9233
|
});
|
|
@@ -9220,7 +9235,7 @@ class Qc {
|
|
|
9220
9235
|
updatePublishLiveStreamWithTaskId(s, e) {
|
|
9221
9236
|
return _(this, null, function* () {
|
|
9222
9237
|
if (!this.authInfo)
|
|
9223
|
-
return Promise.reject(
|
|
9238
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9224
9239
|
const t = rt.MPU_TASK_TRANSACTION_UPDATE, i = e.toJson(t, this.authInfo, s);
|
|
9225
9240
|
return this.doRequest(t, i);
|
|
9226
9241
|
});
|
|
@@ -9228,14 +9243,14 @@ class Qc {
|
|
|
9228
9243
|
stopPublishLiveStream(s) {
|
|
9229
9244
|
return _(this, null, function* () {
|
|
9230
9245
|
if (!this.authInfo)
|
|
9231
|
-
return Promise.reject(
|
|
9246
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9232
9247
|
const e = yield fr(s.split("?")[0]), t = rt.MPU_TASK_TRANSACTION_STOP, i = new Pr().toJson(t, this.authInfo, e, s);
|
|
9233
9248
|
return this.doRequest(t, i);
|
|
9234
9249
|
});
|
|
9235
9250
|
}
|
|
9236
9251
|
stopPublishLiveStreamWithTaskId(s) {
|
|
9237
9252
|
if (!this.authInfo)
|
|
9238
|
-
return Promise.reject(
|
|
9253
|
+
return Promise.reject(It.LiveTranscodingErrorInvalidParam);
|
|
9239
9254
|
const e = rt.MPU_TASK_TRANSACTION_STOP, t = new Pr().toJson(e, this.authInfo, s);
|
|
9240
9255
|
return this.doRequest(e, t);
|
|
9241
9256
|
}
|
|
@@ -9329,7 +9344,7 @@ class il {
|
|
|
9329
9344
|
p(this, "msgCacheArr", []);
|
|
9330
9345
|
p(this, "index", 0);
|
|
9331
9346
|
p(this, "ntpClock");
|
|
9332
|
-
p(this, "clientId",
|
|
9347
|
+
p(this, "clientId", ct());
|
|
9333
9348
|
p(this, "stsData");
|
|
9334
9349
|
p(this, "stsExpiration", Date.now());
|
|
9335
9350
|
p(this, "updateTaskTimer");
|
|
@@ -9346,7 +9361,7 @@ class il {
|
|
|
9346
9361
|
} }, i = Or(t);
|
|
9347
9362
|
e.useStsPlugin(i), this.tracker = e, this.msgCacheArr.forEach((r, n) => {
|
|
9348
9363
|
var o, c;
|
|
9349
|
-
(c = this.tracker) == null || c.send(J(
|
|
9364
|
+
(c = this.tracker) == null || c.send(J(dt(J({}, this.param), { stat_log_id: `${((o = this.param) == null ? void 0 : o.sesid) || "nosession"}-${n}` }), r));
|
|
9350
9365
|
}), this.index = this.index + this.msgCacheArr.length, this.msgCacheArr = [];
|
|
9351
9366
|
}
|
|
9352
9367
|
}
|
|
@@ -9386,7 +9401,7 @@ class il {
|
|
|
9386
9401
|
let e;
|
|
9387
9402
|
s.tm = Date.now();
|
|
9388
9403
|
try {
|
|
9389
|
-
e = JSON.parse(JSON.stringify(J(
|
|
9404
|
+
e = JSON.parse(JSON.stringify(J(dt(J({ bt: br.browserName || "unknown", ntptm: this.ntpClock.now(), ntpofs: this.ntpClock.now() - Date.now() }, this.param), { stat_log_id: `${((t = this.param) == null ? void 0 : t.sesid) || "nosession"}-${this.index}` }), s)));
|
|
9390
9405
|
} catch (r) {
|
|
9391
9406
|
}
|
|
9392
9407
|
e && (this.tracker ? ((i = this.tracker) == null || i.send(e), this.index++) : this.msgCacheArr.push(e));
|
|
@@ -9394,16 +9409,16 @@ class il {
|
|
|
9394
9409
|
initParam(s) {
|
|
9395
9410
|
let e = "";
|
|
9396
9411
|
try {
|
|
9397
|
-
e = (localStorage == null ? void 0 : localStorage.getItem("AliRtcUUID")) || "", e || (e =
|
|
9412
|
+
e = (localStorage == null ? void 0 : localStorage.getItem("AliRtcUUID")) || "", e || (e = ct(), localStorage == null || localStorage.setItem("AliRtcUUID", e));
|
|
9398
9413
|
} catch (t) {
|
|
9399
9414
|
}
|
|
9400
|
-
this.param || (this.param = { apid: s.appId, usrid: s.userId, statsvrs: "0.6.1", evetid: 0, sesid: s.sessionId, sessionId: s.sessionId, channelid: s.channelId, usrn: s.userId, osn: dn.systemName, osv: dn.systemVersion, deb: qo(), den: zo(), udid: e, sdkvrs: Ri, acs: "Unknown", cput: Sn(), dm: `${window.location.protocol}//${window.location.host}`, bt: br.browserName, bv: br.browserVersion, envir: "PRODUCT", args: "", instid:
|
|
9415
|
+
this.param || (this.param = { apid: s.appId, usrid: s.userId, statsvrs: "0.6.1", evetid: 0, sesid: s.sessionId, sessionId: s.sessionId, channelid: s.channelId, usrn: s.userId, osn: dn.systemName, osv: dn.systemVersion, deb: qo(), den: zo(), udid: e, sdkvrs: Ri, acs: "Unknown", cput: Sn(), dm: `${window.location.protocol}//${window.location.host}`, bt: br.browserName, bv: br.browserVersion, envir: "PRODUCT", args: "", instid: ct() });
|
|
9401
9416
|
}
|
|
9402
9417
|
}
|
|
9403
9418
|
const _e = (a, s = 1, e = 6e4, t = 0) => {
|
|
9404
9419
|
let i = a;
|
|
9405
9420
|
return i || (i = 0), Math.min(e, Math.max(t, Math.round(i * s)));
|
|
9406
|
-
},
|
|
9421
|
+
}, ht = (a, s, e = 2e7, t = 0) => {
|
|
9407
9422
|
let i = s;
|
|
9408
9423
|
(!s || s < 0 || s > 1e4) && (i = 1e3);
|
|
9409
9424
|
let r = a;
|
|
@@ -9447,21 +9462,21 @@ class rl {
|
|
|
9447
9462
|
reportPublishMonitor(s, e, t, i, r) {
|
|
9448
9463
|
if (!t || r.length <= 0)
|
|
9449
9464
|
return;
|
|
9450
|
-
const n = t === P.Audio, o = { ctm: Math.floor(r[0].timestamp || 0), src: r[0].ssrc || "", codec: r[0]._codec || "" }, c = [], l = [], d = [], h = [], f = [], u = [], b = [], g = [], m = [], S = [], R = [], A = [], y = [], v = [], E = [], w = [], I = [], k = [],
|
|
9465
|
+
const n = t === P.Audio, o = { ctm: Math.floor(r[0].timestamp || 0), src: r[0].ssrc || "", codec: r[0]._codec || "" }, c = [], l = [], d = [], h = [], f = [], u = [], b = [], g = [], m = [], S = [], R = [], A = [], y = [], v = [], E = [], w = [], I = [], k = [], N = [];
|
|
9451
9466
|
try {
|
|
9452
9467
|
if (r.forEach((D) => {
|
|
9453
9468
|
var de, be, Re, q, pe, Me;
|
|
9454
9469
|
if (!D || !D.timestamp)
|
|
9455
9470
|
return;
|
|
9456
|
-
const H = (de = D._last) != null && de.timestamp ? D.timestamp - D._last.timestamp : 1e3, K = Ie(D, "bytesSent"), X = Ie(D, "headerBytesSent"), z =
|
|
9471
|
+
const H = (de = D._last) != null && de.timestamp ? D.timestamp - D._last.timestamp : 1e3, K = Ie(D, "bytesSent"), X = Ie(D, "headerBytesSent"), z = ht(_e(K + X, 8, 2e7), H);
|
|
9457
9472
|
c.push(z);
|
|
9458
|
-
const j =
|
|
9473
|
+
const j = ht(_e(K, 8, 2e7), H);
|
|
9459
9474
|
l.push(j);
|
|
9460
|
-
const Q =
|
|
9475
|
+
const Q = ht(_e(X, 8, 2e7), H);
|
|
9461
9476
|
d.push(Q);
|
|
9462
|
-
const te = Ie(D, "packetsSent"),
|
|
9463
|
-
h.push(
|
|
9464
|
-
const O = Ie(D, "packetsLost"), M =
|
|
9477
|
+
const te = Ie(D, "packetsSent"), L = ht(te, H);
|
|
9478
|
+
h.push(L);
|
|
9479
|
+
const O = Ie(D, "packetsLost"), M = ht(O, H);
|
|
9465
9480
|
f.push(M);
|
|
9466
9481
|
const x = Ft(O, te);
|
|
9467
9482
|
if (u.push(x), n)
|
|
@@ -9471,13 +9486,13 @@ class rl {
|
|
|
9471
9486
|
const ve = Ie(D, "totalPacketSendDelay");
|
|
9472
9487
|
I.push(_e(ve, 1 / (O || 1), 2e3));
|
|
9473
9488
|
const me = Ie(D, "qpSum");
|
|
9474
|
-
k.push(_e(me, 1 / (D.framesPerSecond || 1), 51)),
|
|
9489
|
+
k.push(_e(me, 1 / (D.framesPerSecond || 1), 51)), N.push(0);
|
|
9475
9490
|
}
|
|
9476
9491
|
}), o.sbr = c.join(","), o.mbrs = l.join(","), o.pbrs = d.join(","), o.ps = h.join(","), o.pl = f.join(","), o.plr = u.join(","), n) {
|
|
9477
9492
|
const D = (i == null ? void 0 : i.getSettings().sampleRate) || 0;
|
|
9478
9493
|
o.ailevel = b.join(","), o.arpc = g.join(","), o.arsr = D, o.aesr = D, o.publevel = -90, o.rawlevel = -90;
|
|
9479
9494
|
} else
|
|
9480
|
-
o.em = m.join(","), o.cfps = S.join(","), o.ifps = R.join(","), o.sfps = A.join(","), o.ih = y.join(","), o.iw = v.join(","), o.sh = E.join(","), o.sw = w.join(","), o.sd = I.join(","), o.aqp = k.join(","), o.caf =
|
|
9495
|
+
o.em = m.join(","), o.cfps = S.join(","), o.ifps = R.join(","), o.sfps = A.join(","), o.ih = y.join(","), o.iw = v.join(","), o.sh = E.join(","), o.sw = w.join(","), o.sd = I.join(","), o.aqp = k.join(","), o.caf = N.join(","), o.can = N.join(","), o.cav = l.join(","), o.ifimax = N.join(","), o.ifimin = N.join(","), o.efimax = N.join(","), o.efimin = N.join(","), o.sfimax = N.join(","), o.sfimin = N.join(","), o.apsnr = N.join(",");
|
|
9481
9496
|
} catch (D) {
|
|
9482
9497
|
}
|
|
9483
9498
|
this.log({ evetid: 10070, traceid: e, calid: s, rmtid: "", args: this.data2String(J({ calid: s, tckid: t, rmtid: "", traceid: e }, o)) });
|
|
@@ -9485,21 +9500,21 @@ class rl {
|
|
|
9485
9500
|
reportSubscribeMonitor(s, e, t, i, r) {
|
|
9486
9501
|
if (!i || !r || r.length <= 0)
|
|
9487
9502
|
return;
|
|
9488
|
-
const n = i === P.Audio, o = { ctm: Math.floor(r[0].timestamp || 0), src: r[0].ssrc || "", codec: r[0]._codec || "" }, c = [], l = [], d = [], h = [], f = [], u = [], b = [], g = [], m = [], S = [], R = [], A = [], y = [], v = [], E = [], w = [], I = [], k = [],
|
|
9503
|
+
const n = i === P.Audio, o = { ctm: Math.floor(r[0].timestamp || 0), src: r[0].ssrc || "", codec: r[0]._codec || "" }, c = [], l = [], d = [], h = [], f = [], u = [], b = [], g = [], m = [], S = [], R = [], A = [], y = [], v = [], E = [], w = [], I = [], k = [], N = [], D = [], H = [], K = [], X = [], z = [], j = [], Q = [], te = [], L = [], O = [], M = [], x = [], de = [], be = [], Re = [];
|
|
9489
9504
|
try {
|
|
9490
9505
|
r.forEach((q) => {
|
|
9491
9506
|
var G, Te;
|
|
9492
9507
|
if (!q || !q.timestamp)
|
|
9493
9508
|
return;
|
|
9494
|
-
const pe = (G = q._last) != null && G.timestamp ? q.timestamp - q._last.timestamp : 1e3, Me = Ie(q, "bytesReceived"), ve = Ie(q, "headerBytesReceived"), me =
|
|
9509
|
+
const pe = (G = q._last) != null && G.timestamp ? q.timestamp - q._last.timestamp : 1e3, Me = Ie(q, "bytesReceived"), ve = Ie(q, "headerBytesReceived"), me = ht(_e(Me + ve, 8, 2e7), pe);
|
|
9495
9510
|
c.push(me);
|
|
9496
|
-
const Se =
|
|
9511
|
+
const Se = ht(_e(Me, 8, 2e7), pe);
|
|
9497
9512
|
l.push(Se);
|
|
9498
|
-
const $e =
|
|
9513
|
+
const $e = ht(_e(ve, 8, 2e7), pe);
|
|
9499
9514
|
d.push($e);
|
|
9500
|
-
const ie = Ie(q, "packetsReceived"), Ae =
|
|
9515
|
+
const ie = Ie(q, "packetsReceived"), Ae = ht(ie, pe);
|
|
9501
9516
|
h.push(Ae);
|
|
9502
|
-
const De = Ie(q, "packetsLost"), oe =
|
|
9517
|
+
const De = Ie(q, "packetsLost"), oe = ht(De, pe);
|
|
9503
9518
|
f.push(oe);
|
|
9504
9519
|
const ne = Ft(De, ie);
|
|
9505
9520
|
u.push(ne);
|
|
@@ -9515,8 +9530,8 @@ class rl {
|
|
|
9515
9530
|
if (m.push(Ft(ie - se, We)), S.push(Ft(De, We)), g.push(Ft(se, We)), R.push(We), be.push(0), Re.push(""), n) {
|
|
9516
9531
|
v.push(hn(q.audioLevel));
|
|
9517
9532
|
const Ge = ((Xe, bt) => {
|
|
9518
|
-
var ti,
|
|
9519
|
-
return (((ti = Xe == null ? void 0 : Xe._source) == null ? void 0 : ti[bt]) || 0) - (((
|
|
9533
|
+
var ti, lt, kt;
|
|
9534
|
+
return (((ti = Xe == null ? void 0 : Xe._source) == null ? void 0 : ti[bt]) || 0) - (((kt = (lt = Xe == null ? void 0 : Xe._last) == null ? void 0 : lt._source) == null ? void 0 : kt[bt]) || 0);
|
|
9520
9535
|
})(q, "synthesizedSamplesEvents");
|
|
9521
9536
|
E.push(Ge);
|
|
9522
9537
|
const He = un(q, "synthesizedSamplesDuration");
|
|
@@ -9525,7 +9540,7 @@ class rl {
|
|
|
9525
9540
|
y.push(ei), I.push(0);
|
|
9526
9541
|
} else {
|
|
9527
9542
|
const Ge = (Te = q._last) != null && Te.totalInterFrameDelay ? q.totalInterFrameDelay - q._last.totalInterFrameDelay : 0;
|
|
9528
|
-
k.push(_e(Ge, 1e3 / (q.framesDecoded || 30), 500)),
|
|
9543
|
+
k.push(_e(Ge, 1e3 / (q.framesDecoded || 30), 500)), N.push(_e(q.framesPerSecond, 1, 100)), D.push(Ie(q, "framesReceived")), de.push(Ie(q, "framesRendered")), H.push(_e(q.frameHeight, 1, 4400)), K.push(_e(q.frameWidth, 1, 7700));
|
|
9529
9544
|
const He = Ie(q, "totalProcessingDelay");
|
|
9530
9545
|
X.push(_e(He, 1e3 / (q.framesDecoded || 30), 12e4));
|
|
9531
9546
|
const ei = Ie(q, "nackCount");
|
|
@@ -9535,15 +9550,15 @@ class rl {
|
|
|
9535
9550
|
const bt = Ie(q, "qpSum");
|
|
9536
9551
|
Q.push(_e(bt, 1 / (q.framesPerSecond || 1), 51)), te.push(_e(q.framesDropped));
|
|
9537
9552
|
const ti = Ie(q, "totalFreezesDuration");
|
|
9538
|
-
|
|
9539
|
-
const
|
|
9540
|
-
|
|
9553
|
+
L.push(_e(ti, 1e3, 3e4));
|
|
9554
|
+
const lt = Ie(q, "jitterBufferEmittedCount"), kt = Ie(q, "jitterBufferDelay");
|
|
9555
|
+
kt && lt ? O.push(_e(kt, 1e3 / lt, 3e4)) : O.push(0);
|
|
9541
9556
|
const wi = Ie(q, "jitterBufferTargetDelay");
|
|
9542
|
-
wi &&
|
|
9557
|
+
wi && lt ? M.push(_e(wi, 1e3 / lt, 3e4)) : M.push(0);
|
|
9543
9558
|
const _i = Ie(q, "jitterBufferMinimumDelay");
|
|
9544
|
-
_i &&
|
|
9559
|
+
_i && lt ? x.push(_e(_i, 1e3 / lt, 3e4)) : x.push(0);
|
|
9545
9560
|
}
|
|
9546
|
-
}), o.rbr = c.join(","), o.mbrs = l.join(","), o.pbrs = d.join(","), o.pr = h.join(","), o.pl = f.join(","), o.plr = u.join(","), o.jd = b.join(","), o.fecr = A.join(","), o.retransr = g.join(","), o.baser = m.join(","), o.basel = S.join(","), o.recoverr = be.join(","), o.alll = S.join(","), o.totalc = R.join(","), n ? (o.er = y.join(","), o.aolevel = v.join(","), o.asrc = I.join(","), o.scnt = E.join(","), o.sdura = w.join(",")) : (o.dm = k.join(","), o.dfps =
|
|
9561
|
+
}), o.rbr = c.join(","), o.mbrs = l.join(","), o.pbrs = d.join(","), o.pr = h.join(","), o.pl = f.join(","), o.plr = u.join(","), o.jd = b.join(","), o.fecr = A.join(","), o.retransr = g.join(","), o.baser = m.join(","), o.basel = S.join(","), o.recoverr = be.join(","), o.alll = S.join(","), o.totalc = R.join(","), n ? (o.er = y.join(","), o.aolevel = v.join(","), o.asrc = I.join(","), o.scnt = E.join(","), o.sdura = w.join(",")) : (o.dm = k.join(","), o.dfps = N.join(","), o.rfps = D.join(","), o.rh = H.join(","), o.rw = K.join(","), o.fpt = Re.join(","), o.ns = j.join(","), o.pliss = z.join(","), o.aqp = Q.join(","), o.ofimax = be.join(","), o.ofimin = be.join(","), o.dfimax = be.join(","), o.dfimin = be.join(","), o.rfimax = be.join(","), o.rfimin = be.join(","), o.vrstutter = L.join(","), o.cdm = O.join(","), o.tdm = M.join(","), o.pdm = x.join(","), o.ofps = de.join(","), o.dfbd = te.join(","));
|
|
9547
9562
|
} catch (q) {
|
|
9548
9563
|
}
|
|
9549
9564
|
this.log({ evetid: 10080, traceid: t, rmtid: e, calid: s, args: this.data2String(J({ calid: s, rmtid: e, tckid: i, traceid: t }, o)) });
|
|
@@ -9557,7 +9572,7 @@ class rl {
|
|
|
9557
9572
|
if (!u.timestamp)
|
|
9558
9573
|
return;
|
|
9559
9574
|
const g = (m = u._last) != null && m.timestamp ? u.timestamp - u._last.timestamp : 1e3;
|
|
9560
|
-
e.push(_e(u.currentRoundTripTime, 1e3)), t.push(_e(u.availableOutgoingBitrate, 8, 2e8)), i.push(
|
|
9575
|
+
e.push(_e(u.currentRoundTripTime, 1e3)), t.push(_e(u.availableOutgoingBitrate, 8, 2e8)), i.push(ht(_e(u.bytesSent, 8, 2e7), g, 25e6)), r.push(ht(_e(u.bytesReceived, 8, 2e7), g, 25e6)), n.push(0), o.push(0), b % 5 == 0 && (c.push(""), l.push(""), d.push(""), h.push(""));
|
|
9561
9576
|
});
|
|
9562
9577
|
const f = { ctm: Math.floor(s[0].timestamp || 0), rtt: e.join(","), bsps: i.join(","), brps: r.join(","), cpu: c.join(","), mem: l.join(","), sysmem: d.join(","), systotalmem: h.join(","), audioonly: this.engine.isAudioOnly() ? 1 : 0 };
|
|
9563
9578
|
this.log({ evetid: 10071, args: this.data2String(J({ asb: t.join(","), abms: n.join(","), vbms: o.join(",") }, f)) }), this.log({ evetid: 10081, args: this.data2String(J({}, f)) });
|
|
@@ -9584,7 +9599,7 @@ class rl {
|
|
|
9584
9599
|
break;
|
|
9585
9600
|
u[`_lgnd${g}`] = `lgnd[${g}]: {${this.data2String({ gnirh: i[m] || 0, gnbp: i[S] || 0, gnpc: i[R] || 0 })}}`;
|
|
9586
9601
|
}
|
|
9587
|
-
this.log({ evetid: 10073, args: this.data2String(
|
|
9602
|
+
this.log({ evetid: 10073, args: this.data2String(dt(J({ tdlms: d + (t.aiagenttotalcost || 0), _: `aiqud:{${this.data2String(dt(J({ uid: ((b = this.authInfo) == null ? void 0 : b.userId) || "", sid: r.aAIClientScentenceId || 0, quct: 65535 * (r.aAIClientQuestionTimestampHEAD || 0) + (r.aAIClientQuestionTimestampTAIL || 0), anct: 65535 * (r.aAIClientAnswerTimestampHEAD || 0) + (r.aAIClientAnswerTimestampTAIL || 0), casc: r.aAIClientSourceCost || 0, camc: r.aAIClientMixerCost || 0, caec: r.aAIClientEncoderCost || 0, cantc: r.aIClientNetsdkThrCost || 0, caqtc: r.aIClientQosThrCost || 0, capc: r.aIClientPacerCost || 0, cuphr: r.aIClientUpRTTHalf || 0 }, u), { qgac: 0, ldhr: l.ngxRtcSeiCumulativeDelayKeyDownRttHalf_0 || 0, larc: n.aAILinuxReceiveCost || 0, lanqc: n.aAILinuxNeteqCost || 0, larsc: n.aAILinuxRemoteSourceCost || 0, lapmc: n.aAILinuxPlayMixerCost || 0, lapc: n.aAILinuxPlayCost || 0, lsdnc: n.aIClinetSmartDenoise || 0, asrc: t.aiasrcost || 0, llmc: t.aillmcost || 0, ttsc: t.aittscost || 0, aamc: t.aimutecost || 0, aatc: t.aiagenttotalcost || 0 }))}};`, ssrc: s, tpd: 0, scc: r.aAIClientSourceCost || 0, mxc: r.aAIClientMixerCost || 0, encc: r.aAIClientEncoderCost || 0, netc: r.aIClientNetsdkThrCost || 0, qostc: r.aIClientQosThrCost || 0, pacerc: r.aIClientPacerCost || 0, uphr: r.aIClientUpRTTHalf || 0 }, h), { agac: f, dnhr: c.downRTTHalf || 0, tsd: c.vTotalCost || 0, rcc: n.aAILinuxReceiveCost || 0, nqc: n.aAILinuxNeteqCost || 0, rscc: n.aAILinuxRemoteSourceCost || 0, plmxc: n.aAILinuxPlayMixerCost || 0, plc: n.aAILinuxPlayCost || 0, dvd: 0 })) });
|
|
9588
9603
|
}
|
|
9589
9604
|
reportCumuAudioDelay(s, e) {
|
|
9590
9605
|
const { pub: t = {}, sub: i = {}, grtn: r = {} } = e || {};
|
|
@@ -9598,7 +9613,7 @@ class rl {
|
|
|
9598
9613
|
break;
|
|
9599
9614
|
c += r[d] || 0, c += r[h] || 0, c += r[f] || 0, o[`_gnd${l}`] = `gnd[${l}]: {${this.data2String({ gnirh: r[d] || 0, gnbp: r[h] || 0, gnpc: r[f] || 0 })}}`;
|
|
9600
9615
|
}
|
|
9601
|
-
this.log({ evetid: 10074, args: this.data2String(
|
|
9616
|
+
this.log({ evetid: 10074, args: this.data2String(dt(J({ ssrc: s, tpd: n, scc: (t == null ? void 0 : t.aSourceCCost) || 0, mxc: (t == null ? void 0 : t.aMixerCost) || 0, encc: (t == null ? void 0 : t.aEncodeCCost) || 0, netc: (t == null ? void 0 : t.netsdkThrCost) || 0, qostc: (t == null ? void 0 : t.qosThrCost) || 0, pacerc: (t == null ? void 0 : t.pacerCost) || 0, uphr: (t == null ? void 0 : t.upRTTHalf) || 0 }, o), { agac: c, dnhr: (i == null ? void 0 : i.downRTTHalf) || 0, tsd: (i == null ? void 0 : i.vTotalCost) || 0, rcc: 0, nqc: 0, rscc: 0, plmxc: 0, plc: 0, device_delay: 0, psdkt: 0, pub_sdk_version: Ri })) });
|
|
9602
9617
|
}
|
|
9603
9618
|
reportCumuVideoDelay(s, e) {
|
|
9604
9619
|
const { pub: t = {}, sub: i = {}, grtn: r = {} } = e || {};
|
|
@@ -9612,7 +9627,7 @@ class rl {
|
|
|
9612
9627
|
break;
|
|
9613
9628
|
c += r[d] || 0, c += r[h] || 0, c += r[f] || 0, o[`_gnd${l}`] = `vgnd[${l}]: {${this.data2String({ vgnirh: r[d] || 0, vgnbp: r[h] || 0, vgnpc: r[f] || 0 })}}`;
|
|
9614
9629
|
}
|
|
9615
|
-
this.log({ evetid: 10075, args: this.data2String(
|
|
9630
|
+
this.log({ evetid: 10075, args: this.data2String(dt(J({ vssrc: s, valld: n, vcdc: (t == null ? void 0 : t.capDeviceCost) || 0, vpec: (t == null ? void 0 : t.pushExtCost) || 0, vcpc: (t == null ? void 0 : t.capPlugCost) || 0, vptc: (t == null ? void 0 : t.prepThrCost) || 0, vppc: (t == null ? void 0 : t.prepPlugCost) || 0, vdptc: (t == null ? void 0 : t.dispThrCost) || 0, vdppc: (t == null ? void 0 : t.dispPlugCost) || 0, vetc: (t == null ? void 0 : t.vEncThrCost) || 0, vepc: (t == null ? void 0 : t.vEncPlugCost) || 0, vntc: (t == null ? void 0 : t.netsdkThrCost) || 0, vqtc: (t == null ? void 0 : t.qosThrCost) || 0, vvpac: (t == null ? void 0 : t.pacerCost) || 0, vuphr: (t == null ? void 0 : t.upRTTHalf) || 0 }, o), { vagac: c, vdnhr: (i == null ? void 0 : i.downRTTHalf) || 0, vrc: (i == null ? void 0 : i.vAssemblyCost) || 0, vstc: 0, vfbc: i.vJitterBufferDelay || 0, vdtc: (i == null ? void 0 : i.vDecPlugCost) || 0, vdvpc: (i == null ? void 0 : i.vDecPlugCost) || 0, vrtc: 0, vrpc: 0 })) });
|
|
9616
9631
|
}
|
|
9617
9632
|
reportJoin(s, e, t = "") {
|
|
9618
9633
|
var h, f;
|
|
@@ -9723,7 +9738,7 @@ class rl {
|
|
|
9723
9738
|
this.log({ evetid: 12001, args: this.data2String(l) });
|
|
9724
9739
|
}
|
|
9725
9740
|
log(s) {
|
|
9726
|
-
s && (s.tm = s.tm || (/* @__PURE__ */ new Date()).getTime(),
|
|
9741
|
+
s && (s.tm = s.tm || (/* @__PURE__ */ new Date()).getTime(), T.debug("[ConsoleLogger]", "log", s), this.logClient.sendReport(s));
|
|
9727
9742
|
}
|
|
9728
9743
|
data2String(s) {
|
|
9729
9744
|
let e = "";
|
|
@@ -9771,7 +9786,7 @@ const ni = class ni extends je {
|
|
|
9771
9786
|
this.reconnectTimeoutId && (clearTimeout(this.reconnectTimeoutId), this.reconnectTimeoutId = 0), this.emit("onWillReconnect"), this.shouldReconnect ? (this.emit("onReconnectStart"), this.isReconnecting = !0, this.initWebSocket()) : this.emit("onConnectFail");
|
|
9772
9787
|
}
|
|
9773
9788
|
onOpen(e) {
|
|
9774
|
-
|
|
9789
|
+
T.info(`[${ni.logName}]`, "onOpen"), this.socketStatus = 2, this.connectRetryCount = 0, this.shouldReconnect = !0, this.networkAvailableChecked = !1, this.closedByInvoke = !1, this.gotErr = !1, this.isReconnecting = !1, this.emit("onOpen", e);
|
|
9775
9790
|
}
|
|
9776
9791
|
onMessage(e) {
|
|
9777
9792
|
this.emit("onMessage", e);
|
|
@@ -9786,7 +9801,7 @@ const ni = class ni extends je {
|
|
|
9786
9801
|
if (this.closedByInvoke)
|
|
9787
9802
|
this.socketStatus = 0;
|
|
9788
9803
|
else {
|
|
9789
|
-
if (
|
|
9804
|
+
if (T.info(`[${ni.logName}]`, `onClose, code: ${e.code}, reason: ${e.reason}, status: ${status}, retryCount: ${this.connectRetryCount}`), (yield ke.isNetworkAvailable()) && !this.networkAvailableChecked)
|
|
9790
9805
|
return this.reconnect(), void (this.networkAvailableChecked = !0);
|
|
9791
9806
|
if (this.connectRetryCount || this.emit("onNetworkError"), !this.reconnectTimeoutId) {
|
|
9792
9807
|
this.connectRetryCount += 1;
|
|
@@ -9864,7 +9879,7 @@ const nt = class nt extends je {
|
|
|
9864
9879
|
let r = this.packageCreator.createPublishPackage();
|
|
9865
9880
|
r.data.users = [], r.data.l1ip = t, i.subscribe.signal = this.wsClient.connectUrl;
|
|
9866
9881
|
const { tracks: n, resume: o } = i;
|
|
9867
|
-
let c = "7.2.
|
|
9882
|
+
let c = "7.2.7";
|
|
9868
9883
|
c && (c = c.split("-")[0]), n.forEach((d) => {
|
|
9869
9884
|
const { codec: h, ssrc: f } = d;
|
|
9870
9885
|
d.userdata = JSON.stringify({ sdk_version: c, codec: h }), d.ssrc = `${f}`, o && (d.attr = { reason: "reconnect" });
|
|
@@ -9876,22 +9891,22 @@ const nt = class nt extends je {
|
|
|
9876
9891
|
}
|
|
9877
9892
|
refreshUrl(e) {
|
|
9878
9893
|
const t = this.packageCreator.createRefreshUrlPackage();
|
|
9879
|
-
t.data = J(
|
|
9894
|
+
t.data = J(dt(J({}, t.data), { sessionid: t.header.sessionid }), e), this.sendPackage(t);
|
|
9880
9895
|
}
|
|
9881
9896
|
refreshAuthInfo(e) {
|
|
9882
9897
|
this.authInfo = e, this.packageCreator.refreshAuthInfo(e);
|
|
9883
9898
|
}
|
|
9884
9899
|
close() {
|
|
9885
|
-
|
|
9900
|
+
T.info(`[${nt.logName}] close`), this.stopKeepAlive(), this.wsClient.off("onOpen", this.onOpen.bind(this)), this.wsClient.off("onMessage", this.onMessage.bind(this)), this.wsClient.off("onError", this.onError.bind(this)), this.wsClient.off("onClose", this.onClose.bind(this)), this.wsClient.off("onConnectFail", this.onConnectFail.bind(this)), this.wsClient.off("onAuthInvalid", this.onAuthInvalid.bind(this)), this.wsClient.off("onReconnectStart"), this.wsClient.off("onReconnectFail"), this.wsClient.close();
|
|
9886
9901
|
}
|
|
9887
9902
|
sendPackage(e) {
|
|
9888
|
-
[
|
|
9903
|
+
[Ne.KEEPALIVE, Ne.RECONNECT, Ne.JOINCHANNEL].includes(e.msgtype) || this.packageCache.set(e.tid, e), this.wsClient.send(e), e.msgtype !== Ne.KEEPALIVE && this.slsReporter.reportRoomServerEvent(!0, e.msgtype, e.tid, e);
|
|
9889
9904
|
}
|
|
9890
9905
|
updateReconnectData(e) {
|
|
9891
9906
|
this.reconnectData = e;
|
|
9892
9907
|
}
|
|
9893
9908
|
onOpen() {
|
|
9894
|
-
if (
|
|
9909
|
+
if (T.info(`[${nt.logName}] onOpen`), this.isFirstConnect) {
|
|
9895
9910
|
let e = this.packageCreator.createJoinPackage(this.joinChannelExtraData);
|
|
9896
9911
|
e.data.configure = { channelprofile: this.channelProfile }, this.channelProfile !== Dt.AliRtcSdkInteractiveLive && this.channelProfile !== Dt.AliRtcSdkInteractiveWithLowLatencyLive || (e.data.configure.clientrole = this.clientRole), this.sendPackage(e);
|
|
9897
9912
|
} else {
|
|
@@ -9903,29 +9918,29 @@ const nt = class nt extends je {
|
|
|
9903
9918
|
onMessage(e) {
|
|
9904
9919
|
try {
|
|
9905
9920
|
let t = JSON.parse(e.data);
|
|
9906
|
-
this.packageCache.delete(t.tid), this.onRecvMessage(t), t != null && t.msgtype && (t == null ? void 0 : t.msgtype) !==
|
|
9921
|
+
this.packageCache.delete(t.tid), this.onRecvMessage(t), t != null && t.msgtype && (t == null ? void 0 : t.msgtype) !== Ne.KEEPALIVE && this.slsReporter.reportRoomServerEvent(!1, t.msgtype, t.tid, t);
|
|
9907
9922
|
} catch (t) {
|
|
9908
|
-
|
|
9923
|
+
T.warn(`[${nt.logName}] onMessage err`, t, e);
|
|
9909
9924
|
}
|
|
9910
9925
|
}
|
|
9911
9926
|
onError(e) {
|
|
9912
|
-
|
|
9927
|
+
T.warn(`[${nt.logName}] onError`, e), this.isFirstConnect && this.onConnectFail();
|
|
9913
9928
|
}
|
|
9914
9929
|
onConnectFail() {
|
|
9915
|
-
|
|
9930
|
+
T.warn(`[${nt.logName}] onConnectFail`);
|
|
9916
9931
|
const e = new V(U.ERR_INNER, "Signaling connect failed.");
|
|
9917
9932
|
this.isFirstConnect ? this.emit("onJoinChannelResult", e) : this.emit("onConnectFail", e);
|
|
9918
9933
|
}
|
|
9919
9934
|
onAuthInvalid() {
|
|
9920
|
-
|
|
9935
|
+
T.warn(`[${nt.logName}] onAuthInvalid`), this.isFirstConnect && this.emit("onAuthInvalid");
|
|
9921
9936
|
}
|
|
9922
9937
|
onNetworkError() {
|
|
9923
|
-
|
|
9938
|
+
T.warn(`[${nt.logName}] onNetworkError`);
|
|
9924
9939
|
const e = new V(U.ERR_INNER, "Network error, signaling connect failed.");
|
|
9925
9940
|
this.emit("onNetworkError", e);
|
|
9926
9941
|
}
|
|
9927
9942
|
onClose(e) {
|
|
9928
|
-
|
|
9943
|
+
T.info(`[${nt.logName}] onClose`, e), this.stopKeepAlive();
|
|
9929
9944
|
}
|
|
9930
9945
|
onKeepAliveRsp() {
|
|
9931
9946
|
this.emit("onKeepAliveRsp"), this.lastKeepAliveResponseTime = Date.now(), this.checkAlive();
|
|
@@ -9941,48 +9956,48 @@ const nt = class nt extends je {
|
|
|
9941
9956
|
}
|
|
9942
9957
|
checkAlive() {
|
|
9943
9958
|
window.clearTimeout(this.aliveChecker), this.aliveChecker = window.setTimeout(() => {
|
|
9944
|
-
|
|
9959
|
+
T.info(`[${nt.logName}] not alive, reconnect`), this.stopKeepAlive(), this.emit("onReconnectStart"), this.wsClient.reconnect();
|
|
9945
9960
|
}, 15e3);
|
|
9946
9961
|
}
|
|
9947
9962
|
onRecvMessage(e) {
|
|
9948
|
-
switch (e.msgtype !==
|
|
9949
|
-
case
|
|
9963
|
+
switch (e.msgtype !== Ne.KEEPALIVE && T.info(`[${nt.logName}] recv msg: ${e.msgtype}`), e.msgtype) {
|
|
9964
|
+
case Ne.JOINCHANNEL:
|
|
9950
9965
|
this.onJoinResult(e);
|
|
9951
9966
|
break;
|
|
9952
|
-
case
|
|
9967
|
+
case Ne.KEEPALIVE:
|
|
9953
9968
|
this.onKeepAliveRsp();
|
|
9954
9969
|
break;
|
|
9955
|
-
case
|
|
9970
|
+
case Ne.PUBLISH:
|
|
9956
9971
|
this.onPublishResult(e);
|
|
9957
9972
|
break;
|
|
9958
|
-
case
|
|
9973
|
+
case Ne.NOTIFYJOIN:
|
|
9959
9974
|
this.onNotifyJoin(e);
|
|
9960
9975
|
break;
|
|
9961
|
-
case
|
|
9976
|
+
case Ne.NOTIFYSTATUS:
|
|
9962
9977
|
this.onNotifyStatus(e);
|
|
9963
9978
|
break;
|
|
9964
|
-
case
|
|
9979
|
+
case Ne.LEAVECHANNEL:
|
|
9965
9980
|
this.onLeaveResult(e);
|
|
9966
9981
|
break;
|
|
9967
|
-
case
|
|
9982
|
+
case Ne.NOTIFYLEAVE:
|
|
9968
9983
|
this.onNotifyLeave(e);
|
|
9969
9984
|
break;
|
|
9970
|
-
case
|
|
9985
|
+
case Ne.NOTIFYPUBLISH:
|
|
9971
9986
|
this.onNotifyPublish(e);
|
|
9972
9987
|
break;
|
|
9973
|
-
case
|
|
9988
|
+
case Ne.STATUSREPORT:
|
|
9974
9989
|
this.onStatusReport(e);
|
|
9975
9990
|
break;
|
|
9976
|
-
case
|
|
9991
|
+
case Ne.BYE:
|
|
9977
9992
|
this.onBye(e);
|
|
9978
9993
|
break;
|
|
9979
|
-
case
|
|
9994
|
+
case Ne.ROLEUPDATE:
|
|
9980
9995
|
this.onRoleUpdateResult(e);
|
|
9981
9996
|
break;
|
|
9982
|
-
case
|
|
9997
|
+
case Ne.REFRESHURL:
|
|
9983
9998
|
this.onRefreshUrlResult(e);
|
|
9984
9999
|
break;
|
|
9985
|
-
case
|
|
10000
|
+
case Ne.RECONNECT:
|
|
9986
10001
|
this.onReconnectResult(e);
|
|
9987
10002
|
break;
|
|
9988
10003
|
default:
|
|
@@ -10039,7 +10054,7 @@ const nt = class nt extends je {
|
|
|
10039
10054
|
}
|
|
10040
10055
|
};
|
|
10041
10056
|
p(nt, "logName", "RSMessageCenter");
|
|
10042
|
-
let
|
|
10057
|
+
let Nr = nt;
|
|
10043
10058
|
var sl = Object.defineProperty, al = Object.getOwnPropertyDescriptor, Sr = (a, s, e, t) => {
|
|
10044
10059
|
for (var i, r = t > 1 ? void 0 : t ? al(s, e) : s, n = a.length - 1; n >= 0; n--)
|
|
10045
10060
|
(i = a[n]) && (r = (t ? i(s, e, r) : i(r)) || r);
|
|
@@ -10065,15 +10080,15 @@ const Mi = (Qe = class extends je {
|
|
|
10065
10080
|
this.reconnectData = e, (t = this.messageCenter) == null || t.updateReconnectData(this.reconnectData);
|
|
10066
10081
|
}
|
|
10067
10082
|
reset() {
|
|
10068
|
-
|
|
10083
|
+
T.info("[roomsig] reset"), this.messageCenter && (this.messageCenter.destroy(), this.messageCenter = void 0), this.authInfo = void 0;
|
|
10069
10084
|
}
|
|
10070
10085
|
join(e, t, i, r) {
|
|
10071
10086
|
return _(this, null, function* () {
|
|
10072
10087
|
return new Promise((n, o) => {
|
|
10073
10088
|
const c = {};
|
|
10074
|
-
this.authInfo = e, this.userName = t, this.messageCenter = new
|
|
10089
|
+
this.authInfo = e, this.userName = t, this.messageCenter = new Nr(e, t, this.channelProfile, this.clientRole, this.slsReporter, i), this.initMessageCenter(), this.messageCenter.once("onJoinChannelResult", (d) => {
|
|
10075
10090
|
var h, f, u;
|
|
10076
|
-
if (
|
|
10091
|
+
if (T.info(`[${Qe.logName}]`, "join result: ", d), c.taskretrynum = ((h = this.messageCenter) == null ? void 0 : h.retryCount) || 0, d.code == 200) {
|
|
10077
10092
|
(f = this.messageCenter) == null || f.sendPkgCache(), (u = this.messageCenter) == null || u.startKeepAlive();
|
|
10078
10093
|
let b = d.data;
|
|
10079
10094
|
b.tid = d.tid, b.users = d.data.users, b.timestamp = d.timestamp, c.est && (c.joinconnecttc = Date.now() - c.est), this.slsReporter.reportJoinConnection(c), n(b);
|
|
@@ -10081,32 +10096,32 @@ const Mi = (Qe = class extends je {
|
|
|
10081
10096
|
this.reset(), o(this.handleSignalError(d.code, d.reason, U.ERR_JOIN_CHANNEL_FAILED));
|
|
10082
10097
|
}), this.messageCenter.once("onAuthInvalid", () => {
|
|
10083
10098
|
this.reset(), o(new V(U.ERR_JOIN_BAD_TOKEN, "join failed because authentication failed"));
|
|
10084
|
-
}),
|
|
10085
|
-
const l = { appid: this.authInfo.appId, channelid: this.authInfo.channelId, userid: this.authInfo.userId, nonce: this.authInfo.nonce || "", timestamp: this.authInfo.timestamp, token: this.authInfo.token, authtype: "app", tid:
|
|
10099
|
+
}), T.info(`[${Qe.logName}]`, "start ws connecting roomserver and auto join when connected");
|
|
10100
|
+
const l = { appid: this.authInfo.appId, channelid: this.authInfo.channelId, userid: this.authInfo.userId, nonce: this.authInfo.nonce || "", timestamp: this.authInfo.timestamp, token: this.authInfo.token, authtype: "app", tid: ct() };
|
|
10086
10101
|
e.role && (l.tokenrole = e.role), c.est = Date.now(), this.messageCenter.start(this.roomServerUri + "?" + ke.queryingParam(l), r);
|
|
10087
10102
|
});
|
|
10088
10103
|
});
|
|
10089
10104
|
}
|
|
10090
10105
|
leave() {
|
|
10091
|
-
return
|
|
10106
|
+
return T.info("[roomsig] leave .."), new Promise((e, t) => {
|
|
10092
10107
|
this.messageCenter ? (this.messageCenter.on("onLeaveResult", (i, r) => {
|
|
10093
|
-
|
|
10094
|
-
}),
|
|
10108
|
+
T.info(`[${Qe.logName}]`, "recv leave response " + i), i === 200 ? (this.updateReconnectData(), this.reset(), e({ tid: r })) : t(this.handleSignalError(i, "leave error"));
|
|
10109
|
+
}), T.info(`[${Qe.logName}]`, "send leave request"), this.messageCenter.leave()) : (T.info(`[${Qe.logName}]`, "no message center, ok to leave"), e({ tid: "" }));
|
|
10095
10110
|
});
|
|
10096
10111
|
}
|
|
10097
10112
|
publish(e) {
|
|
10098
10113
|
return new Promise((t, i) => {
|
|
10099
10114
|
var r;
|
|
10100
10115
|
this.messageCenter ? (this.messageCenter.once("onPublishResult", (n, o, c) => {
|
|
10101
|
-
|
|
10102
|
-
}), this.authInfo && (e.sessionid = (r = this.authInfo.sessionId) != null ? r : ""), e.callid || (e.callid =
|
|
10116
|
+
T.info(`[${Qe.logName}]`, "recv pubish response " + n), n === 200 ? (this.updateReconnectData(dt(J({}, this.reconnectData), { publish: { users: [e] } })), t({ tid: o })) : i(this.handleSignalError(n, `publish error, ${c}`));
|
|
10117
|
+
}), this.authInfo && (e.sessionid = (r = this.authInfo.sessionId) != null ? r : ""), e.callid || (e.callid = ct()), T.info(`[${Qe.logName}]`, "assign callid " + e.callid + " and send publish request"), this.messageCenter.publish(e)) : i(this.handleSignalError(-1, "publish error, no message center"));
|
|
10103
10118
|
});
|
|
10104
10119
|
}
|
|
10105
10120
|
roleUpdate(e) {
|
|
10106
10121
|
return new Promise((t, i) => {
|
|
10107
10122
|
this.messageCenter ? (this.messageCenter.on("onRoleUpdateResult", (r, n, o) => {
|
|
10108
10123
|
var c, l;
|
|
10109
|
-
|
|
10124
|
+
T.info(`[${Qe.logName}]`, "recv role update response " + r), r === 200 ? ((l = (c = this.reconnectData) == null ? void 0 : c.role) != null && l.clientrole && (this.reconnectData.role.clientrole = e, this.updateReconnectData(this.reconnectData)), t({ tid: n })) : i(this.handleSignalError(r, `role update error, ${o}`));
|
|
10110
10125
|
}), this.messageCenter.roleUpdate(e)) : i(this.handleSignalError(-1, "role update error, no message center"));
|
|
10111
10126
|
});
|
|
10112
10127
|
}
|
|
@@ -10114,15 +10129,15 @@ const Mi = (Qe = class extends je {
|
|
|
10114
10129
|
this.channelProfile = e;
|
|
10115
10130
|
}
|
|
10116
10131
|
refreshUrl(e) {
|
|
10117
|
-
return
|
|
10132
|
+
return T.info(`[${Qe.logName}]`, "refreshUrl .."), new Promise((t, i) => {
|
|
10118
10133
|
this.messageCenter ? (this.messageCenter.on("onRefreshUrlResult", (r) => {
|
|
10119
10134
|
const { code: n, description: o, data: c = {} } = r || {};
|
|
10120
|
-
|
|
10121
|
-
}),
|
|
10135
|
+
T.info("recv refresh url response " + n), n === 200 ? t(c) : i(this.handleSignalError(n, `refresh url error, ${o}`));
|
|
10136
|
+
}), T.info("send refresh url request"), this.messageCenter.refreshUrl(e)) : i(this.handleSignalError(-1, "refresh url error, no message center"));
|
|
10122
10137
|
});
|
|
10123
10138
|
}
|
|
10124
10139
|
reportStatus(e) {
|
|
10125
|
-
return
|
|
10140
|
+
return T.info(`[${Qe.logName}]`, "reportStatus " + e), new Promise((t, i) => {
|
|
10126
10141
|
this.messageCenter ? (this.messageCenter.once("onStatusReport", (r, n) => {
|
|
10127
10142
|
r === 200 ? t() : i(new V(r, n));
|
|
10128
10143
|
}), this.messageCenter.reportStatus(e)) : i(new V(-1, "No messageCenter"));
|
|
@@ -10168,7 +10183,7 @@ const Mi = (Qe = class extends je {
|
|
|
10168
10183
|
});
|
|
10169
10184
|
}
|
|
10170
10185
|
}, p(Qe, "logName", "RoomServerSignaling"), Qe);
|
|
10171
|
-
Sr([
|
|
10186
|
+
Sr([C()], Mi.prototype, "join", 1), Sr([C()], Mi.prototype, "publish", 1), Sr([C()], Mi.prototype, "roleUpdate", 1);
|
|
10172
10187
|
let nl = Mi;
|
|
10173
10188
|
var ol = Object.defineProperty, cl = Object.getOwnPropertyDescriptor;
|
|
10174
10189
|
class Wr extends je {
|
|
@@ -10186,11 +10201,11 @@ class Wr extends je {
|
|
|
10186
10201
|
}
|
|
10187
10202
|
reset() {
|
|
10188
10203
|
var e;
|
|
10189
|
-
|
|
10204
|
+
T.info("[signalingmanager] reset"), (e = this.signaling) == null || e.reset(), this.signaling = void 0, this.authInfo = void 0;
|
|
10190
10205
|
}
|
|
10191
10206
|
join(e, t = e.userId, i, r, n) {
|
|
10192
10207
|
return this.maxSignalingReconnectDuration = i, this.userName = t, new Promise((o, c) => {
|
|
10193
|
-
this.signaling ? c(new V(U.ERR_JOIN_ALREADY_JOINED, "already joined")) : (
|
|
10208
|
+
this.signaling ? c(new V(U.ERR_JOIN_ALREADY_JOINED, "already joined")) : (T.info("[signalingmanager] create signaling"), this.signaling = new nl(this.channelProfile, this.clientRole, this.slsReporter, this.env), this.initSignaling(), r && (r.rs = Date.now()), this.signaling.join(e, t, i, n).then((l) => {
|
|
10194
10209
|
this.authInfo = e, r && (r.re = Date.now()), o(l);
|
|
10195
10210
|
}).catch((l) => {
|
|
10196
10211
|
this.reset(), c(l);
|
|
@@ -10310,7 +10325,7 @@ p(Wr, "logName", "SignalingManager");
|
|
|
10310
10325
|
for (var i, r = t > 1 ? void 0 : t ? cl(s, e) : s, n = a.length - 1; n >= 0; n--)
|
|
10311
10326
|
(i = a[n]) && (r = (t ? i(s, e, r) : i(r)) || r);
|
|
10312
10327
|
t && r && ol(s, e, r);
|
|
10313
|
-
})([
|
|
10328
|
+
})([C(B)], Wr.prototype, "publish", 1);
|
|
10314
10329
|
class ll {
|
|
10315
10330
|
constructor(s) {
|
|
10316
10331
|
p(this, "taskProfile");
|
|
@@ -10344,7 +10359,7 @@ class hl {
|
|
|
10344
10359
|
this.x = s, this.y = e, this.fontSize = t, this.zOrder = i, this.fontColor = r, this.fontType = n;
|
|
10345
10360
|
}
|
|
10346
10361
|
toJson(s, e) {
|
|
10347
|
-
return { x:
|
|
10362
|
+
return { x: mt(this.x, s), y: mt(this.y, e), fonttype: this.fontType, fontsize: this.fontSize, fontcolor: $r(this.fontColor), zorder: this.zOrder };
|
|
10348
10363
|
}
|
|
10349
10364
|
}
|
|
10350
10365
|
var Un = ((a) => (a[a.NOT_DISPLAY = 0] = "NOT_DISPLAY", a[a.ALWAYS = 1] = "ALWAYS", a[a.WHEN_NO_VIDEO = 2] = "WHEN_NO_VIDEO", a))(Un || {});
|
|
@@ -10361,7 +10376,7 @@ class Bn {
|
|
|
10361
10376
|
this.url = s, this.x = e, this.y = t, this.width = i, this.height = r, this.zOrder = n, this.alpha = o, this.display = c;
|
|
10362
10377
|
}
|
|
10363
10378
|
toJson(s, e) {
|
|
10364
|
-
return { url: this.url, alpha: this.alpha, display: this.display, x:
|
|
10379
|
+
return { url: this.url, alpha: this.alpha, display: this.display, x: mt(this.x, s), y: mt(this.y, e), width: mt(this.width, s), height: mt(this.height, e), zorder: this.zOrder };
|
|
10365
10380
|
}
|
|
10366
10381
|
}
|
|
10367
10382
|
p(Bn, "DisplayType", Un);
|
|
@@ -10377,7 +10392,7 @@ class ul {
|
|
|
10377
10392
|
this.text = s, this.x = e, this.y = t, this.fontSize = i, this.zOrder = r, this.fontColor = n, this.fontType = o;
|
|
10378
10393
|
}
|
|
10379
10394
|
toJson(s, e) {
|
|
10380
|
-
return { text: this.text, x:
|
|
10395
|
+
return { text: this.text, x: mt(this.x, s), y: mt(this.y, e), fonttype: this.fontType, fontsize: this.fontSize, fontcolor: $r(this.fontColor), zorder: this.zOrder };
|
|
10381
10396
|
}
|
|
10382
10397
|
}
|
|
10383
10398
|
class pl {
|
|
@@ -10395,7 +10410,7 @@ class pl {
|
|
|
10395
10410
|
this.userId = typeof s == "number" ? s.toString() : s, this.x = e, this.y = t, this.width = i, this.height = r, this.zOrder = n, o && (this.sourceType = o);
|
|
10396
10411
|
}
|
|
10397
10412
|
toJson(s, e, t, i) {
|
|
10398
|
-
const r = { paneid: s, majorpane: 0, x:
|
|
10413
|
+
const r = { paneid: s, majorpane: 0, x: mt(this.x, e), y: mt(this.y, t), width: mt(this.width, e), height: mt(this.height, t), zorder: this.zOrder, userid: this.userId, images: this.images.map((n) => n.toJson(e, t)), texts: this.texts.map((n) => n.toJson(e, t)) };
|
|
10399
10414
|
return this.sourceType && gi[this.sourceType] ? r.sourcetype = gi[this.sourceType] : r.sourcetype = gi[yi.LiveTranscodingCamera], this.segmentType && i === jr.LiveTranscodingVirtualBackground ? r.segmenttype = this.segmentType : r.segmenttype = Bi.LiveTranscodingNoBody, r;
|
|
10400
10415
|
}
|
|
10401
10416
|
}
|
|
@@ -10596,20 +10611,20 @@ const F = (W = class extends je {
|
|
|
10596
10611
|
p(this, "sessionId");
|
|
10597
10612
|
this.config = e;
|
|
10598
10613
|
const t = Date.now();
|
|
10599
|
-
|
|
10614
|
+
T.init(e == null ? void 0 : e.globalEnv), this.slsReporter = new rl(this, e == null ? void 0 : e.globalEnv), this.channelProfile = Dt.AliRtcSdkCommunication, this.clientRole = $t.AliRtcSdkLive, this.liveTranscoding = new Qc(this.slsReporter), this.signalingManager = new Wr(this.channelProfile, this.clientRole, this.slsReporter, (e == null ? void 0 : e.env) === ft.pre ? ft.pre : ft.prod), this.addSignalingManagerListeners(), this.maxSignalingReconnectDuration = e == null ? void 0 : e.maxSignalingReconnectDuration, this.bizControl = new Je({ slsReporter: this.slsReporter, signalingManager: this.signalingManager, parameter: e == null ? void 0 : e.parameter }), this.addBizControlListeners(), this.addPublisherListeners(), this.slsReporter.reportConnectionLatencyEvent(qe.CREATE_ENGINE, et.START, "", "", t), this.slsReporter.reportConnectionLatencyEvent(qe.CREATE_ENGINE, et.END, "", "", Date.now()), this.slsReporter.reportSDKCreated(t);
|
|
10600
10615
|
}
|
|
10601
10616
|
static getSdkVersion() {
|
|
10602
10617
|
return Ri;
|
|
10603
10618
|
}
|
|
10604
10619
|
static setLogLevel(e) {
|
|
10605
|
-
|
|
10620
|
+
T.setLogLevel(e);
|
|
10606
10621
|
}
|
|
10607
10622
|
static getInstance(e) {
|
|
10608
10623
|
return W._instance || (fe.ENV = (e == null ? void 0 : e.globalEnv) === "SEA" ? "SEA" : void 0, Pt == null || Pt.updateOptions({ region: (e == null ? void 0 : e.globalEnv) === "SEA" ? "sg" : "cn" }), Pt == null || Pt.setReady(), W._instance = new W(e)), W._instance;
|
|
10609
10624
|
}
|
|
10610
10625
|
destroy() {
|
|
10611
10626
|
return _(this, null, function* () {
|
|
10612
|
-
W._instance = void 0, yield this.leaveChannel(), yield this.bizControl.clear(),
|
|
10627
|
+
W._instance = void 0, yield this.leaveChannel(), yield this.bizControl.clear(), T.destroy();
|
|
10613
10628
|
});
|
|
10614
10629
|
}
|
|
10615
10630
|
get channel() {
|
|
@@ -10636,13 +10651,13 @@ const F = (W = class extends je {
|
|
|
10636
10651
|
}
|
|
10637
10652
|
addPublisherListeners() {
|
|
10638
10653
|
this.publisher.on(Ze.Local, (e) => {
|
|
10639
|
-
|
|
10654
|
+
T.event("[Publisher] Device Status Change", e), this.onLocalDeviceStatusChange(e);
|
|
10640
10655
|
}), this.publisher.on(Yt.VideoTrackEnded, () => {
|
|
10641
|
-
|
|
10656
|
+
T.event("[Publisher] VideoTrack Ended"), this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeCamera, Be.AliEngineLocalDeviceExceptionTypeCameraInterrupt, "");
|
|
10642
10657
|
}), this.publisher.on(Yt.ScreenTrackEnded, () => {
|
|
10643
|
-
|
|
10658
|
+
T.event("[Publisher] ScreenTrack Ended"), this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeDisplay, Be.AliEngineLocalDeviceExceptionTypeDisplayException, "");
|
|
10644
10659
|
}), this.publisher.on(Yt.AudioTrackEnded, () => {
|
|
10645
|
-
|
|
10660
|
+
T.event("[Publisher] AudioTrack Ended"), this.emit("localDeviceException", Tt.AliEngineLocalDeviceTypeMic, Be.AliEngineLocalDeviceExceptionTypeMicInterrupt, "");
|
|
10646
10661
|
}), this.publisher.on("localDeviceException", (e, t, i = "") => {
|
|
10647
10662
|
this.emit("localDeviceException", e, t, i);
|
|
10648
10663
|
}), this.publisher.on("audioPublishStateChanged", (e, t, i) => {
|
|
@@ -10663,13 +10678,13 @@ const F = (W = class extends je {
|
|
|
10663
10678
|
});
|
|
10664
10679
|
}
|
|
10665
10680
|
occurError(e, t) {
|
|
10666
|
-
|
|
10681
|
+
T.event(`[${W.logName}]`, "Occur Error", e, t), this.emit("onOccurError", e, t), this.emit("occurError", e, t);
|
|
10667
10682
|
}
|
|
10668
10683
|
addBizControlListeners() {
|
|
10669
10684
|
this.bizControl.rtsManager.on("disconnected", () => _(this, null, function* () {
|
|
10670
|
-
|
|
10685
|
+
T.event(`[${W.logName}]`, "RTS Disconnected"), (yield ke.isNetworkAvailable()) ? this.onNetworkRecovery() : this.onNetworkError();
|
|
10671
10686
|
})), this.bizControl.rtsManager.on("subscribeexceeds", () => _(this, null, function* () {
|
|
10672
|
-
|
|
10687
|
+
T.event(`[${W.logName}]`, "RTS SubscribeExceeds"), this.bizControl.rtsManager.clear(), yield this.resumePublishForNetworkRecovery(), yield this.resumeSubList();
|
|
10673
10688
|
})), this.bizControl.rtsManager.on("seimessage", (e, t, i) => _(this, null, function* () {
|
|
10674
10689
|
const r = this.remoteUsers.find((n) => ke.removeQueryString(n.streamUrl) === ke.removeQueryString(e));
|
|
10675
10690
|
if (r) {
|
|
@@ -10688,7 +10703,7 @@ const F = (W = class extends je {
|
|
|
10688
10703
|
}
|
|
10689
10704
|
}
|
|
10690
10705
|
})), this.bizControl.on(Ze.Remote, (e, t) => {
|
|
10691
|
-
|
|
10706
|
+
T.event(`[${W.logName}]`, "RemoteUser Device Status Change", e, t);
|
|
10692
10707
|
}), this.bizControl.on("remoteUserJoin", (e, t) => {
|
|
10693
10708
|
this.emit("remoteUserOnLineNotify", e, t);
|
|
10694
10709
|
}), this.bizControl.on("remoteTrackAvailableChange", (e, t, i) => {
|
|
@@ -10741,33 +10756,33 @@ const F = (W = class extends je {
|
|
|
10741
10756
|
}
|
|
10742
10757
|
addSignalingManagerListeners() {
|
|
10743
10758
|
this.signalingManager.on("onKeepAliveRsp", () => {
|
|
10744
|
-
this.networkError && (
|
|
10759
|
+
this.networkError && (T.event("[Signaling] Receive KeepAlive Response", `networkError: ${this.networkError}`), this.onNetworkRecovery());
|
|
10745
10760
|
}), this.signalingManager.on("onNotifyJoin", (e) => {
|
|
10746
|
-
|
|
10761
|
+
T.event("[Signaling] Notify Join ", e), this.handleUsersJoin(e);
|
|
10747
10762
|
}), this.signalingManager.on("onNotifyStatus", (e) => {
|
|
10748
|
-
|
|
10763
|
+
T.event("[Signaling] Notify Status ", e), e.forEach((t) => {
|
|
10749
10764
|
this.bizControl.updateRemoteUserDeviceStatus(t);
|
|
10750
10765
|
});
|
|
10751
10766
|
}), this.signalingManager.on("onNotifyLeave", (e) => {
|
|
10752
|
-
|
|
10767
|
+
T.event("[Signaling] Notify Leave ", e), e.forEach((t) => _(this, null, function* () {
|
|
10753
10768
|
yield this.bizControl.removeLeftUser(t), this.emit("remoteUserOffLineNotify", t.userid, t.leavecode);
|
|
10754
10769
|
}));
|
|
10755
10770
|
}), this.signalingManager.on("onBye", (e, t) => {
|
|
10756
|
-
|
|
10771
|
+
T.event("[Signaling] Bye ", e, t), this.slsReporter.reportError({ message: `reason: ${e}, description: ${t}` }), this.emit("bye", e), this.signalingManager.reset(), this.leaveChannel(), this.slsReporter.reportBye(e);
|
|
10757
10772
|
}), this.signalingManager.on("onConnectFail", (e) => {
|
|
10758
|
-
|
|
10773
|
+
T.event("[Signaling] Connect Failed ", e), this.onError(e), this.backToUnpublishStatus(), this.bizControl.leave(), this.signalingManager.reset(), this.connectState = re.AliRtcConnectionStatusFailed, this.emit("connectionStatusChange", re.AliRtcConnectionStatusFailed, wt.AliRtcConnectionChangedNetworkInterrupted);
|
|
10759
10774
|
}), this.signalingManager.on("onNetworkError", (e) => {
|
|
10760
|
-
this.slsReporter.reportWarning("signaling network error"),
|
|
10775
|
+
this.slsReporter.reportWarning("signaling network error"), T.event("[Signaling] Network error ", e), this.onNetworkError();
|
|
10761
10776
|
}), this.signalingManager.on("onAuthInvalid", () => {
|
|
10762
|
-
|
|
10777
|
+
T.event("[Signaling] Auth Invalid");
|
|
10763
10778
|
}), this.signalingManager.on("onReconnectStart", () => {
|
|
10764
|
-
this.onNetworkError(),
|
|
10779
|
+
this.onNetworkError(), T.event("[Signaling] Reconnect Start "), this.connectState = re.AliRtcConnectionStatusReconnecting, this.emit("connectionStatusChange", re.AliRtcConnectionStatusReconnecting, wt.AliRtcConnectionSignalingConnecting);
|
|
10765
10780
|
}), this.signalingManager.on("onReconnectSuccess", (e) => {
|
|
10766
|
-
|
|
10781
|
+
T.event("[Signaling] Reconnect Success ", e), this.onNetworkRecovery(e);
|
|
10767
10782
|
}), this.signalingManager.on("onReconnectFail", (e) => {
|
|
10768
|
-
this.slsReporter.reportWarning("signaling reconnect fail: ${err.code}"),
|
|
10783
|
+
this.slsReporter.reportWarning("signaling reconnect fail: ${err.code}"), T.event("[Signaling] Reconnect Failed ", e), e.code === 403 && this.emit("authInfoExpired");
|
|
10769
10784
|
}), this.signalingManager.on("onError", (e) => {
|
|
10770
|
-
this.slsReporter.reportWarning("signaling error: ${err.message}"),
|
|
10785
|
+
this.slsReporter.reportWarning("signaling error: ${err.message}"), T.event("[Signaling] Error ", e), this.onError(e);
|
|
10771
10786
|
}), this.signalingManager.on("onUnknownMessage", (e) => {
|
|
10772
10787
|
if (e.msgtype === "proxyai" && e.tid === this._proxyAiTid) {
|
|
10773
10788
|
let t = e.data.retcode;
|
|
@@ -10784,10 +10799,10 @@ const F = (W = class extends je {
|
|
|
10784
10799
|
});
|
|
10785
10800
|
}
|
|
10786
10801
|
onLocalDeviceStatusChange(e) {
|
|
10787
|
-
|
|
10788
|
-
|
|
10802
|
+
T.event(`[${W.logName}]`, Ze.Local, e), this.signalingManager.reportStatus(e).then(() => {
|
|
10803
|
+
T.debug("[signaling] reportStatus suc");
|
|
10789
10804
|
}).catch((t) => {
|
|
10790
|
-
|
|
10805
|
+
T.error("[signaling] reportStatus failed", t);
|
|
10791
10806
|
});
|
|
10792
10807
|
}
|
|
10793
10808
|
resumePublishForNetworkRecovery() {
|
|
@@ -10819,15 +10834,15 @@ const F = (W = class extends je {
|
|
|
10819
10834
|
}
|
|
10820
10835
|
onNetworkRecovery(e) {
|
|
10821
10836
|
return _(this, null, function* () {
|
|
10822
|
-
|
|
10837
|
+
T.event(W.logName, "onNetworkRecovery", `rts isConnected: ${this.bizControl.rtsManager.isConnected}; rts isConnecting: ${this.bizControl.rtsManager.isConnecting}`, { users: e }), yield this.resumeSubList(e), this.networkError && (this.networkError = !1, this.publisher.reportSelfDeviceStatus(), this.connectState = re.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", re.AliRtcConnectionStatusConnected, wt.AliRtcConnectionSignalingHeartbeatAlive));
|
|
10823
10838
|
});
|
|
10824
10839
|
}
|
|
10825
10840
|
resumeSubList(e) {
|
|
10826
10841
|
return _(this, null, function* () {
|
|
10827
10842
|
if (e) {
|
|
10828
10843
|
const { joinList: t, leaveList: i, presentList: r } = this.bizControl.diffUsers(e);
|
|
10829
|
-
|
|
10830
|
-
|
|
10844
|
+
T.info(`[${W.logName}]`, "resumeSubList", { joinList: t, leaveList: i, presentList: r }), this.handleUsersJoin(t), i.forEach((n) => {
|
|
10845
|
+
T.event(W.logName, Ce.UserLeft, n.userid, n.reason), this.bizControl.onRemotePublishStateChange({ userid: n.userid, displayname: "", callid: "", tracks: [] }), this.bizControl.removeLeftUser(n), this.emit("remoteUserOffLineNotify", n.userid, Lr.AliRtcUserOfflineQuit);
|
|
10831
10846
|
}), r.forEach((n) => {
|
|
10832
10847
|
this.bizControl.onRemotePublishStateChange(n);
|
|
10833
10848
|
});
|
|
@@ -10853,7 +10868,7 @@ const F = (W = class extends je {
|
|
|
10853
10868
|
this.connectState === re.AliRtcConnectionStatusConnected && (this.networkError || (this.connectState = re.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", re.AliRtcConnectionStatusDisconnected, wt.AliRtcConnectionChangedNetworkInterrupted)), this.networkError = !0);
|
|
10854
10869
|
}
|
|
10855
10870
|
onError(e) {
|
|
10856
|
-
this.slsReporter.reportError(e),
|
|
10871
|
+
this.slsReporter.reportError(e), T.event(W.logName, Ce.Error, e);
|
|
10857
10872
|
}
|
|
10858
10873
|
setEnableDualVideoStream(e, t) {
|
|
10859
10874
|
this.bizControl.setEnableDualVideoStream(e, t);
|
|
@@ -10879,7 +10894,7 @@ const F = (W = class extends je {
|
|
|
10879
10894
|
try {
|
|
10880
10895
|
yield this.publisher.startDefaultCameraAndMic(this._audioOnlyMode);
|
|
10881
10896
|
} catch (r) {
|
|
10882
|
-
|
|
10897
|
+
T.warn(`[${W.logName}]`, "startDefaultDevices failed", r.code, r.message), r instanceof V && this.occurError(r);
|
|
10883
10898
|
const n = r.code;
|
|
10884
10899
|
this.occurError(new V(n >= U.ERR_CAMERA_OPEN_FAIL && n <= U.ERR_CAMERA_NOT_AVAILABLE ? U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED : U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED, `auto publish device failed, ${r.message || ""}`));
|
|
10885
10900
|
}
|
|
@@ -10964,7 +10979,7 @@ const F = (W = class extends je {
|
|
|
10964
10979
|
{
|
|
10965
10980
|
if (h)
|
|
10966
10981
|
throw this.connectState = re.AliRtcConnectionStatusFailed, this.slsReporter.reportJoin(h.code, d, ""), this.slsReporter.reportJoinResult(h), h;
|
|
10967
|
-
c.sessionId = ke.createCallid("web"), this.sessionId = c.sessionId, this.slsReporter.start(c), this.slsReporter.reportConnectionLatencyEvent(qe.JOIN, et.START, "", "", o), this.connectState = re.AliRtcConnectionStatusConnecting, this.emit("connectionStatusChange", re.AliRtcConnectionStatusConnecting, wt.AliRtcConnectionSignalingConnecting),
|
|
10982
|
+
c.sessionId = ke.createCallid("web"), this.sessionId = c.sessionId, this.slsReporter.start(c), this.slsReporter.reportConnectionLatencyEvent(qe.JOIN, et.START, "", "", o), this.connectState = re.AliRtcConnectionStatusConnecting, this.emit("connectionStatusChange", re.AliRtcConnectionStatusConnecting, wt.AliRtcConnectionSignalingConnecting), T.setSessionID(c.appId, c.sessionId);
|
|
10968
10983
|
const f = () => _(this, null, function* () {
|
|
10969
10984
|
var g, m;
|
|
10970
10985
|
try {
|
|
@@ -10975,12 +10990,12 @@ const F = (W = class extends je {
|
|
|
10975
10990
|
const A = new mi(((g = this.config) == null ? void 0 : g.env) || ft.prod, c, S);
|
|
10976
10991
|
if (A.result) {
|
|
10977
10992
|
const w = (u = A.result.config, b = mn.EnableNonOnePcDefaultJoinMode, Wt(u == null ? void 0 : u.data, b));
|
|
10978
|
-
A.result.useonepc && w !== !1 || (S = ""),
|
|
10993
|
+
A.result.useonepc && w !== !1 || (S = ""), T.info(`[${mi.logName}]`, "got allocate result from localStorage", `joinMode: ${S}`, A.result.useonepc, w);
|
|
10979
10994
|
} else
|
|
10980
|
-
|
|
10995
|
+
T.info(`[${mi.logName}]`, "no allocate result in localStorage", `joinMode: ${S}`);
|
|
10981
10996
|
S && (i.joinmode = S);
|
|
10982
10997
|
const y = Date.now(), v = yield this.signalingManager.join(c, l, this.maxSignalingReconnectDuration, d, i);
|
|
10983
|
-
v.l1ip ? (
|
|
10998
|
+
v.l1ip ? (T.info("allocate l1 pub ip with mode", S, v.l1ip), this.bizControl.rtsManager.preferredPubL1Ip = v.l1ip) : this.bizControl.rtsManager.preferredPubL1Ip = void 0, v.l1subip ? (T.info("allocate l1 sub ip with mode", S, v.l1subip), this.bizControl.rtsManager.preferredSubL1Ip = v.l1subip) : this.bizControl.rtsManager.preferredSubL1Ip = void 0;
|
|
10984
10999
|
const E = Date.now();
|
|
10985
11000
|
this.connectState = re.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", re.AliRtcConnectionStatusConnected, wt.AliRtcConnectionSignalingJoinRoomSuccess), A.fetchAndUpdate(), this.bizControl.init(c, v, { capabilityProfile: typeof t == "object" ? t.capabilityProfile : Vi.Default, robotUserId: typeof t == "object" ? t.robotUserId : void 0 }), this.setCheckAuthInfoTimer(c.timestamp, v.timestamp), this.liveTranscoding.setAuthInfo(c), this.slsReporter.reportJoin(0, d, v.tid), this.slsReporter.reportJoinResult(null), this.slsReporter.reportConnectionLatencyEvent(qe.JOIN, et.SEND_SIG, "", "", y), this.slsReporter.reportConnectionLatencyEvent(qe.JOIN, et.RECV_RST, "", "", E), this.slsReporter.reportConnectionLatencyEvent(qe.JOIN, et.END, "", "");
|
|
10986
11001
|
} catch (S) {
|
|
@@ -10997,7 +11012,7 @@ const F = (W = class extends je {
|
|
|
10997
11012
|
}
|
|
10998
11013
|
joinAIChannel(e, t, i) {
|
|
10999
11014
|
return _(this, null, function* () {
|
|
11000
|
-
return this._proxyAiTid =
|
|
11015
|
+
return this._proxyAiTid = ct(), this._agentParam = i, this.joinChannel(e, t, { proxyai: { tid: this._proxyAiTid, region: i.region, proxydata: JSON.stringify({ Region: i.region, Action: i.action, ActionParams: i.params }) } });
|
|
11001
11016
|
});
|
|
11002
11017
|
}
|
|
11003
11018
|
leaveChannel() {
|
|
@@ -11014,7 +11029,7 @@ const F = (W = class extends je {
|
|
|
11014
11029
|
}
|
|
11015
11030
|
else
|
|
11016
11031
|
this.slsReporter.reportLeave(0, 0, "");
|
|
11017
|
-
this.sessionId = void 0, this.networkError = !1, this.connectState = re.AliRtcConnectionStatusDisconnected, this.clearCheckAuthInfoTimer(), this.liveTranscoding.clear(), this.slsReporter.stop(), this.signalingManager.reset(),
|
|
11032
|
+
this.sessionId = void 0, this.networkError = !1, this.connectState = re.AliRtcConnectionStatusDisconnected, this.clearCheckAuthInfoTimer(), this.liveTranscoding.clear(), this.slsReporter.stop(), this.signalingManager.reset(), T.reportEnd();
|
|
11018
11033
|
});
|
|
11019
11034
|
}
|
|
11020
11035
|
isInCall() {
|
|
@@ -11384,26 +11399,26 @@ const F = (W = class extends je {
|
|
|
11384
11399
|
isBeautyEnabled() {
|
|
11385
11400
|
const e = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
11386
11401
|
if (!e)
|
|
11387
|
-
throw new V(
|
|
11402
|
+
throw new V(Lt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
11388
11403
|
return !!(e != null && e.isEnable);
|
|
11389
11404
|
}
|
|
11390
11405
|
setBeautyEffect(e, t) {
|
|
11391
11406
|
const i = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
11392
11407
|
if (!i)
|
|
11393
|
-
throw new V(
|
|
11408
|
+
throw new V(Lt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
11394
11409
|
e ? i.enable() : i.disable(), i.setOptions({ basicBeauty: { skinBuffing: Math.max(Math.min(1, +t.smoothnessLevel), 0), whitening: Math.max(Math.min(1, +t.whiteningLevel), 0) } });
|
|
11395
11410
|
}
|
|
11396
11411
|
enableBackgroundExchange(e, t) {
|
|
11397
11412
|
const i = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
11398
11413
|
if (!i || !i.isEnable)
|
|
11399
|
-
throw new V(
|
|
11414
|
+
throw new V(Lt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
11400
11415
|
const r = { setSegmentBackgroundImage: { backgroundImgUrl: e ? t : "" } };
|
|
11401
11416
|
e && (r.segmentBackgroundProcess = { enable: !1 }), i.setOptions(r);
|
|
11402
11417
|
}
|
|
11403
11418
|
enableBackgroundBlur(e) {
|
|
11404
11419
|
const t = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
11405
11420
|
if (!t || !t.isEnable)
|
|
11406
|
-
throw new V(
|
|
11421
|
+
throw new V(Lt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
11407
11422
|
const i = { segmentBackgroundProcess: { type: 0, enable: e } };
|
|
11408
11423
|
e && (i.setSegmentBackgroundImage = { type: 0, backgroundImgUrl: "" }), t.setOptions(i);
|
|
11409
11424
|
}
|
|
@@ -11428,11 +11443,11 @@ const F = (W = class extends je {
|
|
|
11428
11443
|
return (yield fe.getMicList()).filter((e) => e.deviceId);
|
|
11429
11444
|
})), p(W, "getSpeakerList", () => _(W, null, function* () {
|
|
11430
11445
|
return (yield fe.getSpeakerList()).filter((e) => e.deviceId);
|
|
11431
|
-
})), p(W, "_instance"), p(W, "AliRtcSdkChannelProfile", Dt), p(W, "AliRtcSdkClientRole", $t), p(W, "AliRtcVideoStreamType", Ke), p(W, "AliRtcVideoTrack", le), p(W, "AliRtcAudioTrack", ci), p(W, "AliRtcPublishState", Z), p(W, "AliRtcSubscribeState", ae), p(W, "AliRtcRawDataStreamType", Oe), p(W, "AliRtcLogLevel", yn), p(W, "AliRtcEngineLocalDeviceType",
|
|
11432
|
-
$([
|
|
11446
|
+
})), p(W, "_instance"), p(W, "AliRtcSdkChannelProfile", Dt), p(W, "AliRtcSdkClientRole", $t), p(W, "AliRtcVideoStreamType", Ke), p(W, "AliRtcVideoTrack", le), p(W, "AliRtcAudioTrack", ci), p(W, "AliRtcPublishState", Z), p(W, "AliRtcSubscribeState", ae), p(W, "AliRtcRawDataStreamType", Oe), p(W, "AliRtcLogLevel", yn), p(W, "AliRtcEngineLocalDeviceType", Tt), p(W, "AliRtcEngineLocalDeviceExceptionType", Be), p(W, "AliRtcConnectionStatus", re), p(W, "AliRtcConnectionStatusChangeReason", wt), p(W, "AliRtcPlugin", Ut), p(W, "AliRtcPluginTrackType", Ai), p(W, "AliRtcImageHolderPlugin", gl), p(W, "AliRtcLiveTranscodingParam", Pr), p(W, "AliRtcLiveTranscodingEncodeParam", xn), p(W, "AliRtcLiveTranscodingMixParam", ll), p(W, "AliRtcLiveTranscodingSingleParam", dl), p(W, "AliRtcTranscodingClockWidget", hl), p(W, "AliRtcTranscodingImage", Bn), p(W, "AliRtcTranscodingText", ul), p(W, "AliRtcTranscodingUser", pl), p(W, "AliRtcLiveTranscodingMixMode", Ui), p(W, "AliRtcLiveTranscodingStreamType", Pn), p(W, "AliRtcLiveTranscodingSourceType", yi), p(W, "AliRtcLiveTranscodingTaskProfile", Dn), p(W, "AliRtcLiveTranscodingAudioSampleRate", Fr), p(W, "AliRtcLiveTranscodingSegmentType", Bi), p(W, "AliRtcLiveTranscodingFontType", zi), p(W, "AliRtcLiveTranscodingCropMode", Mn), p(W, "AliRtcLiveTranscodingMediaProcessMode", jr), p(W, "AliRtcLiveTranscodingState", Nn), p(W, "AliRtcLiveTranscodingErrorCode", It), p(W, "AliRtcTrascodingPublishTaskStatus", Ln), p(W, "AliRtcDataChannelMsg", Qt), p(W, "AliRtcDataMsgType", Tn), p(W, "Plugin", Ut), W);
|
|
11447
|
+
$([C()], F.prototype, "destroy", 1), $([C()], F.prototype, "backToUnpublishStatus", 1), $([C()], F.prototype, "resumePublishForNetworkRecovery", 1), $([C()], F.prototype, "onNetworkRecovery", 1), $([C()], F.prototype, "resumeSubList", 1), $([C(B)], F.prototype, "retrySubscribe", 1), $([C(B)], F.prototype, "setEnableDualVideoStream", 1), $([C(B)], F.prototype, "setChannelProfile", 1), $([C(B)], F.prototype, "setClientRole", 1), $([C(B)], F.prototype, "setAudioOnlyMode", 1), $([C()], F.prototype, "clearCheckAuthInfoTimer", 1), $([C(B)], F.prototype, "joinChannel", 1), $([C(B)], F.prototype, "joinAIChannel", 1), $([C(B)], F.prototype, "leaveChannel", 1), $([C(B)], F.prototype, "refreshAuthInfo", 1), $([C(B)], F.prototype, "publishLocalAudioStream", 1), $([C(B)], F.prototype, "setDefaultSubscribeAllRemoteAudioStreams", 1), $([C(B)], F.prototype, "subscribeAllRemoteAudioStreams", 1), $([C(B)], F.prototype, "subscribeRemoteAudioStream", 1), $([C(B)], F.prototype, "resumeRemoteAudioStream", 1), $([C(B)], F.prototype, "stopRemoteAudioPlay", 1), $([C(B)], F.prototype, "publishLocalVideoStream", 1), $([C(B)], F.prototype, "setRemoteDefaultVideoStreamType", 1), $([C(B)], F.prototype, "setRemoteUserVideoStreamType", 1), $([C(B)], F.prototype, "setDefaultSubscribeAllRemoteVideoStreams", 1), $([C(B)], F.prototype, "subscribeAllRemoteVideoStreams", 1), $([C(B)], F.prototype, "subscribeRemoteMediaStream", 1), $([C(B)], F.prototype, "resumeRemoteMediaStream", 1), $([C(([a]) => [`${a == null ? void 0 : a.audio}`])], F.prototype, "startScreenShare", 1), $([C()], F.prototype, "stopScreenShare", 1), $([C(B)], F.prototype, "setScreenShareConfiguration", 1), $([C(B)], F.prototype, "setScreenShareContentHint", 1), $([C()], F.prototype, "publishLocalScreenShareStream", 1), $([C(B)], F.prototype, "setAudioShareVolume", 1), $([C(B)], F.prototype, "enableAudioVolumeIndication", 1), $([C(B)], F.prototype, "muteLocalMic", 1), $([C(B)], F.prototype, "muteRemoteAudioPlaying", 1), $([C(B)], F.prototype, "muteAllRemoteAudioPlaying", 1), $([C(B)], F.prototype, "startAudioCapture", 1), $([C(B)], F.prototype, "setAudioConstraints", 1), $([C()], F.prototype, "stopAudioCapture", 1), $([C(B)], F.prototype, "switchMicrophone", 1), $([C(B)], F.prototype, "setRecordingVolume", 1), $([C(B)], F.prototype, "setPlayoutVolume", 1), $([C(B)], F.prototype, "setRemoteAudioVolume", 1), $([C(B)], F.prototype, "setAudioProfile", 1), $([C(B)], F.prototype, "getAudioTrack", 1), $([C(B)], F.prototype, "setLocalViewConfig", 1), $([C(B)], F.prototype, "setCameraCapturerConfiguration", 1), $([C(B)], F.prototype, "setCameraCapturerContentHint", 1), $([C(B)], F.prototype, "enableLocalVideo", 1), $([C(B)], F.prototype, "muteLocalCamera", 1), $([C(B)], F.prototype, "muteLocalScreen", 1), $([C(B)], F.prototype, "setRemoteViewConfig", 1), $([C(B)], F.prototype, "switchCamera", 1), $([C()], F.prototype, "startPreview", 1), $([C()], F.prototype, "startPreviewScreen", 1), $([C()], F.prototype, "stopPreview", 1), $([C()], F.prototype, "stopPreviewScreen", 1), $([C()], F.prototype, "startPublishLiveStream", 1), $([C()], F.prototype, "updatePublishLiveStream", 1), $([C()], F.prototype, "updatePublishLiveStreamWithTaskId", 1), $([C()], F.prototype, "stopPublishLiveStream", 1), $([C()], F.prototype, "stopPublishLiveStreamWithTaskId", 1), $([C(B)], F.prototype, "setEnableMediaExtensionMsg", 1), $([C(([a, s, e]) => [a.byteLength, s, e])], F.prototype, "sendMediaExtensionMsgEx", 1), $([C(([a, s]) => [a.name || "", s])], F.prototype, "enablePlugin", 1), $([C(B)], F.prototype, "removePlugin", 1), $([C(B)], F.prototype, "setPluginOption", 1), $([C(B)], F.prototype, "getPluginByName", 1), $([C(B)], F.prototype, "getPluginOption", 1), $([C(B)], F.prototype, "setBeautyEffect", 1), $([C(B)], F.prototype, "enableBackgroundExchange", 1), $([C(B)], F.prototype, "enableBackgroundBlur", 1), $([C(B)], F.prototype, "setParameter", 1), $([C(([a]) => {
|
|
11433
11448
|
var s;
|
|
11434
11449
|
return [(s = a.data) == null ? void 0 : s.byteLength];
|
|
11435
|
-
})], F.prototype, "sendDataChannelMessage", 1), $([
|
|
11450
|
+
})], F.prototype, "sendDataChannelMessage", 1), $([C(B)], F.prototype, "subscribeRemoteStream", 1), $([C(B)], F, "setLogLevel", 1);
|
|
11436
11451
|
let Hn = F;
|
|
11437
11452
|
var pn;
|
|
11438
11453
|
Pt = new Br({ businessName: "imp-web-rtc", version: (pn = Hn.getSdkVersion()) != null ? pn : "unknown", env: "prod", disabled: window.AliRtcOptionsDisableProxy === !0, deferRegionSet: !0 });
|
|
@@ -11445,13 +11460,13 @@ export {
|
|
|
11445
11460
|
Qt as AliRtcDataChannelMsg,
|
|
11446
11461
|
Tn as AliRtcDataMsgType,
|
|
11447
11462
|
Be as AliRtcEngineLocalDeviceExceptionType,
|
|
11448
|
-
|
|
11463
|
+
Tt as AliRtcEngineLocalDeviceType,
|
|
11449
11464
|
U as AliRtcErrorCode,
|
|
11450
11465
|
gl as AliRtcImageHolderPlugin,
|
|
11451
11466
|
Fr as AliRtcLiveTranscodingAudioSampleRate,
|
|
11452
11467
|
Mn as AliRtcLiveTranscodingCropMode,
|
|
11453
11468
|
xn as AliRtcLiveTranscodingEncodeParam,
|
|
11454
|
-
|
|
11469
|
+
It as AliRtcLiveTranscodingErrorCode,
|
|
11455
11470
|
zi as AliRtcLiveTranscodingFontType,
|
|
11456
11471
|
jr as AliRtcLiveTranscodingMediaProcessMode,
|
|
11457
11472
|
Ui as AliRtcLiveTranscodingMixMode,
|
|
@@ -11460,7 +11475,7 @@ export {
|
|
|
11460
11475
|
Bi as AliRtcLiveTranscodingSegmentType,
|
|
11461
11476
|
dl as AliRtcLiveTranscodingSingleParam,
|
|
11462
11477
|
yi as AliRtcLiveTranscodingSourceType,
|
|
11463
|
-
|
|
11478
|
+
Nn as AliRtcLiveTranscodingState,
|
|
11464
11479
|
Pn as AliRtcLiveTranscodingStreamType,
|
|
11465
11480
|
Dn as AliRtcLiveTranscodingTaskProfile,
|
|
11466
11481
|
an as AliRtcLocalStreamInfo,
|
|
@@ -11479,7 +11494,7 @@ export {
|
|
|
11479
11494
|
Bn as AliRtcTranscodingImage,
|
|
11480
11495
|
ul as AliRtcTranscodingText,
|
|
11481
11496
|
pl as AliRtcTranscodingUser,
|
|
11482
|
-
|
|
11497
|
+
Ln as AliRtcTrascodingPublishTaskStatus,
|
|
11483
11498
|
Ke as AliRtcVideoStreamType,
|
|
11484
11499
|
le as AliRtcVideoTrack,
|
|
11485
11500
|
Rl as default
|