|
|
|
|
@ -153,7 +153,8 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
|
var muted = await mySelf.audioStatus?.isMuted();
|
|
|
|
|
var videoOn = await mySelf.videoStatus?.isOn();
|
|
|
|
|
var speakerOn = await zoom.audioHelper.getSpeakerStatus();
|
|
|
|
|
fullScreenUser.value = mySelf;
|
|
|
|
|
// fullScreenUser.value = mySelf;
|
|
|
|
|
fullScreenUser.value = remoteUsers![0];
|
|
|
|
|
remoteUsers?.insert(0, mySelf);
|
|
|
|
|
users.value = remoteUsers!;
|
|
|
|
|
isMuted.value = muted!;
|
|
|
|
|
@ -1152,13 +1153,7 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
|
void onLeaveSession(bool isEndSession) async {
|
|
|
|
|
await zoom.leaveSession(isEndSession);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
// if (context.mounted) {
|
|
|
|
|
// await Navigator.popAndPushNamed(
|
|
|
|
|
// context,
|
|
|
|
|
// "Join",
|
|
|
|
|
// arguments: JoinArguments(!isEndSession, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role),
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void showLeaveOptions() async {
|
|
|
|
|
@ -1225,7 +1220,7 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
|
showCupertinoModalPopup(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (context) => CupertinoActionSheet(
|
|
|
|
|
message: const Text('Are you sure that you want to leave the session?'),
|
|
|
|
|
message: const Text('Are you sure that you want to leave the call?'),
|
|
|
|
|
actions: options,
|
|
|
|
|
cancelButton: cancel,
|
|
|
|
|
),
|
|
|
|
|
@ -1278,36 +1273,49 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
|
smallView = Container(
|
|
|
|
|
height: 110,
|
|
|
|
|
margin: const EdgeInsets.only(left: 20, right: 20),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: users.value.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
onSelectedUser(users.value[index]);
|
|
|
|
|
},
|
|
|
|
|
onDoubleTap: () async {
|
|
|
|
|
onSelectedUserVolume(users.value[index]);
|
|
|
|
|
},
|
|
|
|
|
child: Center(
|
|
|
|
|
child: VideoView(
|
|
|
|
|
user: users.value[index],
|
|
|
|
|
hasMultiCamera: false,
|
|
|
|
|
sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[index].userId,
|
|
|
|
|
preview: false,
|
|
|
|
|
focused: false,
|
|
|
|
|
multiCameraIndex: "0",
|
|
|
|
|
videoAspect: VideoAspect.Original,
|
|
|
|
|
fullScreen: false,
|
|
|
|
|
resolution: VideoResolution.Resolution180,
|
|
|
|
|
isPiPView: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext context, int index) => const Divider(),
|
|
|
|
|
alignment: Alignment.bottomLeft,
|
|
|
|
|
child: VideoView(
|
|
|
|
|
user: users.value[0],
|
|
|
|
|
hasMultiCamera: false,
|
|
|
|
|
sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[0].userId,
|
|
|
|
|
preview: false,
|
|
|
|
|
focused: false,
|
|
|
|
|
multiCameraIndex: "0",
|
|
|
|
|
videoAspect: VideoAspect.Original,
|
|
|
|
|
fullScreen: false,
|
|
|
|
|
resolution: VideoResolution.Resolution180,
|
|
|
|
|
isPiPView: false,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// ListView.separated(
|
|
|
|
|
// scrollDirection: Axis.horizontal,
|
|
|
|
|
// itemCount: users.value.length,
|
|
|
|
|
// itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
// return InkWell(
|
|
|
|
|
// onTap: () async {
|
|
|
|
|
// onSelectedUser(users.value[index]);
|
|
|
|
|
// },
|
|
|
|
|
// onDoubleTap: () async {
|
|
|
|
|
// onSelectedUserVolume(users.value[index]);
|
|
|
|
|
// },
|
|
|
|
|
// child: Center(
|
|
|
|
|
// child: VideoView(
|
|
|
|
|
// user: users.value[index],
|
|
|
|
|
// hasMultiCamera: false,
|
|
|
|
|
// sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[index].userId,
|
|
|
|
|
// preview: false,
|
|
|
|
|
// focused: false,
|
|
|
|
|
// multiCameraIndex: "0",
|
|
|
|
|
// videoAspect: VideoAspect.Original,
|
|
|
|
|
// fullScreen: false,
|
|
|
|
|
// resolution: VideoResolution.Resolution180,
|
|
|
|
|
// isPiPView: false,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// separatorBuilder: (BuildContext context, int index) => const Divider(),
|
|
|
|
|
// ),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
fullScreenView = Container(
|
|
|
|
|
@ -1480,12 +1488,12 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
"assets/icons/unlocked@2x.png",
|
|
|
|
|
height: 22,
|
|
|
|
|
)),
|
|
|
|
|
// Container(
|
|
|
|
|
// alignment: Alignment.centerRight,
|
|
|
|
|
// child: Image.asset(
|
|
|
|
|
// "assets/icons/unlocked@2x.png",
|
|
|
|
|
// height: 22,
|
|
|
|
|
// )),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -1519,62 +1527,33 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: onPressAudio,
|
|
|
|
|
icon: isMuted.value ? Image.asset("assets/icons/unmute@2x.png") : Image.asset("assets/icons/mute@2x.png"),
|
|
|
|
|
icon: isMuted.value ? Image.asset("assets/images/new/zoom/unmute@2x.png") : Image.asset("assets/images/new/zoom/mute@2x.png"),
|
|
|
|
|
iconSize: circleButtonSize,
|
|
|
|
|
tooltip: isMuted.value == true ? "Unmute" : "Mute",
|
|
|
|
|
),
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: onPressShare,
|
|
|
|
|
icon: isSharing.value ? Image.asset("assets/icons/share-off@2x.png") : Image.asset("assets/icons/share-on@2x.png"),
|
|
|
|
|
iconSize: circleButtonSize,
|
|
|
|
|
),
|
|
|
|
|
// IconButton(
|
|
|
|
|
// onPressed: onPressShare,
|
|
|
|
|
// icon: isSharing.value ? Image.asset("assets/images/new/zoom/share-off@2x.png") : Image.asset("assets/images/new/zoom/share-on@2x.png"),
|
|
|
|
|
// iconSize: circleButtonSize,
|
|
|
|
|
// ),
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: onPressVideo,
|
|
|
|
|
iconSize: circleButtonSize,
|
|
|
|
|
icon: isVideoOn.value ? Image.asset("assets/icons/video-off@2x.png") : Image.asset("assets/icons/video-on@2x.png"),
|
|
|
|
|
icon: isVideoOn.value ? Image.asset("assets/images/new/zoom/video-off@2x.png") : Image.asset("assets/images/new/zoom/video-on@2x.png"),
|
|
|
|
|
),
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: onPressCameraChange,
|
|
|
|
|
iconSize: circleButtonSize,
|
|
|
|
|
icon: const Icon(Icons.cameraswitch_sharp, size: 65.0),
|
|
|
|
|
),
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: onPressMore,
|
|
|
|
|
icon: Image.asset("assets/icons/more@2x.png"),
|
|
|
|
|
iconSize: circleButtonSize,
|
|
|
|
|
icon: const Icon(Icons.cameraswitch_sharp, size: 45.0, color: Colors.white,),
|
|
|
|
|
),
|
|
|
|
|
// IconButton(
|
|
|
|
|
// onPressed: onPressMore,
|
|
|
|
|
// icon: Image.asset("assets/icons/more@2x.png"),
|
|
|
|
|
// iconSize: circleButtonSize,
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: const EdgeInsets.only(left: 16, right: 16, bottom: 40, top: 10),
|
|
|
|
|
// alignment: Alignment.bottomCenter,
|
|
|
|
|
// child: SizedBox(
|
|
|
|
|
// height: MediaQuery.of(context).viewInsets.bottom == 0 ? 65 : MediaQuery.of(context).viewInsets.bottom + 18,
|
|
|
|
|
// child: TextField(
|
|
|
|
|
// maxLines: 1,
|
|
|
|
|
// textAlign: TextAlign.left,
|
|
|
|
|
// style: TextStyle(color: chatTextColor),
|
|
|
|
|
// cursorColor: chatTextColor,
|
|
|
|
|
// textAlignVertical: TextAlignVertical.center,
|
|
|
|
|
// controller: chatMessageController,
|
|
|
|
|
// decoration: InputDecoration(
|
|
|
|
|
// contentPadding: const EdgeInsets.only(left: 16, top: 10, bottom: 10, right: 16),
|
|
|
|
|
// enabledBorder: OutlineInputBorder(
|
|
|
|
|
// borderSide: BorderSide(width: 1, color: chatTextColor), //<-- SEE HERE
|
|
|
|
|
// ),
|
|
|
|
|
// hintText: 'Type comment',
|
|
|
|
|
// hintStyle: TextStyle(
|
|
|
|
|
// fontSize: 14.0,
|
|
|
|
|
// color: chatTextColor,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// onSubmitted: (String str) {
|
|
|
|
|
// sendChatMessage(str);
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.bottomLeft,
|
|
|
|
|
margin: const EdgeInsets.only(bottom: 120),
|
|
|
|
|
|