How to get "Media Sound Component " while inside Widget?

Media sound component can be found if the said media player variable was in the “Level blueprint” however, Im trying to get Audio to play inside of a widget blueprint. In the Widget system I cant get the audio component to let the media play both Video/Sound.

Any workaround for this? It’s very urgent as it’s college project related.
Would highly appreciate the help!

Hello,
I went through this issue in the last couple projects I worked on and basically the Media Source Component is a “Component” so there are a few solutions as for it to work we only need to initialize it and link it to the MediaPlayer.

1- You can add it either to your Player Controller or Player BP (Character or Pawn) as a Component (like you would a Static mesh, etc) and select your MediaPlayer in the Component’s default values.

2- The first solution is better but another way is to use the AddMediaComponent function, and you can call it anywhere that is before you play your video, somewhere where it’ll only be called once though, you don’t want multiple components. You call the function, you set the MediaPlayer and you’re good to go.

The first solution is the most optimal in the end, I think.
Have a nice day mate, I hope this was helpful to you!

Hello, I just did exactly the same solution you provided prior to your answer by a few mins hahaha!
It was a fluke, I added the sound component to a static mesh box and I worked it out!

Thanks a lot for your input though, I hope people with similar issues find these answers useful!
bro fist

and how make it Unpauseable?