Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [3.1.0-exp.7] - 2023-08-09

### Added

- Added configurable logger to enable users to customize logging for their environment.

### Changed

- Upgrade the version of WebRTC package `3.0.0-pre.6`.
- Add `AudioStreamSender.loopback` property.

### Fixed

- Fixed error on HTTP signaling when using short polling interval.
- Fixed `SignalingManager` so that ICE server configurations aren't effected.
- Added a workaround to fix an issue where `InputField` wasn't worked when entering characters from browsers or a `Receiver` scene of package sample.

### Removed

- Removed Furioos Integration.
  • Loading branch information
Unity Technologies committed Aug 9, 2023
1 parent 6cc34c8 commit 73473ae
Show file tree
Hide file tree
Showing 121 changed files with 2,218 additions and 1,355 deletions.
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@ All notable changes to com.unity.renderstreaming package will be documented in t
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.1.0-exp.6] - 2023-2-24
## [3.1.0-exp.7] - 2023-08-09

### Added

- Added configurable logger to enable users to customize logging for their environment.

### Changed

- Upgrade the version of WebRTC package `3.0.0-pre.6`.
- Add `AudioStreamSender.loopback` property.

### Fixed

- Fixed error on HTTP signaling when using short polling interval.
- Fixed `SignalingManager` so that ICE server configurations aren't effected.
- Added a workaround to fix an issue where `InputField` wasn't worked when entering characters from browsers or a `Receiver` scene of package sample.

### Removed

- Removed Furioos Integration.

## [3.1.0-exp.6] - 2023-02-24

### Added

Expand All @@ -20,7 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Websocket is in default for signaling protocol instead of HTTP polling.
- Changed a unit of the HTTP polling interval, second to millisecond.

## [3.1.0-exp.5] - 2023-1-16
## [3.1.0-exp.5] - 2023-01-16

### Changed

