All Projects → pion → ion-sdk-flutter

pion / ion-sdk-flutter

Licence: MIT license
ion flutter sdk

Programming Languages

dart
5743 projects
shell
77523 projects

Projects that are alternatives of or similar to ion-sdk-flutter

CodeIgniter3-online-shop
A full e-commerce project built with CI3 HMVC with Email confirmation,Paypal payement , Ion Auth , Live Chatroom and full admin dashboard
Stars: ✭ 114 (+16.33%)
Mutual labels:  ion
ion-schema-kotlin
A Kotlin reference implementation of the Ion Schema Specification.
Stars: ✭ 23 (-76.53%)
Mutual labels:  ion
ikra
RNAseq pipeline centered on Salmon
Stars: ✭ 18 (-81.63%)
Mutual labels:  ion
carapace-bin
multi-shell multi-command argument completer
Stars: ✭ 42 (-57.14%)
Mutual labels:  ion
ion-app-flutter
ion flutter app
Stars: ✭ 98 (+0%)
Mutual labels:  ion

Flutter sdk for ion

pub package

Flutter sdk for the Ion backend.

Installation

Edit pubspec.yaml in your flutter projects.

Add

    flutter_ion:

Platform Support

  • Android
  • iOS
  • macOS
  • Web

Usage

import 'package:flutter_ion/flutter_ion.dart' as ion;
import 'package:uuid/uuid.dart';

// Connect to ion-sfu.
final signal = ion.JsonRPCSignal("ws://ion-sfu:7000/ws");

final String _uuid = Uuid().v4();

ion.Client client = await ion.Client.create(sid: "test session", uid: _uuid, signal: signal);

client.ontrack = (track, ion.RemoteStream stream) {
    /// mute a remote stream
    stream.mute();
    /// unmute a remote stream
    stream.unmute();

    if (track.kind == "video") {
       /// prefer a layer
       stream.preferLayer(ion.Layer.medium);
       
       /// render remote stream.
       /// remoteRenderer.srcObject = stream.stream;
    }
};

ion.LocalStream localStream = await ion.LocalStream.getUserMedia(
               constraints: ion.Constraints.defaults..simulcast = true);

/// render local stream.
/// localRenderer.srcObject = localStream.stream;

/// publish stream
await client.publish(localStream);

/// mute local straem
localStream.mute();

/// unmute local stream
localStream.unmute();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].