|
@@ -7,6 +7,7 @@ import { state } from '/src/state'
|
|
|
import event, { LIVE_EVENT_MESSAGE } from './event'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { removeToken } from '/src/utils/auth';
|
|
|
+import qs from 'query-string'
|
|
|
// import { SeatsCtrl } from './message-type'
|
|
|
|
|
|
type imConnectStatus = 'connecting' | 'connected' | 'disconnect'
|
|
@@ -166,7 +167,11 @@ const Events = RongIMLib.Events
|
|
|
RongIMLib.addEventListener(Events.DISCONNECT, () => {
|
|
|
console.log('disconnect')
|
|
|
runtime.imConnectStatus = 'disconnect'
|
|
|
- event.emit(LIVE_EVENT_MESSAGE["RC:ForcedOffline"])
|
|
|
+ closeLive(true, 'IM')
|
|
|
+ const search = qs.parse(window.location.search)
|
|
|
+ console.log(search, 'disconnect')
|
|
|
+ window.location.href = window.location.origin +'/live?' + qs.stringify({ ...search, time: new Date().getTime() })
|
|
|
+ // event.emit(LIVE_EVENT_MESSAGE["RC:ForcedOffline"])
|
|
|
// if (runtime.joinedRoom && runtime.videoStatus === 'liveing') {
|
|
|
// closeLive(true, 'IM')
|
|
|
// }
|