|
@@ -1,4 +1,4 @@
|
|
|
-import AgoraRTM, { RTMEvents, ChannelType, RTMClient, RTMConfig, MetadataItem } from "agora-rtm-sdk"
|
|
|
|
|
|
|
+import AgoraRTM, { ChannelType, RTMClient, RTMConfig, MetadataItem } from "agora-rtm-sdk"
|
|
|
import { mapToArray, isString, apiGetAgoraToken, getDefaultLanguageSelect } from "../../common"
|
|
import { mapToArray, isString, apiGetAgoraToken, getDefaultLanguageSelect } from "../../common"
|
|
|
import { AGEventEmitter } from "../events"
|
|
import { AGEventEmitter } from "../events"
|
|
|
import {
|
|
import {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
ValueOf,
|
|
ValueOf,
|
|
|
ILanguageItem,
|
|
ILanguageItem,
|
|
|
} from "./types"
|
|
} from "./types"
|
|
|
-import { ISttData, Role, ILanguageSelect } from "../../types"
|
|
|
|
|
|
|
+import { ISttData } from "../../types"
|
|
|
import { DEFAULT_RTM_CONFIG } from "./constant"
|
|
import { DEFAULT_RTM_CONFIG } from "./constant"
|
|
|
|
|
|
|
|
const { RTM } = AgoraRTM
|
|
const { RTM } = AgoraRTM
|
|
@@ -161,7 +161,7 @@ export class RtmManager extends AGEventEmitter<RtmEvents> {
|
|
|
})
|
|
})
|
|
|
this.client?.addEventListener("presence", (res) => {
|
|
this.client?.addEventListener("presence", (res) => {
|
|
|
console.log("[test] presence", res)
|
|
console.log("[test] presence", res)
|
|
|
- const { channelName, channelType, eventType, snapshot = [], stateChanged, publisher } = res
|
|
|
|
|
|
|
+ const { channelName, eventType, snapshot = [], stateChanged, publisher } = res
|
|
|
if (channelName == this.channel) {
|
|
if (channelName == this.channel) {
|
|
|
switch (eventType) {
|
|
switch (eventType) {
|
|
|
case "SNAPSHOT":
|
|
case "SNAPSHOT":
|