Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 64588b2

Browse files
author
Kuba Audykowicz
authored
Merge pull request #386 from DolbyIO/develop
Develop
2 parents e1046ac + a4b6aff commit 64588b2

File tree

8 files changed

+91
-29
lines changed

8 files changed

+91
-29
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
packages: write
1010

1111
env:
12-
PLUGIN_VERSION: "1.2.0-beta.9"
12+
PLUGIN_VERSION: "1.2.0-beta.10"
1313
CPP_SDK_VERSION: "2.6.1"
1414
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
1515
PLUGIN_SOURCE_DIR: "DolbyIO"

DolbyIO/DolbyIO.uplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "1.2.0-beta.9",
4+
"VersionName": "1.2.0-beta.10",
55
"FriendlyName": "Dolby.io Virtual Worlds",
66
"Description": "Plugin integrating Dolby.io Communications.",
77
"Category": "Communications",

DolbyIO/Source/Private/DolbyIOModule.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class FDolbyIOModule final : public IModuleInterface
2424
[](std::size_t Count, std::size_t Al) { return ::operator new(Count, static_cast<std::align_val_t>(Al)); },
2525
::operator delete,
2626
[](void* Ptr, std::size_t Al) { ::operator delete(Ptr, static_cast<std::align_val_t>(Al)); }};
27-
BaseDir = FPaths::Combine(BaseDir, "bin");
27+
BaseDir = FPaths::Combine(BaseDir, TEXT("bin"));
2828
LoadDll(BaseDir, "avutil-57.dll");
2929
LoadDll(BaseDir, "avcodec-59.dll");
3030
LoadDll(BaseDir, "dvclient.dll");
@@ -39,13 +39,13 @@ class FDolbyIOModule final : public IModuleInterface
3939
LoadDll(BaseDir, "video_processor.dll");
4040
dolbyio::comms::plugin::video_processor::set_app_allocator(Allocator);
4141
#elif PLATFORM_MAC
42-
BaseDir = FPaths::Combine(BaseDir, "lib");
42+
BaseDir = FPaths::Combine(BaseDir, TEXT("lib"));
4343
LoadDll(BaseDir, "libdolbyio_comms_media.dylib");
4444
LoadDll(BaseDir, "libdolbyio_comms_sdk.dylib");
4545
LoadDll(BaseDir, "libvideo_processor.dylib");
4646
#elif PLATFORM_LINUX
4747
BaseDir += "-ubuntu-20.04-clang10-libc++10";
48-
BaseDir = FPaths::Combine(BaseDir, "lib");
48+
BaseDir = FPaths::Combine(BaseDir, TEXT("lib"));
4949
LoadDll(BaseDir, "libavutil.so.57");
5050
LoadDll(BaseDir, "libavcodec.so.59");
5151
LoadDll(BaseDir, "libavformat.so.59");

DolbyIO/Source/Private/Subsystem/DolbyIOConference.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ void UDolbyIOSubsystem::Handle(const remote_participant_added& Event)
245245
}
246246

247247
BroadcastEvent(OnParticipantAdded, Info.Status, Info);
248+
BroadcastRemoteParticipantConnectedIfNecessary(Info);
248249
ProcessBufferedVideoTracks(Info.UserID);
249250
}
250251

@@ -264,6 +265,26 @@ void UDolbyIOSubsystem::Handle(const remote_participant_updated& Event)
264265
}
265266

266267
BroadcastEvent(OnParticipantUpdated, Info.Status, Info);
268+
BroadcastRemoteParticipantConnectedIfNecessary(Info);
269+
BroadcastRemoteParticipantDisconnectedIfNecessary(Info);
270+
}
271+
272+
void UDolbyIOSubsystem::BroadcastRemoteParticipantConnectedIfNecessary(const FDolbyIOParticipantInfo& ParticipantInfo)
273+
{
274+
if (ParticipantInfo.Status == EDolbyIOParticipantStatus::OnAir)
275+
{
276+
BroadcastEvent(OnRemoteParticipantConnected, ParticipantInfo);
277+
}
278+
}
279+
280+
void UDolbyIOSubsystem::BroadcastRemoteParticipantDisconnectedIfNecessary(
281+
const FDolbyIOParticipantInfo& ParticipantInfo)
282+
{
283+
if (ParticipantInfo.Status == EDolbyIOParticipantStatus::Left ||
284+
ParticipantInfo.Status == EDolbyIOParticipantStatus::Kicked)
285+
{
286+
BroadcastEvent(OnRemoteParticipantDisconnected, ParticipantInfo);
287+
}
267288
}
268289

269290
void UDolbyIOSubsystem::Handle(const local_participant_updated& Event)

