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!
asked Jan 07 '18 at 10:26 AM in Using UE4
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!
Follow this question
Once you sign in you will be able to subscribe for any updates here