In my project i want to play a video in the created screen using url . I have studied about the video texture code and implemeted in my project . But i dont know why video is not working in screen using url. Please suggest me some solution.
here is the editor code PlayCanvas 3D HTML5 Game Engine
How do you reproduce the issue? Eg what scene do I load? How do I get to the issue in the app? Which source files and entities should people be looking at?
i have used this code given Video Textures | Learn PlayCanvas
followed the same steps but i dont know why the video is not working .
i want to play any youtube or vimeo video in it
while opening the project there is an environment tab . Inside it there will be screenvideo. The screen video in the main screen in which i want to play the video and in the root tab i have used the video texture script as shown in the tutorial
So to check, the scene that this is in is ‘environmentarea’ and the entity to check/investigate is ‘Screenvideo’?
When you launch the project, you can see the error here:
This means that it wasn’t able to play the video hence why you are aren’t seeing being rendered
Browsers won’t let you auto play video with sound, you either have to wait for a user to click and in that event, play the video with sound or start the video muted to autoplay and change volume on a user interaction.
This is why in the tutorial you linked to has these lines:
// muted attribute is required for videos to autoplay
video.muted = true;
so you are saying if i click the screen ,the video will play ?
No, I’m saying that either it has to start muted or you have to listen to an input event and play the video as part of the callback of the input event
thank you so much solved the issue .