Playing a video in the background

Is it possible to play a video in the background so that the UI elements are above the video?
I use Cocos Creator v.3.8.1.

1 Like

https://docs.cocos.com/creator/manual/en/ui-system/components/editor/videoplayer.html#how-to-display-a-ui-upon-a-video
The documentation provides a comprehensive guide on how to execute video playback in the UI.

1 Like

I followed this instruction earlier, but it didn’t help. I also tried running the example provided in this manual, but even that example doesn’t work. :thinking:

I’m using Cocos Creator v3.8.1.

I have tried, It works.It has 2 steps, Maybe you missed one. Or browser problem?

1 Like

I found the cause of my problem. :neutral_face:
This problem occurred due to my carelessness. :smiling_face_with_tear:
The video I wanted to use had no sound. But then I tried to use the default video from the internal assets, which had sound. When I run the game in the Cocos Creator, the sound played, but there was no video (I know this is normal, because according to point one in the notes - “1. This feature is only supported on Web.”: Cocos Creator 3.8 Manual - VideoPlayer Component Reference). But the sound in the browser was not played. I opened DevTools in the browser and found the following errors in the console:
Error 1: Can not find class ‘cc.VideoClip’
Error 2: Sorry, the component of ‘VideoPlayer’ which with an index of 1 is corrupted! It has been removed.
It turned out that I had this pack disabled :expressionless::sweat_smile: :neutral_face::


I’ll leave this here just in case someone has a similar situation. :sweat_smile::sweat_smile::sweat_smile: