AntWebRTCView - DreamTeamMobile/Xamarin.AntMedia.Samples GitHub Wiki
Properties
StreamID
string
example: "stream1"
Server
string
example: "ws://drmtm.us:5080/WebRTCAppEE/websocket";
Token
string
example: ""
WebRTCMode of AntWebRTCMode type
Describes which WebRTC mode view will use
- P2P = 1, - not supported now
- Play = 2, - view will play stream
- Publish = 3 - view will publish stream
InitMode of AntViewInitMode type
Describes how view interact on rendering to screen
-
Manually
- view only adding to layout, you will need to call all technical methods manually from code,
- after view added to screen you need to call Name.Init(); if you want to make preview on publishing (nothing if view for playing)
- when you want to start stream playing or publishing - call Name.Start();
-
InitOnViewRender,
- no need to call Name.Init();, use that if you want preview from camera on UI and start call button
- view adding to layout and self-call Name.Init();, so show preview from camera on rendering if view is for publishing
- when you want to start stream playing or publishing - call Name.Start();
-
InitAndStartOnViewRender
- view adding to layout and self-call Name.Init(); and Name.Start();
- as soon as view rendering - app connecting and start play/publish
IsPlaying Bindable Property
changing when Playing Start or Stop
IsPublishing Bindable Property
changing when Publishing Start or Stop
ShowDebugLogs
enable debug logs
EnableDataChannel
enble or disable data-channel for connection
RenderingMode only iOS for now
sets how video rendering inside view
Camera only iOS for now
sets start camers
Events
Disconnected
raised on Disconnected
PlayStarted
raised on Play Started
PlayFinished
raised on Play Finished
PublishStarted
raised on Publish Started
PublishFinished
raised on Publish Finished
Error
raised on Error, has text Message
Methods
Init
init webrtc connection, if Publish mode - make rendering to view from camera without publishing to stream (preview)
Start
start playing or publishing
Stop
stop playing or publishing
ToggleAudio
Mute/UnMute audio when publishing
ToggleVideo
Mute/UnMute Viewo when publishing
SwitchCamera
toggle used camera when publishing