client-sdk-flutter icon indicating copy to clipboard operation
client-sdk-flutter copied to clipboard

[feature] pinch-to-zoom

Open joeriddles opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. The June LiveKit newsletter update announced pinch-to-zoom: image

Describe the solution you'd like pinch-to-zoom support added to VideoTrackRenderer

Describe alternatives you've considered

Additional context

joeriddles avatar Jun 28 '24 20:06 joeriddles

Is your feature request related to a problem? Please describe. The June LiveKit newsletter update announced pinch-to-zoom: image

Describe the solution you'd like pinch-to-zoom support added to VideoTrackRenderer

Describe 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.

BawazierMurphy avatar Aug 14 '24 03:08 BawazierMurphy

We really need this feature in the Flutter SDK version. Basically "Camera Control", ability to zoom in (pinch to zoom) from the streamer.

heshheshsiin avatar Aug 21 '24 17:08 heshheshsiin

A workaround for this is using the InteractiveViewer widget

EvertonMJunior avatar Nov 01 '24 15:11 EvertonMJunior

fixed https://github.com/livekit/client-sdk-flutter/pull/658

cloudwebrtc avatar Dec 23 '24 14:12 cloudwebrtc