@@ -10,10 +10,8 @@ import { BoolControl } from "comps/controls/boolControl";
10
10
import { StringControl } from "comps/controls/codeControl" ;
11
11
import {
12
12
booleanExposingStateControl ,
13
+ BooleanStateControl ,
13
14
jsonObjectExposingStateControl ,
14
- numberExposingStateControl ,
15
- numberStateControl ,
16
- stringExposingStateControl ,
17
15
stringStateControl ,
18
16
} from "comps/controls/codeStateControl" ;
19
17
import { PositionControl } from "comps/controls/dropdownControl" ;
@@ -29,7 +27,7 @@ import { BackgroundColorContext } from "comps/utils/backgroundColorContext";
29
27
import { CanvasContainerID } from "constants/domLocators" ;
30
28
import { Layers } from "constants/Layers" ;
31
29
import { trans } from "i18n" ;
32
- import { changeChildAction , changeValueAction } from "lowcoder-core" ;
30
+ import { changeChildAction } from "lowcoder-core" ;
33
31
import {
34
32
Drawer ,
35
33
HintPlaceHolder ,
@@ -55,7 +53,7 @@ import AgoraRTC, {
55
53
56
54
import { JSONValue } from "@lowcoder-ee/index.sdk" ;
57
55
import { getData } from "../listViewComp/listViewUtils" ;
58
- import AgoraRTM , { RtmChannel , RtmClient , RtmMessage } from "agora-rtm-sdk" ;
56
+ import AgoraRTM , { RtmChannel , RtmClient } from "agora-rtm-sdk" ;
59
57
60
58
const EventOptions = [ closeEvent ] as const ;
61
59
@@ -113,13 +111,13 @@ let screenShareStream: ILocalVideoTrack;
113
111
let userId : UID | null | undefined ;
114
112
let rtmChannelResponse : RtmChannel ;
115
113
let rtmClient : RtmClient ;
114
+ const agoraTokenUrl = `https://sandbox.wiggolive.com/token/rtc` ;
116
115
117
116
const generateToken = async (
118
117
appId : any ,
119
118
certificate : any ,
120
119
channelName : any
121
120
) => {
122
- const agoraTokenUrl = `https://sandbox.wiggolive.com/token/rtc` ;
123
121
let response = await axios . post ( agoraTokenUrl , {
124
122
appId,
125
123
certificate,
@@ -204,8 +202,8 @@ const publishVideo = async (
204
202
const videoSettings = mediaStreamTrack . getSettings ( ) ;
205
203
const videoWidth = videoSettings . width ;
206
204
const videoHeight = videoSettings . height ;
207
- height . videoWidth . change ( videoWidth ) ;
208
- height . videoHeight . change ( videoHeight ) ;
205
+ // height.videoWidth.change(videoWidth);
206
+ // height.videoHeight.change(videoHeight);
209
207
}
210
208
} ;
211
209
@@ -230,7 +228,7 @@ const rtmInit = async (appId: any, uid: any, channel: any) => {
230
228
} ;
231
229
232
230
export const meetingControllerChildren = {
233
- visible : booleanExposingStateControl ( "visible" ) ,
231
+ visible : withDefault ( BooleanStateControl , "visible" ) ,
234
232
onEvent : eventHandlerControl ( EventOptions ) ,
235
233
width : StringControl ,
236
234
height : StringControl ,
@@ -239,20 +237,17 @@ export const meetingControllerChildren = {
239
237
placement : PositionControl ,
240
238
maskClosable : withDefault ( BoolControl , true ) ,
241
239
showMask : withDefault ( BoolControl , true ) ,
242
- audioControl : booleanExposingStateControl ( "false" ) ,
243
- videoControl : booleanExposingStateControl ( "true" ) ,
244
- endCall : booleanExposingStateControl ( "false" ) ,
245
- sharing : booleanExposingStateControl ( "false" ) ,
246
- videoSettings : jsonObjectExposingStateControl ( "" ) ,
247
- videoWidth : numberStateControl ( 200 ) ,
248
- videoHeight : numberStateControl ( 200 ) ,
240
+ meetingActive : withDefault ( BooleanStateControl , "false" ) ,
241
+ audioControl : withDefault ( BooleanStateControl , "false" ) ,
242
+ videoControl : withDefault ( BooleanStateControl , "true" ) ,
243
+ endCall : withDefault ( BooleanStateControl , "false" ) ,
244
+ sharing : withDefault ( BooleanStateControl , "false" ) ,
249
245
appId : withDefault ( StringControl , trans ( "meeting.appid" ) ) ,
250
246
participants : stateComp < JSONValue > ( [ ] ) ,
251
247
usersScreenShared : stateComp < JSONValue > ( [ ] ) ,
252
248
localUser : jsonObjectExposingStateControl ( "" ) ,
253
249
meetingName : stringStateControl ( "meetingName" ) ,
254
- userName : stringStateControl ( "userName" ) ,
255
- certifiCateKey : stringExposingStateControl ( "" ) ,
250
+ certifiCateKey : stringStateControl ( "" ) ,
256
251
messages : stateComp < JSONValue > ( [ ] ) ,
257
252
} ;
258
253
let MTComp = ( function ( ) {
@@ -628,6 +623,7 @@ MTComp = withMethodExposing(MTComp, [
628
623
comp . children ,
629
624
comp . children . certifiCateKey . getView ( ) . value
630
625
) ;
626
+ comp . children . meetingActive . change ( true ) ;
631
627
} ,
632
628
} ,
633
629
{
@@ -690,6 +686,7 @@ MTComp = withMethodExposing(MTComp, [
690
686
execute : async ( comp , values ) => {
691
687
let value = ! comp . children . endCall . getView ( ) . value ;
692
688
comp . children . endCall . change ( value ) ;
689
+ comp . children . meetingActive . change ( false ) ;
693
690
694
691
await leaveChannel ( ) ;
695
692
@@ -716,6 +713,8 @@ export const VideoMeetingControllerComp = withExposingConfigs(MTComp, [
716
713
new NameConfig ( "appId" , trans ( "meeting.appid" ) ) ,
717
714
new NameConfig ( "localUser" , trans ( "meeting.host" ) ) ,
718
715
new NameConfig ( "participants" , trans ( "meeting.participants" ) ) ,
716
+ new NameConfig ( "meetingActive" , trans ( "meeting.meetingName" ) ) ,
719
717
new NameConfig ( "meetingName" , trans ( "meeting.meetingName" ) ) ,
720
718
new NameConfig ( "messages" , trans ( "meeting.meetingName" ) ) ,
721
719
] ) ;
720
+
0 commit comments