This commit is contained in:
yj 2025-02-19 18:02:14 +08:00
parent fdceae0c76
commit 2576d53a14
4 changed files with 61 additions and 8 deletions

View File

@ -153,7 +153,7 @@
&-up { &-up {
position: fixed; position: fixed;
z-index: 5; z-index: 5;
right: 7.4%; right: 65px;
top: 14%; top: 14%;
color: white; color: white;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
@ -169,7 +169,7 @@
&-down { &-down {
position: fixed; position: fixed;
z-index: 5; z-index: 5;
right: 7.4%; right: 65px;
bottom: 14%; bottom: 14%;
color: white; color: white;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);

View File

@ -609,6 +609,27 @@ Page({
case 'SetSpeaker': case 'SetSpeaker':
await onInvoke('SetSpeakerCallback', item.RoomManagerInputDTO) await onInvoke('SetSpeakerCallback', item.RoomManagerInputDTO)
break; break;
// 扩展参数
case 'ReceivedOperation':
try {
const temp = JSON.parse(item.contentString)
if (temp.type === 'audio') {
await PostOpenMicr({
roomNum: temp.roomNum,
uid: temp.uid,
enableMicr: temp.enableMicr
})
} else {
await PostOpenCamera({
roomNum: temp.roomNum,
uid: temp.uid,
enableCamera: temp.enableCamera
})
}
} catch (error) {
}
break;
} }
}) })
}, },
@ -876,11 +897,20 @@ Page({
enableMicr enableMicr
}) })
} else { } else {
await PostOpenMicr({ await onInvoke('sendOper2User', {
uid,
contentString: JSON.stringify({
roomNum: this.data.channelId, roomNum: this.data.channelId,
uid, uid,
enableMicr enableMicr,
type: 'audio'
}) })
})
// await PostOpenMicr({
// roomNum: this.data.channelId,
// uid,
// enableMicr
// })
} }
if (isMessage) { if (isMessage) {
this.message('操作成功').success() this.message('操作成功').success()
@ -892,11 +922,20 @@ Page({
} else { } else {
// await agora.stopCameraCapture(); // await agora.stopCameraCapture();
} }
await PostOpenCamera({ await onInvoke('sendOper2User', {
uid,
contentString: JSON.stringify({
roomNum: this.data.channelId, roomNum: this.data.channelId,
uid, uid,
enableCamera enableCamera,
type: 'video'
}) })
})
// await PostOpenCamera({
// roomNum: this.data.channelId,
// uid,
// enableCamera
// })
if (isMessage) { if (isMessage) {
this.message('操作成功').success() this.message('操作成功').success()
} }

View File

@ -59,6 +59,8 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="meeting-content-smallvideo-box"><view class="meeting-content-smallvideo-box-view"></view></view>
<view class="meeting-content-smallvideo-box"><view class="meeting-content-smallvideo-box-view"></view></view> -->
<view class="meeting-content-smallvideo-up" bind:tap="scrollUp" wx:if="{{!isFullscreen && showScroll && isAdmin >0}}"> <view class="meeting-content-smallvideo-up" bind:tap="scrollUp" wx:if="{{!isFullscreen && showScroll && isAdmin >0}}">
<t-icon name="chevron-up" size="24rpx" data-name="chevron-up" /> <t-icon name="chevron-up" size="24rpx" data-name="chevron-up" />
</view> </view>

View File

@ -68,6 +68,10 @@ export const onInvoke = async (str: string, data: any) => {
// 发言人设置成功 // 发言人设置成功
await connection.invoke(str, data) await connection.invoke(str, data)
break; break;
case 'sendOper2User':
// 扩展参数
await connection.invoke(str, data.uid, data.contentString)
break;
} }
} }
export const onSignalr = (callBack: Function) => { export const onSignalr = (callBack: Function) => {
@ -204,6 +208,13 @@ export const onSignalr = (callBack: Function) => {
RoomManagerInputDTO RoomManagerInputDTO
}) })
}); });
// 扩展参数
connection.on("ReceivedOperation", (contentString) => {
callBack({
key: 'ReceivedOperation',
contentString
})
});
} }
} }
export const onStop = async () => { export const onStop = async () => {
@ -261,6 +272,7 @@ export const offSignalr = () => {
connection.off('SetDriver'); connection.off('SetDriver');
connection.off('ShowDriverList'); connection.off('ShowDriverList');
connection.off('SetSpeaker'); connection.off('SetSpeaker');
connection.off('ReceivedOperation');
} }
} }