decodedhealth / flutter_zoom_plugin

Flutter plugin for zoom
Apache License 2.0
125 stars 83 forks source link

Error in starting the zoom meeting #51

Open jaganpsjaganps opened 3 years ago

jaganpsjaganps commented 3 years ago

Your Environment

import 'package:flutter_zoom_plugin/zoom_view.dart'; import 'package:flutter_zoom_plugin/zoom_options.dart';

import 'package:flutter/material.dart';

// ignore: must_be_immutable class StartMeetingWidget extends StatelessWidget { ZoomOptions zoomOptions; ZoomMeetingOptions meetingOptions;

Timer timer;

StartMeetingWidget({Key key, meetingId, meetingPassword}) : super(key: key) { this.zoomOptions = new ZoomOptions( domain: "zoom.us", appKey: "appkey", appSecret: "appSecret", ); this.meetingOptions = new ZoomMeetingOptions( userId: "p", meetingId: meetingId, displayName: "j, zoomToken: "gave my original token", meetingPassword: meetingPassword, disableDialIn: "true", disableDrive: "true", disableInvite: "true", disableShare: "true", noAudio: "false", noDisconnectAudio: "false"); }

bool _isMeetingEnded(String status) { var result = false;

if (Platform.isAndroid)
  result = status == "MEETING_STATUS_DISCONNECTING" ||
      status == "MEETING_STATUS_FAILED";
else
  result = status == "MEETING_STATUS_IDLE";

return result;

}

@override Widget build(BuildContext context) { // Use the Todo to create the UI. return Scaffold( appBar: AppBar( title: Text('Loading meeting '), ), body: Padding( padding: EdgeInsets.all(16.0), child: ZoomView(onViewCreated: (controller) { print("Created the view");

        controller.initZoom(this.zoomOptions).then((results) {
          print("initialised");
          print(results);

          if (results[0] == 0) {
            controller.zoomStatusEvents.listen((status) {
              print("Meeting Status Stream: " +
                  status[0] +
                  " - " +
                  status[1]);
              if (_isMeetingEnded(status[0])) {
                Navigator.pop(context);
                timer?.cancel();
              }
            });

            print("listen on event channel");

            controller
                .startMeeting(this.meetingOptions)
                .then((joinMeetingResult) {
              timer = Timer.periodic(new Duration(seconds: 2), (timer) {
                controller
                    .meetingStatus(this.meetingOptions.meetingId)
                    .then((status) {
                  print("Meeting Status Polling: " +
                      status[0] +
                      " - " +
                      status[1]);
                });
              });
            });
          }
        }).catchError((error) {
          print("Error");
          print(error);
        });
      })),
);

} }


## Expected Behavior
<!--- Tell us what should happen -->
it should have started meeting when i passed my token ,userid and displayname and the meeting should have been established
## Actual Behavior
<!--- Tell us what happens instead -->
its in the idle postion and never started the meeting
## Steps to Reproduce
<!--- reproduce this issue; include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- What were you trying to do? -->

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat -s TSLocationManager
-->
<details>
    <summary>Logs</summary>

``` <!-- syntax-highligting:  DO NOT REMOVE -->

E/BpSurfaceComposerClient(19375): Failed to transact (-1) Restarted application in 2,121ms. Reloaded 0 of 533 libraries in 680ms. I/flutter (193 initialised Meeting ServiceImpl(19375): StartMeeting Params4APIUser: userId, zoomToken and displayName cannot be null or empty

sj210 commented 3 years ago

+1

JAGANPS commented 3 years ago

Can you be clear with your answer