[feature] pinch-to-zoom
Is your feature request related to a problem? Please describe.
The June LiveKit newsletter update announced pinch-to-zoom:
Describe the solution you'd like
pinch-to-zoom support added to VideoTrackRenderer
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe. The June LiveKit newsletter update announced pinch-to-zoom:
Describe the solution you'd like pinch-to-zoom support added to
VideoTrackRendererDescribe alternatives you've considered
Additional context
Hi @joeriddles, Thank you for reaching out regarding the pinch-to-zoom feature in the LiveKit SDK for Flutter. Below is a simple implementation example that you can use to add this feature to your project:
import 'package:flutter_webrtc/flutter_webrtc.dart';
import 'package:livekit_client/livekit_client.dart';
Room room = Room();
Future<void> setZoomLevel(double level) async {
var mediaStream = room.localParticipant
?.videoTrackPublications.firstOrNull?.track?.mediaStreamTrack;
if (mediaStream != null) {
await Helper.setZoom(mediaStream, level);
}
}
This code sets up a method to adjust the zoom level of the video track using the flutter_webrtc package. The setZoomLevel function accepts a double value for the zoom level and applies it to the media stream track of the local participant's video.
We really need this feature in the Flutter SDK version. Basically "Camera Control", ability to zoom in (pinch to zoom) from the streamer.
A workaround for this is using the InteractiveViewer widget
fixed https://github.com/livekit/client-sdk-flutter/pull/658
