{"id":13490464,"url":"https://github.com/100mslive/100ms-flutter","last_synced_at":"2025-04-12T23:42:31.309Z","repository":{"id":37710173,"uuid":"381963509","full_name":"100mslive/100ms-flutter","owner":"100mslive","description":"Flutter Live Streaming, Video Conferencing SDK \u0026 Sample App","archived":false,"fork":false,"pushed_at":"2025-02-13T13:04:11.000Z","size":184401,"stargazers_count":152,"open_issues_count":0,"forks_count":78,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-12T23:42:10.721Z","etag":null,"topics":["audio","chat","conference","dart","ffmpeg","flutter","hacktoberfest","hls","live","meeting","player","rtmp","streaming","video","webrtc"],"latest_commit_sha":null,"homepage":"https://www.100ms.live/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/100mslive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-07-01T08:30:43.000Z","updated_at":"2025-04-07T05:38:31.000Z","dependencies_parsed_at":"2024-02-06T14:14:59.182Z","dependency_job_id":"64bb0b56-1904-4907-8b65-257d01e38d94","html_url":"https://github.com/100mslive/100ms-flutter","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/100mslive","download_url":"https://codeload.github.com/100mslive/100ms-flutter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","chat","conference","dart","ffmpeg","flutter","hacktoberfest","hls","live","meeting","player","rtmp","streaming","video","webrtc"],"created_at":"2024-07-31T19:00:46.988Z","updated_at":"2025-04-12T23:42:31.289Z","avatar_url":"https://github.com/100mslive.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"[![Pub Version](https://img.shields.io/pub/v/hmssdk_flutter)](https://pub.dev/packages/hmssdk_flutter)\n[![Build](https://github.com/100mslive/100ms-flutter/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/100mslive/100ms-flutter/actions/workflows/build.yml)\n[![License](https://img.shields.io/github/license/100mslive/100ms-flutter)](https://www.100ms.live/)\n[![Documentation](https://img.shields.io/badge/Read-Documentation-blue)](https://docs.100ms.live/flutter/v2/foundation/basics)\n[![Discord](https://img.shields.io/discord/843749923060711464?label=Join%20on%20Discord)](https://100ms.live/discord)\n[![Firebase](https://img.shields.io/badge/Download%20Android-Firebase-green)](https://appdistribution.firebase.dev/i/b623e5310929ab70)\n[![TestFlight](https://img.shields.io/badge/Download%20iOS-TestFlight-blue)](https://testflight.apple.com/join/Uhzebmut)\n[![Register](https://img.shields.io/badge/Contact-Know%20More-blue)](https://dashboard.100ms.live/register)\n\n# 100ms Flutter SDK 🎉\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg width=\"600\" height=\"500\" alt=\"Prebuilt - Edtech\" src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/de8008f7-1fa7-4329-84b4-ce6fedc0833f\"\u003e\n\u003c/p\u003e\n\nIntegrate Real Time Audio and Video conferencing, Interactive Live Streaming, and Chat in your apps with 100ms Flutter SDK.\n\nWith support for HLS and RTMP Live Streaming and Recording, Picture-in-Picture (PiP), CallKit, VoIP, one-to-one Video Call Modes, Audio Rooms, Video Player and much more, add immersive real-time communications to your apps.\n\n| Package        | Version                                                                                                |\n| -------------- | ------------------------------------------------------------------------------------------------------ |\n| hms_room_kit   | [![Pub Version](https://img.shields.io/pub/v/hms_room_kit)](https://pub.dev/packages/hms_room_kit)     |\n| hmssdk_flutter | [![Pub Version](https://img.shields.io/pub/v/hmssdk_flutter)](https://pub.dev/packages/hmssdk_flutter) |\n\n💻 Checkout the 100ms Flutter SDK [here](https://github.com/100mslive/100ms-flutter/tree/main/packages/hmssdk_flutter)\n\n❤️ Checkout the 100ms Prebuilt [here](https://github.com/100mslive/100ms-flutter/tree/main/packages/hms_room_kit)\n\n🧱 The Prebuilt QuickStart Guide is [available here](https://www.100ms.live/docs/flutter/v2/quickstart/prebuilt).\n\n📖 Read the Complete Documentation here: https://www.100ms.live/docs/flutter/v2/guides/quickstart\n\n📲 Download the Sample iOS app here: \u003chttps://testflight.apple.com/join/Uhzebmut\u003e\n\n🤖 Download the Sample Android app here: \u003chttps://appdistribution.firebase.dev/i/b623e5310929ab70\u003e\n\n100ms Flutter apps are also available on the App Stores, do download them and try it out.\n\n\u003cdiv\u003e\n  \u003ca href=\"https://apps.apple.com/app/100ms-live/id1576541989\"\u003e\n    \u003cimg height=\"40\" src=\"docs/static/img/appstore.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://play.google.com/store/apps/details?id=live.hms.flutter\"\u003e\n    \u003cimg height=\"40\" src=\"docs/static/img/googleplay.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## 🚂 Setup Guide\n\n1. Sign up on \u003chttps://dashboard.100ms.live/register\u003e \u0026 visit the Developer tab to access your credentials.\n\n2. Get familiarized with [Tokens \u0026 Security here](https://www.100ms.live/docs/flutter/v2/foundation/security-and-tokens)\n\n3. Complete the steps in [Auth Token Quick Start Guide](https://www.100ms.live/docs/flutter/v2/guides/token)\n\n4. Get the HMSSDK via [pub.dev](https://pub.dev/packages/hmssdk_flutter). Add the `hmssdk_flutter` to your pubspec.yaml.\n\n📖 Do refer the Complete [Installation Guide here](https://www.100ms.live/docs/flutter/v2/features/integration).\n\n## 🏃♀️ How to run the Example App\n\nThe full featured Example app is [available here](https://github.com/100mslive/100ms-flutter/tree/main/packages/hmssdk_flutter/example).\n\n🚀 We have added explanations \u0026 recommended usage guide for different features, UI Layouts, Data Store, etc in [Example app ReadMe](https://github.com/100mslive/100ms-flutter/tree/main/packages/hmssdk_flutter/example).\n\nTo run the Example App on your system follow these steps -\n\n1. Clone the 100ms Flutter [Github Repo](https://github.com/100mslive/100ms-flutter.git)\n\n2. In project root, run `flutter pub get` to build the Flutter package\n3. Change directory to `example` folder\n4. Now, to run the app, simply execute the `flutter run` command to run the app on a connected device, or iOS simulator, or Android Emulator.\n5. For running on an iOS Device (iPhone or iPad), ensure you have set the Correct Development Team in Xcode Signing \u0026 Capabilities section.\n\nThe default [Example app](https://github.com/100mslive/100ms-flutter/tree/main/packages/hmssdk_flutter/example) uses Provider State Management library. For other implementations please check out -\n\n1. [Simple QuickStart](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/flutter-quickstart-app)\n2. [Bloc](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/bloc)\n3. [Getx](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/getx)\n4. [Mobx](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/mobx)\n5. [Riverpod](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/riverpod)\n6. [Audio Room App](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/flutter-audio-room-quickstart)\n7. [CallKit \u0026 VoIP](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/hms-callkit-app)\n8. [Flutterflow with Prebuilt](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/flutterflow-prebuilt-quickstart)\n9. [Live Stream with HLS](https://github.com/100mslive/100ms-flutter/tree/main/sample%20apps/flutter-hls-quickstart)\n10. [Full featured App](https://github.com/100mslive/100ms-flutter/tree/main/packages/hmssdk_flutter/example)\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/02f7181e-ef73-48fc-b8cd-ed977b3bc28c\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/7875bc6d-597c-4213-98f4-7333a660e689\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/cf10216a-93cb-41c9-b0fd-15b2d05611a0\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/e4ba9546-56b6-42ee-bea1-c7733053b2b6\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/8a0a5a8c-024f-4128-b607-c3ee5957bb17\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"https://github.com/100mslive/100ms-flutter/assets/93931528/f292bf26-3061-4c9c-925a-981e7dd6c86b\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- |  ![Prebuilt iOS - 3](https://github.com/100mslive/100ms-flutter/assets/93931528/f292bf26-3061-4c9c-925a-981e7dd6c86b) | ![3](https://github.com/100mslive/100ms-flutter/assets/93931528/7875bc6d-597c-4213-98f4-7333a660e689) |\n|![Prebuilt Flutter - 1](https://github.com/100mslive/100ms-flutter/assets/93931528/cf10216a-93cb-41c9-b0fd-15b2d05611a0) | ![4](https://github.com/100mslive/100ms-flutter/assets/93931528/43263ecf-57e8-4b8d-9bdc-68a72b4ce7fa) | --\u003e\n\n## ☝️ Minimum Configuration\n\n- Support for Flutter 3.3.0 or above\n- Support for Android API level 21 or above\n- Support for Java 17 or above\n- Support for iOS 12 or above\n- Xcode 12 or above\n\n## 🤝 Recommended Configuration\n\n- Flutter 3.13.0 or above\n- Android API level 34 or above\n- Java 17 or above\n- iOS 16 or above\n- Xcode 15 or above\n\n## 📱 Supported Devices\n\n- The Android SDK supports Android API level 21 and above. It is built for armeabi-v7a, arm64-v8a, x86, and x86_64 architectures. Devices running Android OS 12 or above is recommended.\n\n- iPhone \u0026 iPads with iOS version 12 or above are supported. Devices running iOS 16 or above is recommended.\n\n## 🤖 [Android Permissions](https://www.100ms.live/docs/flutter/v2/how-to-guides/install-the-sdk/integration#android)\n\nComplete Permissions Guide is [available here](https://www.100ms.live/docs/flutter/v2/how-to-guides/install-the-sdk/integration).\n\nAdd the following permissions in the Android's `AndroidManifest.xml` file -\n\n```xml\n\u003cuses-feature android:name=\"android.hardware.camera\"/\u003e\n\n\u003cuses-feature android:name=\"android.hardware.camera.autofocus\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.CAMERA\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.RECORD_AUDIO\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/\u003e\n\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH\" android:maxSdkVersion=\"30\" /\u003e\n\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\" /\u003e\n```\n\n## 🍎 [iOS Permissions](https://www.100ms.live/docs/flutter/v2/how-to-guides/install-the-sdk/integration#ios)\n\nAdd following permissions in iOS Info.plist file\n\n```xml\n\u003ckey\u003eNSMicrophoneUsageDescription\u003c/key\u003e\n\u003cstring\u003e{YourAppName} wants to use your microphone\u003c/string\u003e\n\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003e{YourAppName} wants to use your camera\u003c/string\u003e\n\n\u003ckey\u003eNSLocalNetworkUsageDescription\u003c/key\u003e\n\u003cstring\u003e{YourAppName} App wants to use your local network\u003c/string\u003e\n```\n\n## 🧐 [Key Concepts](https://www.100ms.live/docs/get-started/v2/get-started/concepts/basics)\n\n- `Room` A room is the basic object that 100ms SDKs return on successful connection. This contains references to peers, tracks and everything you need to render a live a/v or live streaming app.\n\n- `Peer` A peer is the object returned by 100ms SDKs that contains all information about a user - name, role, video track etc.\n\n- `Track` A track is a segment of media (audio/video) captured from the peer's camera and microphone. Peers in a session publish local tracks and subscribe to remote tracks from other peers.\n\n- `Role` A role defines who can a peer see/hear, the quality at which they publish their video, whether they have permissions to publish video/screenshare, mute someone, change someone's role.\n\n![HMSSDK lifecycle](https://www.100ms.live/docs/docs/v2/flutter-hmssdk-lifecycle.png)\n\n## ♻️ [Setup Update Listeners](https://www.100ms.live/docs/flutter/v2/how-to-guides/listen-to-room-updates/update-listeners)\n\n100ms SDK provides callbacks to the client app about any change or update happening in the room after a user has joined by implementing `HMSUpdateListener`. These updates can be used to render the video on the screen or to display other info regarding the room. Let's take a look at the flowchart.\n\n![Update Listeners Flowchart](https://www.100ms.live/docs/docs/v2/flutter-update-listener.png)\n\n```dart\n\n/// 100ms SDK provides callbacks to the client app about any change or update happening in the room after a user has joined by implementing HMSUpdateListener.\n/// These updates can be used to render the video on the screen or to display other info regarding the room.\nabstract class HMSUpdateListener {\n\n\n  /// This will be called on a successful JOIN of the room by the user\n  ///\n  /// This is the point where applications can stop showing their loading state\n  /// [room]: the room which was joined\n  void onJoin({required HMSRoom room});\n\n\n  /// This will be called whenever there is an update on an existing peer\n  /// or a new peer got added/existing peer is removed.\n  ///\n  /// This callback can be used to keep a track of all the peers in the room\n  /// [peer]: the peer who joined/left or was updated\n  /// [update]: the triggered update type. Should be used to perform different UI Actions\n  void onPeerUpdate({required HMSPeer peer, required HMSPeerUpdate update});\n\n\n  /// This is called when there are updates on an existing track\n  /// or a new track got added/existing track is removed\n  ///\n  /// This callback can be used to render the video on screen whenever a track gets added\n  ///  [track]: the track which was added, removed or updated\n  ///  [trackUpdate]: the triggered update type\n  ///  [peer]: the peer for which track was added, removed or updated\n  void onTrackUpdate({required HMSTrack track, required HMSTrackUpdate trackUpdate, required HMSPeer peer});\n\n\n  /// This will be called when there is an error in the system\n  /// and SDK has already retried to fix the error\n  /// [error]: the error that occurred\n  void onHMSError({required HMSException error});\n\n\n  /// This is called when there is a new broadcast message from any other peer in the room\n  ///\n  /// This can be used to implement chat is the room\n  /// [message]: the received broadcast message\n  void onMessage({required HMSMessage message});\n\n\n  /// This is called every 1 second with a list of active speakers\n  ///\n  /// ## A HMSSpeaker object contains -\n  ///    - peerId: the peer identifier of HMSPeer who is speaking\n  ///    - trackId: the track identifier of HMSTrack which is emitting audio\n  ///    - audioLevel: a number within range 1-100 indicating the audio volume\n  ///\n  /// A peer who is not present in the list indicates that the peer is not speaking\n  ///\n  /// This can be used to highlight currently speaking peers in the room\n  /// [speakers] the list of speakers\n  void onUpdateSpeakers({required List\u003cHMSSpeaker\u003e updateSpeakers});\n\n\n  /// This is called when there is a change in any property of the Room\n  ///\n  ///  [room]: the room which was joined\n  ///  [update]: the triggered update type. Should be used to perform different UI Actions\n  void onRoomUpdate({required HMSRoom room, required HMSRoomUpdate update});\n\n\n  /// when network or some other error happens it will be called\n  void onReconnecting();\n\n\n  /// when you are back in the room after reconnection\n  void onReconnected();\n\n\n  /// This is called when someone asks for a change or role\n  ///\n  /// for eg. admin can ask a peer to become host from guest.\n  /// this triggers this call on peer's app\n  void onRoleChangeRequest({required HMSRoleChangeRequest roleChangeRequest});\n\n\n  /// when someone requests for track change of yours be it video or audio this will be triggered\n  /// [hmsTrackChangeRequest] request instance consisting of all the required info about track change\n  void onChangeTrackStateRequest({required HMSTrackChangeRequest hmsTrackChangeRequest});\n\n\n  /// when someone kicks you out or when someone ends the room at that time it is triggered\n  /// [hmsPeerRemovedFromPeer] it consists of info about who removed you and why.\n  void onRemovedFromRoom({required HMSPeerRemovedFromPeer hmsPeerRemovedFromPeer});\n\n\n  /// whenever a new audio device is plugged in or audio output is changed we\n  /// get the onAudioDeviceChanged update\n  /// This callback is only fired on Android devices. On iOS, this callback will not be triggered.\n  /// - Parameters:\n  ///   - currentAudioDevice: Current audio output route\n  ///   - availableAudioDevice: List of available audio output devices\n  void onAudioDeviceChanged(\n      {HMSAudioDevice? currentAudioDevice,\n      List\u003cHMSAudioDevice\u003e? availableAudioDevice});\n\n\n  /// Whenever a user joins a room [onSessionStoreAvailable] is fired to get an instance of [HMSSessionStore]\n  /// which can be used to perform session metadata operations\n  /// - Parameters:\n  ///   - hmsSessionStore: An instance of HMSSessionStore which will be used to call session metadata methods\n  void onSessionStoreAvailable(\n      {HMSSessionStore? hmsSessionStore});\n\n\n  /// Upon joining a room with existing peers, onPeerListUpdated will be called with the list of peers present\n  /// in the room instead of getting onPeerUpdate for each peer in the room.\n  /// Subsequent peer joins/leaves would be notified via both onPeerUpdate and onPeerListUpdated\n  void onPeerListUpdate(\n      {required List\u003cHMSPeer\u003e addedPeers, required List\u003cHMSPeer\u003e removedPeers});\n}\n```\n\n## 🤔 [How to listen to Peer \u0026 Track updates?](https://www.100ms.live/docs/flutter/v2/features/update-listener-enums)\n\nThe 100ms SDK sends updates to the application about any change in HMSPeer, HMSTrack, HMSRoom, etc via the callbacks in `HMSUpdateListener`.\n\nThe methods of HMSUpdateListener are invoked to notify updates happening in the room like a peer join/leave, track mute/unmute etc.\n\nMore information about Update Listeners is [available here](https://www.100ms.live/docs/flutter/v2/features/update-listeners).\n\nThe following are the different types of updates that are emitted by the SDK -\n\n```txt\nHMSPeerUpdate\n  .peerJoined: A new peer joins the Room\n  .peerLeft: An existing peer leaves the Room\n  .roleUpdated: When a peer's Role has changed\n  .metadataChanged: When a peer's metadata has changed\n  .nameChanged: When a peer's name has changed\n\n\nHMSTrackUpdate\n  .trackAdded: A new track (audio or video) is added to the Room\n  .trackRemoved: An existing track is removed from the Room\n  .trackMuted: A track of a peer is muted\n  .trackUnMuted: A muted track of a peer was unmuted\n  .trackDegraded: When track is degraded due to bad network conditions\n  .trackRestored: When a degraded track is restored when optimal network conditions are available again\n\n\nHMSRoomUpdate\n  .roomMuted: When room is muted to due external interruption like a Phone Call\n  .roomUnmuted: When a muted room is unmuted when external interruption has ended\n  .serverRecordingStateUpdated: When Server recording state is updated\n  .browserRecordingStateUpdated: When Browser recording state is changed\n  .rtmpStreamingStateUpdated: When RTMP is started or stopped\n  .hlsStreamingStateUpdated: When HLS is started or stopped\n  .hlsRecordingStateUpdated: When HLS recording state is updated\n```\n\n## 🙏 [Join a Room](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/join)\n\nTo join and interact with others in audio or video call, the user needs to `join` a `room`.\n\nTo join a Room, your app should have -\n\n1. User Name - The name which should be displayed to other peers in the room.\n2. [Authentication Token](https://www.100ms.live/docs/get-started/v2/get-started/security-and-tokens) - The Client side Authentication Token generated by the Token Service.\n\n### 🔑 [Get Authentication token](https://www.100ms.live/docs/flutter/v2/quickstart/quickstart#fetch-token-to-join-the-room)\n\nTo join a room we need an authentication token as mentioned above. There are two methods to get the token:\n\n#### Fetch token using room-code method (Recommended)\n\nWe can get the authentication token using room-code from meeting URL.\n\nLet's understand the subdomain and code from the sample URL\nIn this URL: `https://public.app.100ms.live/meeting/xvm-wxwo-gbl`\n\n- Subdomain is `public`\n- Room code is `xvm-wxwo-gbl`\n\nNow to get the room-code from meeting URL we can write our own logic or use the `getCode` method from [here](https://github.com/100mslive/100ms-flutter/blob/main/packages/hmssdk_flutter/example/lib/room_service.dart)\n\nTo generate token we will be using `getAuthTokenByRoomCode` method of `HMSSDK`. This method has `roomCode` as a required\nparameter, `userId` \u0026 `endPoint` as optional parameter.\n\n\u003e This method should be called after calling the `build` method.\n\nLet's checkout the implementation:\n\n```dart\n  //This returns an object of Future\u003cdynamic\u003e which can be either\n  //of HMSException type or String? type based on whether\n  //method execution is completed successfully or not\n\n  dynamic authToken = await hmsSDK.getAuthTokenByRoomCode(roomCode: 'YOUR_ROOM_CODE');\n\n  if(authToken is String){\n    HMSConfig roomConfig = HMSConfig(\n        authToken: authToken,\n        userName: userName,\n      );\n\n    hmsSDK.join(config: roomConfig);\n  }\n  else if(authToken is HMSException){\n    // Handle the error\n  }\n```\n\n#### Get temporary token from dashboard\n\nTo test audio/video functionality, you need to connect to a 100ms room; please check the following steps for the same:\n\n1. Navigate to your [100ms dashboard](https://dashboard.100ms.live/dashboard) or [create an account](https://dashboard.100ms.live/register) if you don't have one.\n2. Use the `Video Conferencing Starter Kit` to create a room with a default template assigned to it to test this app quickly.\n3. Go to the [Rooms page](https://dashboard.100ms.live/rooms) in your dashboard, click on the `Room Id` of the room you created above, and click on the `Join Room` button on the top right.\n4. In the Join with SDK section you can find the `Auth Token for role` ; you can click on the 'copy' icon to copy the authentication token.\n\n\u003e Token from 100ms dashboard is for testing purposes only, For production applications you must generate tokens on your own server.\n\u003e Refer to the [Management Token section](/flutter/v2/foundation/security-and-tokens#management-token) in Authentication and Tokens guide for more information.\n\nYou can also optionally pass these fields in the HMSSDK constructor -\n\n1. Track Settings - Such as joining a Room with Muted Audio or Video using the `HMSTrackSetting` object. More information is [available here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/join#join-with-muted-audio-video).\n\n2. User Metadata - This can be used to pass any additional metadata associated with the user using `metadata` of `HMSConfig` object. For Eg: user-id mapping at the application side. More information is available [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/interact-with-room/peer/peer-metadata-update).\n\nMore information about Joining a Room is [available here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/join).\n\n```dart\n// create a class that implements `HMSUpdateListener` and acts as a data source for our UI\nclass Meeting implements HMSUpdateListener {\n\n    late HMSSDK hmsSDK;\n\n    Meeting() {\n        initHMSSDK();\n    }\n\n    void initHMSSDK() async {\n        hmsSDK = HMSSDK(); // create an instance of `HMSSDK` by invoking it's constructor\n        await hmsSDK.build(); // ensure to await while invoking the `build` method\n        hmsSDK.addUpdateListener(this); // `this` value corresponds to the instance implementing HMSUpdateListener\n        HMSConfig config = HMSConfig(authToken: 'eyJH5c', // client-side token generated from your token service\n                                userName: 'John Appleseed');\n        hmsSDK.join(config: config); // Now, we are primed to join the room. All you have to do is call `join` by passing the `config` object.\n    }\n\n    ... // implement methods of HMSUpdateListener\n}\n```\n\n## 🎞 [Display a Track](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/render-video/overview)\n\nIt all comes down to this. All the setup so far has been done so that we can show live-streaming videos in our beautiful app.\n\n100ms Flutter Package provides the `HMSVideoView` widget that renders the video on the screen.\n\nWe simply have to pass a Video Track object to the `HMSVideoView` to begin automatic rendering of Live Video Stream.\n\nWe can also optionally pass props like `key`, `scaleType`, `mirror` to customize the `HMSVideoView` widget.\n\n```dart\nHMSVideoView(\n  track: videoTrack,\n  key: Key(videoTrack.trackId),\n),\n```\n\nMore information about displaying a Video is [available here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/render-video/overview).\n\n## 👋 [Leave Room](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/leave)\n\nOnce you're done with the meeting and want to exit, call leave on the HMSSDK instance that you created to join the room.\n\nBefore calling leave, remove the `HMSUpdateListener` instance as:\n\n```dart\n// updateListener is the instance of class in which HMSUpdateListener is implemented\nhmsSDK.removeUpdateListener(updateListener);\n```\n\nTo leave the meeting, call the `leave` method of `HMSSDK` and pass the `hmsActionResultListener` parameter to get a success callback from SDK in the `onSuccess` override method as follow.\n\n\u003e You will need to implement the `HMSActionResultListener` interface in a class to get `onSuccess` and `onException` callback.\n\u003e To know about how to implement `HMSActionResultListener` check the docs [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/listen-to-room-updates/action-result-listeners)\n\n```dart\nclass Meeting implements HMSActionResultListener{\n//this is the instance of class implementing HMSActionResultListener\nawait hmsSDK.leave(hmsActionResultListener: this);\n\n@override\n  void onSuccess(\n      {HMSActionResultListenerMethod methodType = HMSActionResultListenerMethod.unknown, Map\u003cString, dynamic\u003e? arguments}) {\n        switch (methodType) {\n          case HMSActionResultListenerMethod.leave:\n          // Room leaved successfully\n          // Clear the local room state\n          break;\n          ...\n        }\n      }\n}\n```\n\nMore information about Leaving a Room is [available here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/leave).\n\n## 🛤 HMSTracks Explained\n\n`HMSTrack` is the super-class of all the tracks that are used inside `HMSSDK`. Its hierarchy looks like this -\n\n```dart\nHMSTrack\n    - AudioTrack\n        - LocalAudioTrack\n        - RemoteAudioTrack\n    - VideoTrack\n        - LocalVideoTrack\n        - RemoteVideoTrack\n```\n\n## 🛤 How to know the type and source of Track?\n\nHMSTrack contains a field called source which denotes the source of the Track.\n\n`Source` can have the following values -\n\n- `regular` For normal Audio or Video being published by peers\n- `screen` For Screenshare track whenver a peer starts Broadcasting their Screen in a Room\n- `plugin` For a custom Audio or Video plugin being used in Room\n\nTo know the type of track, check the value of type which would be one of the enum values - `AUDIO` or `VIDEO`\n\n## 📨 [Chat Messaging](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/chat)\n\nYou can send a chat or any other kind of message from a local peer to all remote peers in the room.\n\nTo send a message first create an instance of `HMSMessage` object.\n\nAdd the information to be sent in the `message` property of `HMSMessage`.\n\nThen use the `sendBroadcastMessage` function on the instance of HMSSDK for broadcast message, `sendGroupMessage` for group message and `sendDirectMessage` for direct message.\n\nWhen you(the local peer) receives a message from others(any remote peer), `void onMessage({required HMSMessage message})` function of `HMSUpdateListener` is invoked.\n\nMore information about Chat Messaging is [available here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/chat).\n\n```dart\n// onMessage is HMSUpdateListener method called when a new message is received\n@override\nvoid onMessage({required HMSMessage message}) {\n  //Here we will receive messages sent by other peers\n}\n\n\n///[message]: Message to be sent\n///[type]: Message type(More about this at the end)\n///[hmsActionResultListener]: instance of class implementing HMSActionResultListener\n//Here this is an instance of class that implements HMSActionResultListener i.e. Meeting\nhmsSDK.sendBroadcastMessage(\n  message: message,\n  type: type,\n  hmsActionResultListener: this);\n\n\n///[message]: Message to be sent\n///[peerTo]: Peer to whom message needs to be sent\n///[type]: Message type(More about this at the end)\n///[hmsActionResultListener]: instance of class implementing HMSActionResultListener\n//Here this is an instance of class that implements HMSActionResultListener i.e. Meeting\nhmsSDK.sendDirectMessage(\n  message: message,\n  peerTo: peerTo,\n  type: type,\n  hmsActionResultListener: this);\n\n\n///[message]: Message to be sent\n///[hmsRolesTo]: Roles to which this message needs to be sent\n///[type]: Message type(More about this at the end)\n///[hmsActionResultListener]: instance of class implementing HMSActionResultListener\n//Here this is an instance of class that implements HMSActionResultListener i.e. Meeting\nhmsSDK.sendGroupMessage(\n    message: message,\n    hmsRolesTo: rolesToSendMessage,\n    type: type,\n    hmsActionResultListener: this);\n\n\n\n@override\nvoid onSuccess(\n  {HMSActionResultListenerMethod methodType =\n    HMSActionResultListenerMethod.unknown,\n    Map\u003cString, dynamic\u003e? arguments}) {\n\n    switch (methodType) {\n\n      case HMSActionResultListenerMethod.sendBroadcastMessage:\n      //Broadcast Message sent successfully\n      break;\n\n      case HMSActionResultListenerMethod.sendGroupMessage:\n      //Group Message sent successfully\n      break;\n\n      case HMSActionResultListenerMethod.sendDirectMessage:\n      //Direct Message sent successfully\n      break;\n      ...\n    }\n  }\n\n\n@override\nvoid onException(\n  {HMSActionResultListenerMethod methodType =\n    HMSActionResultListenerMethod.unknown,\n    Map\u003cString, dynamic\u003e? arguments,\n    required HMSException hmsException}) {\n\n    switch (methodType) {\n\n      case HMSActionResultListenerMethod.sendBroadcastMessage:\n      // Check the HMSException object for details about the error\n      break;\n\n      case HMSActionResultListenerMethod.sendGroupMessage:\n      // Check the HMSException object for details about the error\n      break;\n\n      case HMSActionResultListenerMethod.sendDirectMessage:\n      // Check the HMSException object for details about the error\n      break;\n      ...\n    }\n\n  }\n```\n\n🧱 The Prebuilt QuickStart Guide is [available here](https://www.100ms.live/docs/flutter/v2/quickstart/prebuilt).\n\n📖 Do refer the Complete Documentation Guide [available here](https://www.100ms.live/docs/flutter/v2/guides/quickstart).\n\n🏃♀️ Checkout the Example app implementation [available here](https://github.com/100mslive/100ms-flutter/tree/main/example).\n\n🚀 We have added explanations \u0026 recommended usage guide for different features, UI Layouts, Data Store, etc in [Example app ReadMe](https://github.com/100mslive/100ms-flutter/tree/main/packages/hmssdk_flutter/example).\n\n100ms Flutter apps are released on the App Stores, you can download them here:\n\n📲 iOS app on Apple App Store: \u003chttps://apps.apple.com/app/100ms-live/id1576541989\u003e\n\n🤖 Android app on Google Play Store: \u003chttps://play.google.com/store/apps/details?id=live.hms.flutter\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100mslive%2F100ms-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F100mslive%2F100ms-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100mslive%2F100ms-flutter/lists"}