{"id":18622097,"url":"https://github.com/security-union/ion-webrtc-demo","last_synced_at":"2025-08-09T03:23:42.429Z","repository":{"id":48515389,"uuid":"381848689","full_name":"security-union/ion-webrtc-demo","owner":"security-union","description":"Flutter webrtc demo using ion","archived":false,"fork":false,"pushed_at":"2021-07-21T22:13:02.000Z","size":212,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-16T23:02:15.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/security-union.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-30T22:35:21.000Z","updated_at":"2021-07-21T22:13:04.000Z","dependencies_parsed_at":"2022-08-30T09:32:01.913Z","dependency_job_id":null,"html_url":"https://github.com/security-union/ion-webrtc-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/security-union%2Fion-webrtc-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/security-union%2Fion-webrtc-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/security-union%2Fion-webrtc-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/security-union%2Fion-webrtc-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/security-union","download_url":"https://codeload.github.com/security-union/ion-webrtc-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239415803,"owners_count":19634775,"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":[],"created_at":"2024-11-07T04:15:27.699Z","updated_at":"2025-02-18T05:28:41.726Z","avatar_url":"https://github.com/security-union.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Ion WebRTC Demo\n\nThis demo is a N to 1 per session webRTC call implementation with ion.\n\nFirst, execute the ion SFU server on your computer:\n\n```sh\ndocker run -p 9090:50051 -p 5000-5200:5000-5200/udp pionwebrtc/ion-sfu:latest-grpc\n```\n\nThen, modify the *getUrl* method inside lib/src/views/home.dart\nand set the ```ion.GRPCWebSignal('http://192.168.1.46:9090')``` with your local ip so phones can connect to your local sfu server\n\n### Development\n\nIon lets you create \u0026 join sessions on a SFU server to share your video/audio in real time with other users on that session.\n\nYou just have to create a Client object specifying the SFU server, the session \u0026 your unique identifier.\n\nThen, if you want to start sending video its as easy as just calling ```client.publish(mediaStream)```\n\nMore about SFU: https://webrtcglossary.com/sfu\n\nThe cool thing about SFU and ion is that you dont need to care about signaling peer to peer but just signaling with the SFU server (which is done automatically by the library).\n\nThe server will start sending you the streaming data (video/audio) of the other peers on that session as soon as you connect to it.\n\nExample: \n\n```dart\nfinal signal = await ion.GRPCWebSignal('\u003cSFU server address\u003e');\n\nclient = await ion.Client.create(\n  sid: sid, // Session id\n  uid: uid, // Send our UUID so the server knows who we are\n  signal: _signal, // Signaling object pointing to the SFU server\n);\n\n// You are already connected to the server and ready to receive data lol\n\nclient.ontrack = (track, ion.RemoteStream remoteStream) async {\n  if (track.kind == 'video') {\n    // Now we can store the remote stream and create a RTCVideoRenderer with it\n  }\n};\n\n// Lets publish our video\n\nfinal localStream = await ion.LocalStream.getUserMedia(\n     constraints: ion.Constraints.defaults..simulcast = false,\n);\n\nawait client.publish(_localStream);\n```\n\nTo setup the QR code scanner in iOs follow the instructions described [here](https://pub.dev/packages/flutter_barcode_scanner) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecurity-union%2Fion-webrtc-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecurity-union%2Fion-webrtc-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecurity-union%2Fion-webrtc-demo/lists"}