DolbyIO/Source/Private/Subsystem/DolbyIOInitialization.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,9 @@ void UDolbyIOObserver::InitializeComponent()
228228
DLB_BIND(OnUnmuteParticipantError);
229229

230230
DLB_BIND(OnParticipantAdded);
231-
232231
DLB_BIND(OnParticipantUpdated);
232+
DLB_BIND(OnRemoteParticipantConnected);
233+
DLB_BIND(OnRemoteParticipantDisconnected);
233234

234235
DLB_BIND(OnLocalParticipantUpdated);
235236

DolbyIO/Source/Public/DolbyIO.h

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnParticipantAddedDelegate,
2121
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
2222
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnParticipantUpdatedDelegate, const EDolbyIOParticipantStatus,
2323
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
24+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnRemoteParticipantConnectedDelegate,
25+
const FDolbyIOParticipantInfo&, ParticipantInfo);
26+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnRemoteParticipantDisconnectedDelegate,
27+
const FDolbyIOParticipantInfo&, ParticipantInfo);
2428
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnLocalParticipantUpdatedDelegate, const EDolbyIOParticipantStatus,
2529
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
2630
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnVideoTrackAddedDelegate, const FDolbyIOVideoTrack&, VideoTrack);
@@ -309,6 +313,10 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem
309313
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
310314
FDolbyIOOnParticipantUpdatedDelegate OnParticipantUpdated;
311315
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
316+
FDolbyIOOnRemoteParticipantConnectedDelegate OnRemoteParticipantConnected;
317+
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
318+
FDolbyIOOnRemoteParticipantDisconnectedDelegate OnRemoteParticipantDisconnected;
319+
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
312320
FDolbyIOOnLocalParticipantUpdatedDelegate OnLocalParticipantUpdated;
313321
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
314322
FDolbyIOOnVideoTrackAddedDelegate OnVideoTrackAdded;
@@ -341,6 +349,9 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem
341349
void ToggleInputMute();
342350
void ToggleOutputMute();
343351

352+
void BroadcastRemoteParticipantConnectedIfNecessary(const FDolbyIOParticipantInfo& ParticipantInfo);
353+
void BroadcastRemoteParticipantDisconnectedIfNecessary(const FDolbyIOParticipantInfo& ParticipantInfo);
354+
344355
void BroadcastVideoTrackAdded(const FDolbyIOVideoTrack& VideoTrack);
345356
void BroadcastVideoTrackEnabled(const FDolbyIOVideoTrack& VideoTrack);
346357
void ProcessBufferedVideoTracks(const FString& ParticipantID);
@@ -475,14 +486,30 @@ class DOLBYIO_API UDolbyIOObserver : public UActorComponent
475486
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
476487
FDolbyIOOnErrorDelegate OnUnmuteParticipantError;
477488

478-
/** Triggered when a remote participant is added to the conference. */
489+
/** Triggered when a remote participant is added to the conference.
490+
*
491+
* This event is triggered for all participants who were present in the conference at any time, including
492+
* participants who joined and left and are no longer in the conference. The status of the participant provided by
493+
* this event should be taken into account when handling this event.
494+
*
495+
* Users who are only interested in tracking whether a participant is currently connected to the conference are
496+
* encouraged to use On Remote Participant Connected and On Remote Participant Disconnected for simplicity.
497+
*/
479498
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
480499
FDolbyIOOnParticipantAddedDelegate OnParticipantAdded;
481500

482501
/** Triggered when a remote participant's status is updated. */
483502
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
484503
FDolbyIOOnParticipantUpdatedDelegate OnParticipantUpdated;
485504

505+
/** Triggered when a remote participant is connected to the conference. */
506+
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
507+
FDolbyIOOnRemoteParticipantConnectedDelegate OnRemoteParticipantConnected;
508+
509+
/** Triggered when a remote participant is disconnected from the conference. */
510+
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
511+
FDolbyIOOnRemoteParticipantDisconnectedDelegate OnRemoteParticipantDisconnected;
512+
486513
/** Triggered when the local participant's status is updated. */
487514
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
488515
FDolbyIOOnLocalParticipantUpdatedDelegate OnLocalParticipantUpdated;
@@ -711,6 +738,14 @@ class DOLBYIO_API UDolbyIOObserver : public UActorComponent
711738
void FwdOnParticipantUpdated(const EDolbyIOParticipantStatus Status, const FDolbyIOParticipantInfo& ParticipantInfo)
712739
DLB_DEFINE_FORWARDER(OnParticipantUpdated, Status, ParticipantInfo);
713740

