ant_media_flutter 패키지는 안드로이드, iOS, 웹 및 데스크톱 플랫폼을 아우르는 Ant Media Server 엔터프라이즈 에디션을 사용하여 실시간 스트리밍과 통신을 가능하게 합니다. 저지연 전송을 지원하는 WebRTC 기반의 실시간 비디오 및 오디오 스트리밍을 Flutter 친화적인 인터페이스를 통해 쉽게 통합할 수 있으며, 상호작용형 애플리케이션에 적합합니다. 이 패키지는 확장성 있고 보안적이며 고성능 스트리밍 솔루션을 제공하는 Ant Media Server의 강력한 인프라를 활용합니다. 개발자는 쉽게 라이브 방송, 비디오 회의 및 상호작용 미디어 앱을 구축할 수 있습니다. 전체 소스 코드는 투명성과 맞춤화를 위해 GitHub에서 제공됩니다.
사용 사례
라이브 영상 방송
비디오 회의
인터랙티브 웨비나
실시간 게임 스트리밍
원격 교육 플랫폼
주요 기능
크로스 플랫폼 WebRTC 지원
저지연 스트리밍
보안 연결 프로토콜
확장 가능한 서버 통합
간편한 플러터 통합
적합한 대상
실시간 비디오 앱을 개발하는 개발자
Ant Media Server를 사용하는 팀
다중 플랫폼 스트리밍이 필요한 프로젝트
저지연 통신이 필요한 응용 프로그램
교육 또는 기업용 비디오 솔루션
고려 사항
Ant Media Server 엔터프라이즈 에디션 필요
지원되는 플랫폼(안드로이드, iOS, 웹, 데스크톱)에 제한됨
전체 기능을 위해 서버 구성이 필요합니다
최적의 성능을 위해 추가 네트워크 설정이 필요할 수 있습니다
안정적인 인터넷 연결에 의존
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
This Flutter Package includes Ant Media Flutter SDK for WebRTC.
To be able to use it, you need to have an Ant Media Server instance first. To be able to get more information, you can check Ant Media Server's website.
If you have Ant Media Server Community Edition, you can only use WebRTC publishing feature.
WebRTC play, Conference and Data Channel features are available in Ant Media Server Enterprise Edition.
Connect is the main function that we can do pretty much everything with using its parameters. Let's look at its parts and how we can use it for different purposes like WebRTC Publishing, WebRTC Playing, etc.
Sections of the connect function
-> Host
Host is the websocket url of your Ant Media Server instance.
-> Stream ID
Stream ID is used to identify each stream for publishing and playing purposes.
-> Room ID
Room ID is used in the WebRTC Multi track Conference mode.
-> Type
Type is used to determine different modes. Possible options:
AntMediaType.Publish
AntMediaType.Play
AntMediaType.Peer
AntMediaType.Conference
AntMediaType.DataChannelOnly
-> User Screen
User Screen is used to switch between screen and camera publishing mode during initialization part.
-> On State Change
On State Change is the status of the websocket connection between Ant Media Server and the device which uses the SDK. Possible options:
HelperState.CallStateNew
HelperState.CallStateBye
HelperState.ConnectionOpen
HelperState.ConnectionClosed
HelperState.ConnectionError
-> On Local Stream
On Local Stream is triggered whenever we started sending stream to the Ant Media Server.
-> On Add Remote Stream
On Add Remote Stream is triggered whenever we receive a new remote stream from the Ant Media Server.
-> On Data Channel
On Data Channel is triggered when the data channel state changed.
-> On Data Channel Message
On Data Channel Message is triggered whenever we receive a new data channel message.
-> On Update Conference Person
On Update Conference Person is triggered whenever someone added/removed from the conference room on the fly.
-> On Remove Remote Stream
On Remove Remote Stream is triggered whenever you stopped publishing yourself or the stream that you are playing stopped publishing.
-> Ice Servers
Ice Servers is the list where you can define your own turn/stun server list.
-> Callbacks
Callbacks you can listen all the callbacks which are sent from the Ant Media Server side.
Gallery
Examples
Conference Sample App - An example of how to create a WebRTC Multi track Conference application using Ant Media Server Flutter SDK
Data Channel Sample App - An example of how to create a Data Channel text based messaging application using Ant Media Server Flutter SDK
Peer Sample App - An example of how to create a Peer to Peer application using Ant Media Server Flutter SDK
Play Sample App - An example of how to create a WebRTC Player using Ant Media Server Flutter SDK
Publish Sample App - An example of how to create a WebRTC Publish application using Ant Media Server Flutter SDK
Sample Project - It's a complete sample project which contains every sample above.
Function List
AntMediaFlutter.anthelper?.switchCamera()
You can call switchCamera() to switch between front and back camera on mobile devices.
AntMediaFlutter.anthelper?.muteMic(bool mute)
You can call muteMic(bool mute) to mute/unmute microphone.
AntMediaFlutter.anthelper?.toggleCam(bool state)
You can call toggleCam(bool state) to open/close your camera.
AntMediaFlutter.anthelper?.disconnectPeer()
You can call disconnectPeer() to stop a peer connection.
You can call registerPushNotificationToken(subscriberId, authToken, pushNotificationToken, tokenType) to register user push notification token to Ant Media Server.