millicast / millicast-player-unreal-engine-plugin

Millicast Player plugin for Unreal Engine
Other
19 stars 15 forks source link

Audio Consumer Crashing UE on Play in Editor #19

Closed TroubledPrawn closed 1 year ago

TroubledPrawn commented 2 years ago

image

Issue: UE will crash immediately when connected to a live broadcast and the Audio Consumer is in the BP.

I think this will be a simple fix, but how is the "Audio Consumer" supposed to be configured in the project?

Steps I have taken:

  1. Add "Millicast Audio Actor" to projects level
  2. Inside my MillicastBP I have created a variable of type "Millicast Audio Actor" and named it Audio Consumer
  3. Using the Event "On Audio Track" from the Millicast Subscriber Component I have connected the nodes as the tutorial explains. image

I suspect the issue is due to the default value of the Audio Consumer Variable as seen in this picture image

However I'm not sure how you connect this to the Audio Actor within the Level (if that even is the right approach).

TroubledPrawn commented 2 years ago

UPDATE:

To fix this the Audio Consumer variable needs to be set, I did this by using a set variable to the Level Blueprint, which referenced both the MillicastBP and the Millicast Audio Actor that are placed in the level. This way the connection is made between the variable and the Audio Actor placed in the level

QuentinGarou commented 2 years ago

It would be nice if it doesn't crash when nothing set since that is compiled fine in Blueprints 😄 Also a bunch of other crashes happen when you are not authenticated but there no "easy" way to know this at first so a simple error message in the logs would be much appreciated rather than a crash (because of PeerConnection being nullptr)

I know this plugin is new and I really appreciate all the work you are doing so please don't take those comments badly 😄

dbaldassi commented 2 years ago

Thanks for reporting this. I will add a check if it is null, and log a warning message

dbaldassi commented 2 years ago

Should be fixed in 2b7c7c2