Skip to main content
Known Participant
May 23, 2024 4:39 PM UTC
Question

load a video into component html5

Hi, im creating an interactive where i need to play different videos.

 

Im trying to load a video into component using the Load a video code:

 

/* Load a Video
Change the URL below.
*/
var videoURL = "https://images-tv.adobe.com/avp/vr/15a99ccf-0e7c-4601-b270-87dd82624086/5078a43c-81f9-4a93-836c-815278b83a8e/e9cf12a0-7c4b-414f-a5c9-97ef49340aa9_20160203035417.960x540at1200_h264.mp4";

this.video_player_1.on("added", function() {
$("#video_player_1")[0].src=videoURL;
}, this, true);

 

I understand i need to change the url address to where my videos are.  I have them in a folder where i store the videos inside the folder where my html page is. 

var videoURL = "videos/IDLE_SCREEN.mp4";

this.video_player_1.on("added", function() {
$("#video_player_1")[0].src=videoURL;
}, this, true);

 

But the component doesent load the video.  Not sure if this is the corrct way to do this.

 

any help would be appreciated.

 

thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

kglad
Community Expert
Community Expert
Jun 23, 2024 11:58 AM UTC

try:

 

var videoURL = "./videos/IDLE_SCREEN.mp4";

Translate