|
@@ -51,6 +51,9 @@ import {
|
|
|
prettierReceiveWsMsg,
|
|
prettierReceiveWsMsg,
|
|
|
} from '@/utils/network/webSocket';
|
|
} from '@/utils/network/webSocket';
|
|
|
|
|
|
|
|
|
|
+import { useForwardAll } from './webrtc/forwardAll';
|
|
|
|
|
+import { useForwardBilibili } from './webrtc/forwardBilibili';
|
|
|
|
|
+import { useForwardDouyu } from './webrtc/forwardDouyu';
|
|
|
import { useWebRtcRemoteDesk } from './webrtc/remoteDesk';
|
|
import { useWebRtcRemoteDesk } from './webrtc/remoteDesk';
|
|
|
|
|
|
|
|
export const useWebsocket = () => {
|
|
export const useWebsocket = () => {
|
|
@@ -64,6 +67,9 @@ export const useWebsocket = () => {
|
|
|
useWebRtcRemoteDesk();
|
|
useWebRtcRemoteDesk();
|
|
|
const { updateWebRtcMeetingPkConfig, webRtcMeetingPk } = useWebRtcMeetingPk();
|
|
const { updateWebRtcMeetingPkConfig, webRtcMeetingPk } = useWebRtcMeetingPk();
|
|
|
const { updateWebRtcSrsConfig, webRtcSrs } = useWebRtcSrs();
|
|
const { updateWebRtcSrsConfig, webRtcSrs } = useWebRtcSrs();
|
|
|
|
|
+ const { updateForwardBilibiliConfig, forwardBilibili } = useForwardBilibili();
|
|
|
|
|
+ const { updateForwardAllConfig, forwardAll } = useForwardAll();
|
|
|
|
|
+ const { updateForwardDouyuConfig, forwardDouyu } = useForwardDouyu();
|
|
|
const { updateWebRtcTencentcloudCssConfig, webRtcTencentcloudCss } =
|
|
const { updateWebRtcTencentcloudCssConfig, webRtcTencentcloudCss } =
|
|
|
useWebRtcTencentcloudCss();
|
|
useWebRtcTencentcloudCss();
|
|
|
const { updateWebRtcLiveConfig, webRtcLive } = useWebRtcLive();
|
|
const { updateWebRtcLiveConfig, webRtcLive } = useWebRtcLive();
|
|
@@ -186,6 +192,51 @@ export const useWebsocket = () => {
|
|
|
sender: mySocketId.value,
|
|
sender: mySocketId.value,
|
|
|
receiver: 'srs',
|
|
receiver: 'srs',
|
|
|
});
|
|
});
|
|
|
|
|
+ } else if (type === LiveRoomTypeEnum.forward_bilibili) {
|
|
|
|
|
+ updateForwardBilibiliConfig({
|
|
|
|
|
+ isPk: false,
|
|
|
|
|
+ roomId: roomId.value,
|
|
|
|
|
+ canvasVideoStream: canvasVideoStream.value,
|
|
|
|
|
+ });
|
|
|
|
|
+ forwardBilibili.newWebRtc({
|
|
|
|
|
+ sender: mySocketId.value,
|
|
|
|
|
+ receiver: 'srs',
|
|
|
|
|
+ videoEl: createNullVideo(),
|
|
|
|
|
+ });
|
|
|
|
|
+ forwardBilibili.sendOffer({
|
|
|
|
|
+ sender: mySocketId.value,
|
|
|
|
|
+ receiver: 'srs',
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (type === LiveRoomTypeEnum.forward_huya) {
|
|
|
|
|
+ updateForwardDouyuConfig({
|
|
|
|
|
+ isPk: false,
|
|
|
|
|
+ roomId: roomId.value,
|
|
|
|
|
+ canvasVideoStream: canvasVideoStream.value,
|
|
|
|
|
+ });
|
|
|
|
|
+ forwardDouyu.newWebRtc({
|
|
|
|
|
+ sender: mySocketId.value,
|
|
|
|
|
+ receiver: 'srs',
|
|
|
|
|
+ videoEl: createNullVideo(),
|
|
|
|
|
+ });
|
|
|
|
|
+ forwardDouyu.sendOffer({
|
|
|
|
|
+ sender: mySocketId.value,
|
|
|
|
|
+ receiver: 'srs',
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (type === LiveRoomTypeEnum.forward_all) {
|
|
|
|
|
+ updateForwardAllConfig({
|
|
|
|
|
+ isPk: false,
|
|
|
|
|
+ roomId: roomId.value,
|
|
|
|
|
+ canvasVideoStream: canvasVideoStream.value,
|
|
|
|
|
+ });
|
|
|
|
|
+ forwardAll.newWebRtc({
|
|
|
|
|
+ sender: mySocketId.value,
|
|
|
|
|
+ receiver: 'srs',
|
|
|
|
|
+ videoEl: createNullVideo(),
|
|
|
|
|
+ });
|
|
|
|
|
+ forwardAll.sendOffer({
|
|
|
|
|
+ sender: mySocketId.value,
|
|
|
|
|
+ receiver: 'srs',
|
|
|
|
|
+ });
|
|
|
} else if (type === LiveRoomTypeEnum.tencent_css) {
|
|
} else if (type === LiveRoomTypeEnum.tencent_css) {
|
|
|
updateWebRtcTencentcloudCssConfig({
|
|
updateWebRtcTencentcloudCssConfig({
|
|
|
isPk: false,
|
|
isPk: false,
|