741+
UFUNCTION()
742+
void FwdOnRemoteParticipantConnected(const FDolbyIOParticipantInfo& ParticipantInfo)
743+
DLB_DEFINE_FORWARDER(OnRemoteParticipantConnected, ParticipantInfo);
744+
745+
UFUNCTION()
746+
void FwdOnRemoteParticipantDisconnected(const FDolbyIOParticipantInfo& ParticipantInfo)
747+
DLB_DEFINE_FORWARDER(OnRemoteParticipantDisconnected, ParticipantInfo);
748+
714749
UFUNCTION()
715750
void FwdOnLocalParticipantUpdated(const EDolbyIOParticipantStatus Status,
716751
const FDolbyIOParticipantInfo& ParticipantInfo)

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,4 @@
66

77
With the Dolby.io Virtual Worlds plugin for Unreal Engine, you can easily integrate [Dolby.io](https://dolby.io) Spatial Audio, powered by Dolby Atmos technology into your virtual world applications.
88

9-
You can find the plugin documentation here: [Online documentation](https://api-references.dolby.io/comms-sdk-unreal/)
10-
11-
## Supported platforms
12-
13-
The plugin is compatible with the following operating systems:
14-
- Windows 10 or later
15-
- macOS 10.14 or later if you use UE4
16-
- macOS 12.5 or later if you use UE5
17-
- Ubuntu 20.04 or later
18-
19-
## Prerequisites
20-
21-
Before you start, make sure that you have:
22-
- Unreal Engine 4.27 or later installed on your computer. For more details, see the [Unreal Engine download](https://www.unrealengine.com/en-US/download) page and the [4.27](https://docs.unrealengine.com/4.27/en-US/Basics/InstallingUnrealEngine/) or [5.2](https://docs.unrealengine.com/5.2/en-US/installing-unreal-engine/) installation manuals.
23-
- A [Dolby.io](https://dolby.io) account. If you do not have an account, [sign up](https://dolby.io/signup) for free.
24-
- A client access token or an app key and an app secret copied from the Communications & Media [Dolby.io Dashboard](https://dashboard.dolby.io/).
25-
26-
## Installation
27-
28-
1. Make sure that your project contains a `Plugins` folder in the root of your game folder. If you do not have this folder, create it.
29-
2. Download the latest plugin [release](https://github.com/DolbyIO/comms-sdk-unreal/releases) for your platform and unpack the plugin to the `Plugins` folder.
30-
3. Launch your project using the Unreal Editor and select `Edit > Plugins` from the menu to enable the plugin manually. This step requires restarting the editor.
9+
You can find the plugin documentation [here](https://api-references.dolby.io/comms-sdk-unreal/).

docs/docs/blueprints/events.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ Triggered automatically when a message is received.
192192

193193
Triggered automatically when a remote participant is added to the conference.
194194

195+
This event is triggered for all participants who were present in the conference at any time, including participants who joined and left and are no longer in the conference. The status of the participant provided by this event should be taken into account when handling this event. For more information, refer to the [graph of possible status changes](../../static/img/participant-status-changes.png).
196+
197+
Users who are only interested in tracking whether a participant is currently connected to the conference are encouraged to use [On Remote Participant Connected](#on-remote-participant-connected) and [On Remote Participant Disconnected](#on-remote-participant-disconnected) for simplicity.
198+
195199
#### Data provided
196200
| Provides | Type | Description |
197201
|----------------------|:--------------------------------------------------------------------|:-----------------------------------|
@@ -212,6 +216,28 @@ Triggered automatically when a remote participant's status is updated. For more
212216

213217
---
214218

219+
## On Remote Participant Connected
220+
221+
Triggered automatically when a remote participant is connected to the conference.
222+
223+
#### Data provided
224+
| Provides | Type | Description |
225+
|----------------------|:--------------------------------------------------------------------|:-----------------------------------|
226+
| **Participant Info** | [Dolby.io Participant Info](types.mdx#dolbyio-participant-info) | Information about the participant. |
227+
228+
---
229+
230+
## On Remote Participant Disconnected
231+
232+
Triggered automatically when a remote participant is disconnected from the conference.
233+
234+
#### Data provided
235+
| Provides | Type | Description |
236+
|----------------------|:--------------------------------------------------------------------|:-----------------------------------|
237+
| **Participant Info** | [Dolby.io Participant Info](types.mdx#dolbyio-participant-info) | Information about the participant. |
238+
239+
---
240+
215241
## On Screenshare Sources Received
216242

217243
Triggered by [**Dolby.io Get Screenshare Sources**](functions.md#dolbyio-get-screenshare-sources) when screen share sources are received.

0 commit comments

Comments
 (0)