Expand Down
3 changes: 2 additions & 1 deletion Documentation~/audio-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ This component streams the audio rendering results from [`AudioListener`](https:
| **Audio Source Type** | Choose the type of source for your audio streaming. <br/> - *Audio Listener* <br/> - *Audio Source* <br/> - *Microphone* | *Audio Listener* |
| *Audio Listener* | [`Audio Listener`](https://docs.unity3d.com/ScriptReference/AudioSource.html) instance for sending audio | |
| *Audio Source* | [`Audio Source`](https://docs.unity3d.com/ScriptReference/AudioSource.html) instance for sending audio | |
| *Microphone Device Index* | The index of the video input device to be used. See [Microphone.devices](https://docs.unity3d.com/ScriptReference/Microphone-devices.html). | 0 |
| *Microphone Device Index* | The index of the microphone input device to be used. See [Microphone.devices](https://docs.unity3d.com/ScriptReference/Microphone-devices.html). | 0 |
| *Auto Request User Authorization* | Whether request permission to use microphone. You don't need to enable it if you call [Application.RequestUserAuthorization](https://docs.unity3d.com/ScriptReference/Application.RequestUserAuthorization.html) yourself. | Enabled |
| **Audio Codec** | *Default* option means trying to use all available codecs for negotiating other peers. | Default |
| *Loopback* | The sending audio is also played on sender side. | Disabled |
| **Bitrate (kbits/sec)** | The bitrate of the audio streaming. | |
| *Min* | The minimum value of the bitrate. | 0 |
| *Max* | The maximum value of the bitrate. | 1000 |
Expand Down
Binary file modified Documentation~/images/audiostreamsender_inspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/turn-server-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 5 additions & 10 deletions Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ This version of Render Streaming is compatible with the following versions of th

- **Unity 2020.3**
- **Unity 2021.3**
- **Unity 2022.2**
- **Unity 2022.3**
- **Unity 2023.1**

### Platform

- **Windows**
- **Windows** (x64 only)
- **Linux**
- **macOS**
- **macOS** (**Intel** and **Apple Slicon**)
- **iOS**
- **Android** (**ARMv7** is not supported)
- **Android** (**ARM64** only. **ARMv7** is not supported)

> [!NOTE]
> This package depends on [the WebRTC package](https://docs.unity3d.com/Packages/[email protected]). If you build for mobile platform (iOS/Android), please see [the package documentation](https://docs.unity3d.com/Packages/[email protected]/manual/requirements.html#additional-notes) to know the requirements for building.
Expand All @@ -64,9 +65,3 @@ Unity Render Streaming supports almost all browsers that can use WebRTC.
## Samples

Please check [this page](samples.md).

## Furioos compatibility

Unity provides **[Furioos](https://www.furioos.com)** which is a web service to stream any 3D contents on any devices in real-time.

This version of Unity Render Streaming doesn't support Furioos integration.
2 changes: 1 addition & 1 deletion Documentation~/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You can change signaling settings below during runtime.
| Parameter | Description |
| --- | --- |
| **Use Default Settings** | Refer to settings of [Project Settings](settings.md). |
| [**Signaling Type**](signaling-type.md) | *Http*, *WebSocket* or *Furioos*. |
| [**Signaling Type**](signaling-type.md) | *Http* or *WebSocket*. |
| **Enable/Disable SSL** | Use **https** if set enable. |
| **Host Address** | Set IP address or URL of your signaling server. |
| **Interval (msec)** | Polling interval for communication of signaling. <br/> This parameter effects Http signaling. |
Expand Down
5 changes: 0 additions & 5 deletions Documentation~/signaling-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

- `Http Signaling`
- `WebSocket Signaling`
- `Furioos Signaling`

In the example, the schema given to `URL Signaling` is used to determine which type to use.

Expand Down Expand Up @@ -32,7 +31,3 @@ When the signaling server receives the Offer or Candidate, the server distribute
> [!WARNING]
> WebSocket does not work in iOS Safari on servers that use self-signed certificates.
> If you want to verify the behavior of WebSocket signaling in iOS Safari, use a certificate issued by a trusted certification authority. Or try signaling with HTTP.
## `Furioos Signaling`

Please see [this page](deploy-to-furioos.md).
33 changes: 12 additions & 21 deletions Documentation~/turnserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document covers the process of linking Unity Render Streaming to a TURN ser

## Instance settings

[coturn](https://github.com/coturn/coturn) software is an open source implementation for TURN servers.
[coturn](https://github.com/coturn/coturn) software is an open source implementation for TURN servers.
The following is an explanation for running coturn on a GCP instance.

**ubuntu-minimal-1604-xenial-v20190628** is used in the instance image so that the `apt` command can be used to install coturn. If the distribution is supported by coturn, there shouldn't be any issues. See the [coturn documentation](https://github.com/coturn/coturn) for details on coturn.
Expand All @@ -27,15 +27,15 @@ The port used by the TURN server needs to be public, so add the following settin

### Installing coturn

Log into the GCP instance with `ssh`.
Log into the GCP instance with `ssh`.
Install `coturn`.

```shell
sudo apt install coturn
```

Change the settings for booting with a daemon to use coturn as a TURN server.
Edit the following file.
Change the settings for booting with a daemon to use coturn as a TURN server.
Edit the following file.

```shell
sudo vim /etc/default/coturn
Expand Down Expand Up @@ -72,7 +72,7 @@ realm=yourcompany.com
log-file=/var/tmp/turn.log
```

When finished, restart the coturn service.
When finished, restart the coturn service.

```shell
sudo systemctl restart coturn
Expand All @@ -96,25 +96,16 @@ Use the [webrtc sample](https://webrtc.github.io/samples/src/content/peerconnect

![TURN connection testing](images/turn-connection-testing.png)

Click `Gather candidates` to show a list of potential communication paths. Verify that a log is also printed on the TURN server side.
Click `Gather candidates` to show a list of potential communication paths. Verify that a log is also printed on the TURN server side.

### Browser side changes

Change the `config.iceServers` settings under `video-player.js` on the browser side.

```javascript
config.iceServers = [{
urls: ['stun:stun.l.google.com:19302']
}, {
urls: ['turn:xx.xx.xx.xx:3478?transport=tcp'],
username: 'username',
credential: 'password'
}
];
```
Start the web server, access the site, and add the TURN server settings to each of the ICE servers as follows:

![Set ICE Servers Configuration On Browser](images/ice-server-configuration-browser.png)

### Unity side changes
### Unity side changes

Add the TURN server settings to `Ice Server` in the `Render Streaming` inspector.
Open the Project Settings window and add the URL of the TURN server to the Render Streaming settings as shown below.

![TURN Render Streaming inspector](images/turn-renderstreaming-inspector.png)
![TURN Server Settings](images/turn-server-settings.png)
6 changes: 3 additions & 3 deletions Editor/AudioStreamReceiverEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using UnityEngine;

namespace Unity.RenderStreaming.Editor
{
Expand All @@ -19,8 +19,8 @@ class Styles

void OnEnable()
{
m_codec = serializedObject.FindProperty("m_Codec");
m_targetAudioSource = serializedObject.FindProperty("m_TargetAudioSource");
m_codec = serializedObject.FindProperty(AudioStreamReceiver.CodecPropertyName);
m_targetAudioSource = serializedObject.FindProperty(AudioStreamReceiver.TargetAudioSourcePropertyName);
}

void OnDisable()
Expand Down
25 changes: 17 additions & 8 deletions Editor/AudioStreamSenderEditor.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#if UNITY_EDITOR
using System;
using UnityEngine;
using UnityEditor;
using UnityEditor.AnimatedValues;
using UnityEngine;

namespace Unity.RenderStreaming.Editor
{
Expand All @@ -26,19 +26,21 @@ class Styles
SerializedProperty m_audioListener;
SerializedProperty m_microphoneDeviceIndex;
SerializedProperty m_autoRequestUserAuthorization;
SerializedProperty m_loopback;
SerializedProperty m_bitrate;

static AnimBool[] m_sourceFade;

void OnEnable()
{
m_source = serializedObject.FindProperty("m_Source");
m_audioSource = serializedObject.FindProperty("m_AudioSource");
m_audioListener = serializedObject.FindProperty("m_AudioListener");
m_microphoneDeviceIndex = serializedObject.FindProperty("m_MicrophoneDeviceIndex");
m_autoRequestUserAuthorization = serializedObject.FindProperty("m_AutoRequestUserAuthorization");
m_codec = serializedObject.FindProperty("m_Codec");
m_bitrate = serializedObject.FindProperty("m_Bitrate");
m_source = serializedObject.FindProperty(AudioStreamSender.SourcePropertyName);
m_audioSource = serializedObject.FindProperty(AudioStreamSender.AudioSourcePropertyName);
m_audioListener = serializedObject.FindProperty(AudioStreamSender.AudioListenerPropertyName);
m_microphoneDeviceIndex = serializedObject.FindProperty(AudioStreamSender.MicrophoneDeviceIndexPropertyName);
m_autoRequestUserAuthorization = serializedObject.FindProperty(AudioStreamSender.AutoRequestUserAuthorizationPropertyName);
m_codec = serializedObject.FindProperty(AudioStreamSender.CodecPropertyName);
m_bitrate = serializedObject.FindProperty(AudioStreamSender.BitratePropertyName);
m_loopback = serializedObject.FindProperty(AudioStreamSender.LoopbackPropertyName);

if (m_sourceFade == null)
{
Expand Down Expand Up @@ -74,6 +76,13 @@ public override void OnInspectorGUI()
EditorGUILayout.PropertyField(m_codec);
}

EditorGUILayout.Space();
EditorGUILayout.PropertyField(m_loopback);
if (target is AudioStreamSender sender && sender.isPlaying)
{
sender.loopback = m_loopback.boolValue;
}

EditorGUILayout.Space();
EditorGUILayout.PropertyField(m_bitrate, s_Styles.bitrateContent);

Expand Down
10 changes: 5 additions & 5 deletions Editor/ConfigInfoLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public ConfigInfoLine(
m_haveFixer = resolver != null;
m_dependTester = dependTester;

var testLabel = new Label(label) {name = "testLabel"};
var fixer = new Button(resolver) {text = resolverButtonLabel, name = "resolver"};
var testRow = new VisualElement() {name = "testRow"};
var testLabel = new Label(label) { name = "testLabel" };
var fixer = new Button(resolver) { text = resolverButtonLabel, name = "resolver" };
var testRow = new VisualElement() { name = "testRow" };
testRow.Add(testLabel);
if (m_visibleStatus)
{
var statusOk = new Image {image = Style.ok, name = "statusOK"};
var statusError = new Image {image = Style.error, name = "statusError"};
var statusOk = new Image { image = Style.ok, name = "statusOK" };
var statusError = new Image { image = Style.error, name = "statusError" };
testRow.Add(statusOk);
testRow.Add(statusError);
}
Expand Down
4 changes: 2 additions & 2 deletions Editor/CustomSignalingSettingsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public class CustomSignalingSettingsEditor : Attribute
private readonly string label;

/// <summary>
///
///
/// </summary>
/// <param name="inspectedType"></param>
/// <param name="label"></param>
public CustomSignalingSettingsEditor(Type inspectedType, string label)
{
if (inspectedType == null)
Debug.LogError("Failed to load CustomEditor inspected type");
RenderStreaming.Logger.Log(LogType.Error, "Failed to load CustomEditor inspected type");
this.inspectedType = inspectedType;
this.label = label;
}
Expand Down
12 changes: 7 additions & 5 deletions Editor/IRequestJob.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using UnityEditor.PackageManager; //StatusCode
using UnityEditor.PackageManager; //StatusCode

namespace Unity.RenderStreaming.Editor {
namespace Unity.RenderStreaming.Editor
{

internal interface IRequestJob {
StatusCode Update();
internal interface IRequestJob
{
StatusCode Update();

}
}


} //namespace Unity.RenderStreaming.Editor
34 changes: 19 additions & 15 deletions Editor/InputSystem/InputReceiverEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.InputSystem;
Expand All @@ -16,9 +16,11 @@ public void OnEnable()
{
InputUser.onChange += OnUserChange;

m_ActionsProperty = serializedObject.FindProperty("m_Actions");
m_ActionEventsProperty = serializedObject.FindProperty("m_ActionEvents");
m_DefaultActionMapProperty = serializedObject.FindProperty("m_DefaultActionMap");
m_Local = serializedObject.FindProperty(DataChannelBase.LocalPropertyName);
m_Label = serializedObject.FindProperty(DataChannelBase.LabelPropertyName);
m_Actions = serializedObject.FindProperty(InputReceiver.ActionsPropertyName);
m_ActionEvents = serializedObject.FindProperty(InputReceiver.ActionEventsPropertyName);
m_DefaultActionMap = serializedObject.FindProperty(InputReceiver.DefaultActionMapPropertyName);
}
private void OnUserChange(InputUser user, InputUserChange change, InputDevice device)
{
Expand All @@ -29,12 +31,12 @@ public override void OnInspectorGUI()
{
EditorGUI.BeginChangeCheck();

EditorGUILayout.PropertyField(serializedObject.FindProperty("local"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("label"));
EditorGUILayout.PropertyField(m_Local);
EditorGUILayout.PropertyField(m_Label);

// Action config section.
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(m_ActionsProperty);
EditorGUILayout.PropertyField(m_Actions);
if (EditorGUI.EndChangeCheck() || !m_ActionAssetInitialized)
OnActionAssetChange();
++EditorGUI.indentLevel;
Expand All @@ -48,15 +50,15 @@ public override void OnInspectorGUI()
{
if (selected == 0)
{
m_DefaultActionMapProperty.stringValue = null;
m_DefaultActionMap.stringValue = null;
}
else
{
// Use ID rather than name.
var asset = (InputActionAsset)m_ActionsProperty.objectReferenceValue;
var asset = (InputActionAsset)m_Actions.objectReferenceValue;
var actionMap = asset.FindActionMap(m_ActionMapOptions[selected].text);
if (actionMap != null)
m_DefaultActionMapProperty.stringValue = actionMap.id.ToString();
m_DefaultActionMap.stringValue = actionMap.id.ToString();
}
m_SelectedDefaultActionMap = selected;
}
Expand Down Expand Up @@ -85,7 +87,7 @@ public override void OnInspectorGUI()
if (m_ActionMapIndices[i] != n)
continue;

EditorGUILayout.PropertyField(m_ActionEventsProperty.GetArrayElementAtIndex(i), m_ActionNames[i]);
EditorGUILayout.PropertyField(m_ActionEvents.GetArrayElementAtIndex(i), m_ActionNames[i]);
}
}
}
Expand Down Expand Up @@ -144,7 +146,7 @@ private void OnActionAssetChange()
m_ActionAssetInitialized = true;

var playerInput = (InputReceiver)target;
var asset = (InputActionAsset)m_ActionsProperty.objectReferenceValue;
var asset = (InputActionAsset)m_Actions.objectReferenceValue;
if (asset == null)
{
m_ActionMapOptions = null;
Expand Down Expand Up @@ -246,12 +248,14 @@ void AddEntry(InputAction action, PlayerInput.ActionEvent actionEvent)
[NonSerialized] private int[] m_ActionMapIndices;
[NonSerialized] private int m_NumActionMaps;

[NonSerialized] private SerializedProperty m_ActionEventsProperty;
[NonSerialized] private SerializedProperty m_ActionEvents;
[NonSerialized] private int m_SelectedDefaultActionMap;
[NonSerialized] private GUIContent[] m_ActionMapOptions;

[NonSerialized] private SerializedProperty m_ActionsProperty;
[NonSerialized] private SerializedProperty m_DefaultActionMapProperty;
[NonSerialized] private SerializedProperty m_Local;
[NonSerialized] private SerializedProperty m_Label;
[NonSerialized] private SerializedProperty m_Actions;
[NonSerialized] private SerializedProperty m_DefaultActionMap;
[NonSerialized] private bool m_ActionAssetInitialized;
}
}
Loading

0 comments on commit 73473ae

Please sign in to comment.