I get an error that says "array of media player references is not compatible with media player reference" when trying to link a media player event to an open playlist index event in the event graph. How do I fix this?

Hi, I get an error that says “array of media player references is not compatible with media player reference” when trying to link a media player event to an open playlist index event in the event graph. How do I fix this?

I am using a Mac and the types of files I am trying to use are mp4 and mp3. I am trying to play a video (that mp4 file with the audio) on a small tv. This is the only problem I’ve had so far. Compile is checked and I have no idea how to fix this. Let me know if any more info would be useful in answering this question. Thanks!

I am also planning on making this into a VR environment later on. Is there anything I should be aware of now while working on this video playing on an object?

Can you show your Blueprint? Sounds like you’re trying to use the OpenPlaylistIndex function with an array of players, but the function expects a single player. Select the desired player with an index into that array.

Yes, I think this is what you need. Thanks for responding!

You might need this as well…

The type of your “MediaPlayer” blueprint variable is “array of MediaPlayer”. Please change it to just “MediaPlayer”, i.e. don’t make it an array. Then it will work.

If you intended to use an array of MediaPlayer then you need to extract the actual MediaPlayer element to use from the array via its index. You can find more details on the Blueprint Arrays documentation web site.

Thank you so much! I didn’t want an array. I am now having another related problem, ehowever. I am trying to set a default value to my sound array (which I do want to be an array) and it won’t recognize my sound file which is in the playlist. If it helps, this is what I’m trying to do: How to display a VIDEO in UNREAL ENGINE 4 (Updated) - YouTube

I suggest you start a separate AnswerHub thread for that and also post a picture of your Blueprint.

Please note that an array is a collection of multiple values, so a ‘default value’ might not make sense. Perhaps you’re trying to fill the array with a single entry on startup.