The Aira Flutter SDK.
aira / flutter_aira Goto Github PK
View Code? Open in Web Editor NEWThe Aira Flutter SDK.
License: MIT License
The Aira Flutter SDK.
License: MIT License
The Aira Flutter SDK.
There are a few things about our mutes implementation that don't sit well with me:
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.
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.
Room.setAudioMuted
and Room.setVideoMuted
perform an async call (to _updateParticipantStatus
) but do not return a Future
.
Room.setVideoMuted
only mutes the active video track. Replacing the video track (with Room.replaceStream
) will not preserve the mute state.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.