Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 42 additions & 13 deletions commet/lib/ui/organisms/call_view/call_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:commet/client/components/voip/voip_session.dart';
import 'package:commet/client/components/voip/voip_stream.dart';
import 'package:commet/client/room.dart';
import 'package:commet/config/layout_config.dart';
import 'package:commet/ui/atoms/lightbox.dart';
import 'package:commet/ui/layout/bento.dart';
import 'package:commet/ui/organisms/call_view/voip_fullscreen_stream_view.dart';
import 'package:commet/ui/organisms/call_view/voip_stream_view.dart';
Expand Down Expand Up @@ -225,12 +224,27 @@ class _CallViewState extends State<CallView> {
widget.currentSession,
borderColor: Colors.white,
onFullscreen: () {
Lightbox.show(context,
aspectRatio: mainStream!.aspectRatio,
customWidget: VoipFullscreenStreamView(
session: widget.currentSession,
stream: mainStream!,
));
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) =>
Scaffold(
backgroundColor: Colors.black,
body: VoipFullscreenStreamView(
session: widget.currentSession,
stream: mainStream!,
),
),
transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return FadeTransition(
opacity: animation,
child: child,
);
},
fullscreenDialog: true,
),
);
},
fit: BoxFit.contain,
key: ValueKey(
Expand Down Expand Up @@ -260,12 +274,27 @@ class _CallViewState extends State<CallView> {
: BoxFit.cover,
widget.currentSession,
onFullscreen: () {
Lightbox.show(context,
aspectRatio: e.aspectRatio,
customWidget: VoipFullscreenStreamView(
session: widget.currentSession,
stream: e,
));
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) =>
Scaffold(
backgroundColor: Colors.black,
body: VoipFullscreenStreamView(
session: widget.currentSession,
stream: e,
),
),
transitionsBuilder:
(context, animation, secondaryAnimation, child) {
return FadeTransition(
opacity: animation,
child: child,
);
},
fullscreenDialog: true,
),
);
},
)))
.toList()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class _VoipFullscreenStreamViewState extends State<VoipFullscreenStreamView> {
@override
Widget build(BuildContext context) {
return Stack(
alignment: Alignment.bottomCenter,
children: [
LayoutBuilder(
builder: (context, constraints) {
Expand All @@ -41,6 +40,7 @@ class _VoipFullscreenStreamViewState extends State<VoipFullscreenStreamView> {
widget.stream,
widget.session,
canFullscreen: false,
onFullscreen: () {Navigator.of(context).pop();},
),
onHover: (event) {
final width = constraints.maxWidth;
Expand Down
3 changes: 1 addition & 2 deletions commet/lib/ui/organisms/call_view/voip_stream_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ class _VoipStreamViewState extends State<VoipStreamView>
BoxDecoration(borderRadius: BorderRadius.circular(8)),
child: buildDefault()),
),
if (widget.canFullscreen &&
widget.stream.type == VoipStreamType.video ||
if (widget.stream.type == VoipStreamType.video ||
widget.stream.type == VoipStreamType.screenshare)
SizedBox(
width: 40,
Expand Down