flutter_zoom_plugin
flutter_zoom_plugin copied to clipboard
Error in starting the zoom meeting
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
+1
Can you be clear with your answer