|
@@ -392,6 +392,13 @@ export const startLive = async (resetTime = true) => {
|
|
|
// await builder.setOutputVideoRenderMode?.(RTC.MixVideoRenderMode.WHOLE)
|
|
|
// // @ts-ignore
|
|
|
// await builder.flush()
|
|
|
+ await request.post('/api-web/imLiveBroadcastRoom/opsLiveVideo', {
|
|
|
+ data: {
|
|
|
+ type: '1',
|
|
|
+ roomUid: runtime.roomUid,
|
|
|
+ userId: state.user?.speakerId,
|
|
|
+ }
|
|
|
+ })
|
|
|
runtime.videoStatus = 'liveing'
|
|
|
}
|
|
|
if (resetTime) {
|
|
@@ -405,13 +412,13 @@ export const startLive = async (resetTime = true) => {
|
|
|
*/
|
|
|
export const closeLive = async () => {
|
|
|
// removeMedia(runtime.mediaStreams, runtime.mediaStreamTrack)
|
|
|
- // await request.post('/api-im/user/statusImUser', {
|
|
|
- // data: {
|
|
|
- // os: 'PC',
|
|
|
- // status: 3,
|
|
|
- // userId: state.user?.id,
|
|
|
- // }
|
|
|
- // })
|
|
|
+ await request.post('/api-web/imLiveBroadcastRoom/opsLiveVideo', {
|
|
|
+ data: {
|
|
|
+ type: '2',
|
|
|
+ roomUid: runtime.roomUid,
|
|
|
+ userId: state.user?.speakerId,
|
|
|
+ }
|
|
|
+ })
|
|
|
sessionStorage.removeItem(START_LIVE_TIME)
|
|
|
sessionStorage.removeItem(START_LIVE_STATUS)
|
|
|
runtime.videoStatus = 'stream'
|