EphTron / unity-webrtc-opus-audio

Simple workaround to send audio through Unity's WebRTC plugin by encoding the Microphone input with UnityOpus and sending it as a byte[] through the DataChannel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unity-webrtc-opus-audio

Simple workaround to send audio through Unity's WebRTC plugin by encoding the Microphone input with UnityOpus and sending it as a byte[] through the DataChannel. I just modified the existing code from both plugins and merged them in a simple example. Credit goes to Unity-Technologies, TyounanMOTI and lstemple who pointed to UnityOpus.

Setup

Install the WebRTC plugin by adding git package URL: com.unity.webrtc@2.3.3-preview

Tested

Tested with Unity 2020.2.3f DX11 (Windows10)

About

Simple workaround to send audio through Unity's WebRTC plugin by encoding the Microphone input with UnityOpus and sending it as a byte[] through the DataChannel.


Languages

Language:C# 100.0%