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

Develop #354

Merged
merged 6 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:

env:
CPP_SDK_TAG: "2.5.4"
CPP_SDK_TAG: "2.5.5"
CPP_SDK_DESTINATION: "DolbyIO"
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
UNREAL_PLUGIN_OUTPUT: "Build/DolbyIO"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
packages: write

env:
CPP_SDK_TAG: "2.5.4"
CPP_SDK_TAG: "2.5.5"
CPP_SDK_DESTINATION: "DolbyIO"
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
UNREAL_PLUGIN_OUTPUT: "Build/DolbyIO"
Expand Down
16 changes: 16 additions & 0 deletions DolbyIO/Source/Private/Subsystem/DolbyIOConference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ void UDolbyIOSubsystem::Handle(const remote_participant_added& Event)
{
return;
}

const FDolbyIOParticipantInfo Info = ToFDolbyIOParticipantInfo(Event.participant);
DLB_UE_LOG("Participant status added: UserID=%s Name=%s ExternalID=%s Status=%s", *Info.UserID, *Info.Name,
*Info.ExternalID, *ToString(*Event.participant.status));
Expand All @@ -253,6 +254,7 @@ void UDolbyIOSubsystem::Handle(const remote_participant_updated& Event)
{
return;
}

const FDolbyIOParticipantInfo Info = ToFDolbyIOParticipantInfo(Event.participant);
DLB_UE_LOG("Participant status updated: UserID=%s Name=%s ExternalID=%s Status=%s", *Info.UserID, *Info.Name,
*Info.ExternalID, *ToString(*Event.participant.status));
Expand All @@ -264,6 +266,20 @@ void UDolbyIOSubsystem::Handle(const remote_participant_updated& Event)
BroadcastEvent(OnParticipantUpdated, Info.Status, Info);
}

void UDolbyIOSubsystem::Handle(const local_participant_updated& Event)
{
if (!Event.participant.status)
{
return;
}

const FDolbyIOParticipantInfo Info = ToFDolbyIOParticipantInfo(Event.participant);
DLB_UE_LOG("Local participant status updated: UserID=%s Name=%s ExternalID=%s Status=%s", *Info.UserID, *Info.Name,
*Info.ExternalID, *ToString(*Event.participant.status));

BroadcastEvent(OnLocalParticipantUpdated, Info.Status, Info);
}

