Samples

July 7, 2022 ยท View on GitHub

The package contains the following samples.

SceneDetails
PeerConnectionChecking the process of connecting to a peer
DataChannelSending and receiving text
AudioSending and receiving audio stream
MediaStreamSending and receiving video/audio
MultiPeersInstantiating multiple peers and streaming video/audio
StatsChecking the process of getting stats
MungeSDPChecking effects with mungring SDP parameters
VideoReceiveSending and receiving video stream
MultiVideoReceiveReceiving multiple video streams with one peer
MultiplePeerConnectionsReceiving video stream with multiple peers
ChangeCodecsControlling codecs of the video sender
TricleIceChecking the trickle ICE functionality
RestartIceChecking do an ICE restart
PerfectNegotiationDemonstrating Perfect Negotiation Pattern
LatencyMeasuring a latency of video streaming
ReplaceTrackChange another video track without stopping video streaming

Import samples in project

To get these samples, Push the Import into Project button on the Package Manager.

Download package sample

Sample menu

Menu scene is helpful for checking multiple sample scenes. You can find the scene Example/Menu/Menu.scene.

Sample menu

Open Menu scene and press Play button, as you can see the menu for sample scenes.

Sample menu

Install samples into mobile devices

It's easy to try all samples on mobile devices if only you put sample scenes into Scenes in Build in Build Settings Window. Menu scene should be loaded as a first one so you need to rearrange scenes.

Build Settings

Note

If building app for iOS, you need to add description for CameraUsageDescription and MicrophoneUsageDescription on PlayerSettings. VideoReceive sample use Camera and Microphone. (If not add description, build is failed.)

Camera&Microphone Usage Description in PlayerSettings