flutter_zoom_plugin icon indicating copy to clipboard operation
flutter_zoom_plugin copied to clipboard

Error in starting the zoom meeting

Open jaganpsjaganps opened this issue 4 years ago • 2 comments

Your Environment

  • Plugin version:
  • Platform: iOS or Android
  • OS version:
  • Device manufacturer / model:
  • Flutter info (flutter doctor):
  • Plugin config:
import 'dart:async';
import 'dart:io';

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

it should have started meeting when i passed my token ,userid and displayname and the meeting should have been established

Actual Behavior

its in the idle postion and never started the meeting

Steps to Reproduce

Context

Debug logs

Logs

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

jaganpsjaganps avatar Sep 30 '20 09:09 jaganpsjaganps

+1

sj210 avatar Oct 04 '20 19:10 sj210

Can you be clear with your answer

JAGANPS avatar Oct 05 '20 11:10 JAGANPS