Coder Social home page Coder Social logo

flutter_aira's Introduction

Build Status

The Aira Flutter SDK.

flutter_aira's People

Contributors

vsomayaji avatar ipainchaud avatar evgeniya-aira avatar kasemj avatar chimon2000 avatar benreber avatar smunozp avatar

Stargazers

Florian Gutmann avatar xiangxudong avatar

Watchers

Florian Gutmann avatar  avatar Arman Soudi avatar Srikanth Pasumarthy avatar  avatar  avatar DaveM avatar  avatar  avatar

flutter_aira's Issues

Simplified mutes

There are a few things about our mutes implementation that don't sit well with me:

  1. There's a different way to mute a track before joining a Room:

    _localMediaStream.getAudioTracks()[0].enabled = false;

    And after joining a Room:

    _room.setAudioMuted(true);

    If you use the first way after joining a Room, the mute states of the track and the Room will be out of sync.

  2. The Room does not expose getters for its mute states. If the mute states of the track and the Room get out of sync, there's no way to know.

  3. Room.setAudioMuted and Room.setVideoMuted perform an async call (to _updateParticipantStatus) but do not return a Future.

  4. Room.setVideoMuted only mutes the active video track. Replacing the video track (with Room.replaceStream) will not preserve the mute state.

  5. Room.setVideoMuted affects the presentation even though the presentation was intended to be thought of as a separate video track.

Now that we've discovered that we can "mute" a track by providing the corresponding transceiver a null track, I think we can switch to an implementation where the mute states are always managed by the Room. The interface could look like this:

  /// Whether the local audio is muted.
  bool get isAudioMuted;

  /// Mutes or un-mutes the local audio.
  Future<void> setAudioMuted(bool muted);

  /// Whether the local video is muted.
  bool get isVideoMuted;

  /// Mutes or un-mutes the local video.
  Future<void> setVideoMuted(bool muted);

  /// Whether the presentation is muted.
  bool get isPresentationMuted;

  /// Mutes or un-mutes the presentation.
  Future<void> setPresentationMuted(bool muted);

  /// Enables or disables privacy mode.
  ///
  /// In privacy mode, the local audio, video and presentation are _all_ muted. This is equivalent to calling
  /// [setAudioMuted], [setVideoMuted] and [setPresentationMuted], and is intended as a convenience for apps that do not
  /// support muting the tracks independently.
  Future<void> setPrivacyMode(bool enabled);

I believe this would address all of the issues above. For example, if the video is muted in the Room and the video track is replaced, the video will stay muted.

What do you think? Good idea or a bad one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.