@@ -10,10 +10,8 @@ import { BoolControl } from "comps/controls/boolControl";
1010import { StringControl } from "comps/controls/codeControl" ;
1111import {
1212 booleanExposingStateControl ,
13+ BooleanStateControl ,
1314 jsonObjectExposingStateControl ,
14- numberExposingStateControl ,
15- numberStateControl ,
16- stringExposingStateControl ,
1715 stringStateControl ,
1816} from "comps/controls/codeStateControl" ;
1917import { PositionControl } from "comps/controls/dropdownControl" ;
@@ -29,7 +27,7 @@ import { BackgroundColorContext } from "comps/utils/backgroundColorContext";
2927import { CanvasContainerID } from "constants/domLocators" ;
3028import { Layers } from "constants/Layers" ;
3129import { trans } from "i18n" ;
32- import { changeChildAction , changeValueAction } from "lowcoder-core" ;
30+ import { changeChildAction } from "lowcoder-core" ;
3331import {
3432 Drawer ,
3533 HintPlaceHolder ,
@@ -55,7 +53,7 @@ import AgoraRTC, {
5553
5654import { JSONValue } from "@lowcoder-ee/index.sdk" ;
5755import { getData } from "../listViewComp/listViewUtils" ;
58- import AgoraRTM , { RtmChannel , RtmClient , RtmMessage } from "agora-rtm-sdk" ;
56+ import AgoraRTM , { RtmChannel , RtmClient } from "agora-rtm-sdk" ;
5957
6058const EventOptions = [ closeEvent ] as const ;
6159
@@ -113,13 +111,13 @@ let screenShareStream: ILocalVideoTrack;
113111let userId : UID | null | undefined ;
114112let rtmChannelResponse : RtmChannel ;
115113let rtmClient : RtmClient ;
114+ const agoraTokenUrl = `https://sandbox.wiggolive.com/token/rtc` ;
116115
117116const generateToken = async (
118117 appId : any ,
119118 certificate : any ,
120119 channelName : any
121120) => {
122- const agoraTokenUrl = `https://sandbox.wiggolive.com/token/rtc` ;
123121 let response = await axios . post ( agoraTokenUrl , {
124122 appId,
125123 certificate,
@@ -204,8 +202,8 @@ const publishVideo = async (
204202 const videoSettings = mediaStreamTrack . getSettings ( ) ;
205203 const videoWidth = videoSettings . width ;
206204 const videoHeight = videoSettings . height ;
207- height . videoWidth . change ( videoWidth ) ;
208- height . videoHeight . change ( videoHeight ) ;
205+ // height.videoWidth.change(videoWidth);
206+ // height.videoHeight.change(videoHeight);
209207 }
210208} ;
211209
@@ -230,7 +228,7 @@ const rtmInit = async (appId: any, uid: any, channel: any) => {
230228} ;
231229
232230export const meetingControllerChildren = {
233- visible : booleanExposingStateControl ( "visible" ) ,
231+ visible : withDefault ( BooleanStateControl , "visible" ) ,
234232 onEvent : eventHandlerControl ( EventOptions ) ,
235233 width : StringControl ,
236234 height : StringControl ,
@@ -239,20 +237,17 @@ export const meetingControllerChildren = {
239237 placement : PositionControl ,
240238 maskClosable : withDefault ( BoolControl , true ) ,
241239 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" ) ,
249245 appId : withDefault ( StringControl , trans ( "meeting.appid" ) ) ,
250246 participants : stateComp < JSONValue > ( [ ] ) ,
251247 usersScreenShared : stateComp < JSONValue > ( [ ] ) ,
252248 localUser : jsonObjectExposingStateControl ( "" ) ,
253249 meetingName : stringStateControl ( "meetingName" ) ,
254- userName : stringStateControl ( "userName" ) ,
255- certifiCateKey : stringExposingStateControl ( "" ) ,
250+ certifiCateKey : stringStateControl ( "" ) ,
256251 messages : stateComp < JSONValue > ( [ ] ) ,
257252} ;
258253let MTComp = ( function ( ) {
@@ -628,6 +623,7 @@ MTComp = withMethodExposing(MTComp, [
628623 comp . children ,
629624 comp . children . certifiCateKey . getView ( ) . value
630625 ) ;
626+ comp . children . meetingActive . change ( true ) ;
631627 } ,
632628 } ,
633629 {
@@ -690,6 +686,7 @@ MTComp = withMethodExposing(MTComp, [
690686 execute : async ( comp , values ) => {
691687 let value = ! comp . children . endCall . getView ( ) . value ;
692688 comp . children . endCall . change ( value ) ;
689+ comp . children . meetingActive . change ( false ) ;
693690
694691 await leaveChannel ( ) ;
695692
@@ -716,6 +713,8 @@ export const VideoMeetingControllerComp = withExposingConfigs(MTComp, [
716713 new NameConfig ( "appId" , trans ( "meeting.appid" ) ) ,
717714 new NameConfig ( "localUser" , trans ( "meeting.host" ) ) ,
718715 new NameConfig ( "participants" , trans ( "meeting.participants" ) ) ,
716+ new NameConfig ( "meetingActive" , trans ( "meeting.meetingName" ) ) ,
719717 new NameConfig ( "meetingName" , trans ( "meeting.meetingName" ) ) ,
720718 new NameConfig ( "messages" , trans ( "meeting.meetingName" ) ) ,
721719] ) ;
720+
0 commit comments