Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] pinch-to-zoom #543

Open
joeriddles opened this issue Jun 28, 2024 · 1 comment
Open

[feature] pinch-to-zoom #543

joeriddles opened this issue Jun 28, 2024 · 1 comment

Comments

@joeriddles
Copy link

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

@BawazierMurphy
Copy link

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.

@heshheshsiin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants