This is a sample of bi-directional(send/receive) each other's video.
It works with Unity-Unity or Unity-Browser combination.
Note
If no codec is available on both sender and receiver, the video can not stream. Please note that the compatibility of codecs is different corresponding to platforms and graphics API.
Recommend enabling Hardware Encoder support
on the Render Streaming
inspector to improve performance using hardware acceleration.
- Launch the signaling server using private mode. Please refer to this link for launching.
Note
This sample does not work on signaling server in public mode.
-
Open
Bidirectional
scene and specify IP address of the signaling server to theSignaling URL
parameter on the inspector. -
If you need, change the
Device Index
parameter onWebCamStreamer
component.
- Build and run application. After running application click
SetUp
button. (ConnectionID is autofill.)
Note
When building application for iOS platform, you need set Camera Usage Description
on Player Settings.
If not set this, your application exits. (refer this page)
- Enter same ConnectionID on the application in Unity Editor.
-
Press the
SetUp
button in Unity Editor. -
You can see streaming video each other's. (Of course, it also works with Unity applications.)
1.~3. steps same as Unity-Unity Procedure.
- Open your web browser and access
http://localhost
. You can see the top page. Click aBidirectional Sample
link.
- Enter same ConnectionID on the Unity Application to Browser text area.
- Click
StartVideo
button, after that clickSetUp
button in Browser.
- You can see streaming video each other's.