void UDolbyIOSubsystem::Handle(const conference_message_received& Event)
{
const FString Message = ToFString(Event.message);
Expand Down
15 changes: 8 additions & 7 deletions DolbyIO/Source/Private/Subsystem/DolbyIOInitialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "Engine/GameInstance.h"
#include "Engine/World.h"
#include "GenericPlatform/GenericPlatformProperties.h"
#include "Interfaces/IPluginManager.h"
#include "Misc/EngineVersion.h"
#include "Misc/Paths.h"
Expand Down Expand Up @@ -117,8 +116,7 @@ void UDolbyIOSubsystem::Initialize(const FString& Token)

const FString ComponentName = "unreal-sdk";
const FString ComponentVersion = *IPluginManager::Get().FindPlugin("DolbyIO")->GetDescriptor().VersionName +
FString{"_UE"} + FEngineVersion::Current().ToString(EVersionComponent::Minor) +
"_" + FPlatformProperties::IniPlatformName();
FString{"_UE"} + FEngineVersion::Current().ToString(EVersionComponent::Minor);
DLB_UE_LOG("Registering component %s %s", *ComponentName, *ComponentVersion);
Sdk->register_component_version(ToStdString(ComponentName), ToStdString(ComponentVersion))
.then(
Expand All @@ -131,6 +129,7 @@ void UDolbyIOSubsystem::Initialize(const FString& Token)
.then(DLB_REGISTER_HANDLER(device_management, audio_device_changed))
.then(DLB_REGISTER_HANDLER(conference, audio_levels))
.then(DLB_REGISTER_HANDLER(conference, conference_message_received))
.then(DLB_REGISTER_HANDLER(conference, local_participant_updated))
.then(DLB_REGISTER_HANDLER(conference, remote_participant_added))
.then(DLB_REGISTER_HANDLER(conference, remote_participant_updated))
.then(DLB_REGISTER_HANDLER(conference, remote_video_track_added))
Expand Down Expand Up @@ -176,10 +175,10 @@ void UDolbyIOObserver::InitializeComponent()
DLB_BIND(OnConnectError);
DLB_BIND(OnDemoConferenceError);

DLB_BIND(OnDisconnected)
DLB_BIND(OnDisconnected);
DLB_BIND(OnDisconnectError);

DLB_BIND(OnSetSpatialEnvironmentScaleError)
DLB_BIND(OnSetSpatialEnvironmentScaleError);

DLB_BIND(OnMuteInputError);

Expand All @@ -197,6 +196,8 @@ void UDolbyIOObserver::InitializeComponent()

DLB_BIND(OnParticipantUpdated);

DLB_BIND(OnLocalParticipantUpdated);

DLB_BIND(OnVideoTrackAdded);

DLB_BIND(OnVideoTrackRemoved);
Expand All @@ -205,7 +206,7 @@ void UDolbyIOObserver::InitializeComponent()

DLB_BIND(OnVideoTrackDisabled);

DLB_BIND(OnVideoEnabled)
DLB_BIND(OnVideoEnabled);
DLB_BIND(OnEnableVideoError);

DLB_BIND(OnVideoDisabled);
Expand All @@ -218,7 +219,7 @@ void UDolbyIOObserver::InitializeComponent()
DLB_BIND(OnStartScreenshareError);

DLB_BIND(OnScreenshareStopped);
DLB_BIND(OnStopScreenshareError)
DLB_BIND(OnStopScreenshareError);

DLB_BIND(OnChangeScreenshareParametersError);

Expand Down
14 changes: 14 additions & 0 deletions DolbyIO/Source/Public/DolbyIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnParticipantAddedDelegate,
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnParticipantUpdatedDelegate, const EDolbyIOParticipantStatus,
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnLocalParticipantUpdatedDelegate, const EDolbyIOParticipantStatus,
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnVideoTrackAddedDelegate, const FDolbyIOVideoTrack&, VideoTrack);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnVideoTrackRemovedDelegate, const FDolbyIOVideoTrack&, VideoTrack);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnVideoTrackEnabledDelegate, const FDolbyIOVideoTrack&, VideoTrack);
Expand Down Expand Up @@ -306,6 +308,8 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnParticipantUpdatedDelegate OnParticipantUpdated;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnLocalParticipantUpdatedDelegate OnLocalParticipantUpdated;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnVideoTrackAddedDelegate OnVideoTrackAdded;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnVideoTrackRemovedDelegate OnVideoTrackRemoved;
Expand Down Expand Up @@ -349,6 +353,7 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem
void Handle(const dolbyio::comms::audio_device_changed&);
void Handle(const dolbyio::comms::audio_levels&);
void Handle(const dolbyio::comms::conference_message_received&);
void Handle(const dolbyio::comms::local_participant_updated&);
void Handle(const dolbyio::comms::remote_participant_added&);
void Handle(const dolbyio::comms::remote_participant_updated&);
void Handle(const dolbyio::comms::remote_video_track_added&);
Expand Down Expand Up @@ -477,6 +482,10 @@ class DOLBYIO_API UDolbyIOObserver : public UActorComponent
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnParticipantUpdatedDelegate OnParticipantUpdated;

/** Triggered when the local participant's status is updated. */
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnLocalParticipantUpdatedDelegate OnLocalParticipantUpdated;

/** Triggered when a video track is added. */
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnVideoTrackAddedDelegate OnVideoTrackAdded;
Expand Down Expand Up @@ -701,6 +710,11 @@ class DOLBYIO_API UDolbyIOObserver : public UActorComponent
void FwdOnParticipantUpdated(const EDolbyIOParticipantStatus Status, const FDolbyIOParticipantInfo& ParticipantInfo)
DLB_DEFINE_FORWARDER(OnParticipantUpdated, Status, ParticipantInfo);

UFUNCTION()
void FwdOnLocalParticipantUpdated(const EDolbyIOParticipantStatus Status,
const FDolbyIOParticipantInfo& ParticipantInfo)
DLB_DEFINE_FORWARDER(OnLocalParticipantUpdated, Status, ParticipantInfo);

UFUNCTION()
void FwdOnVideoTrackAdded(const FDolbyIOVideoTrack& VideoTrack) DLB_DEFINE_FORWARDER(OnVideoTrackAdded, VideoTrack);

Expand Down
1 change: 1 addition & 0 deletions DolbyIO/Source/Public/DolbyIOCppSdkFwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace dolbyio::comms
struct audio_device_changed;
struct audio_levels;
struct conference_message_received;
struct local_participant_updated;
struct remote_participant_added;
struct remote_participant_updated;
struct remote_video_track_added;
Expand Down
12 changes: 12 additions & 0 deletions docs/docs/blueprints/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ Triggered by [**Dolby.io Set Token**](functions.md#dolbyio-set-token) when the p

---

## On Local Participant Updated

Triggered when the local participant's status is updated as a result of calling [Connect](functions.md#dolbyio-connect), [Demo Conference](functions.md#dolbyio-demo-conference) or [Update User Metadata](functions.md#dolbyio-update-user-metadata).

#### Data provided
| Provides | Type | Description |
|---|:---|:---|
| **Status** | [Dolby.io Participant Status](types.mdx#dolbyio-participant-status) | The status of the participant. |
| **Participant Info** | [Dolby.io Participant Info](types.mdx#dolbyio-participant-info) | Information about the participant. |

---

## On Message Received

Triggered automatically when a message is received.
Expand Down