Skip to main content
Known Participant
May 23, 2024
Answered

load a video into component HTML5

  • May 23, 2024
  • 3 replies
  • 2469 views

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 has been closed for replies.
Correct answer kglad

im not sure how to do that.

 

assign url on second frame.

 

do i need a different code?


this.stop();

var videoURL=whatever;

$("#yourvideocomponentname")[0].src=videoURL;

3 replies

kglad
Braniac
May 23, 2024

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">
oro1985Author
Known Participant
May 23, 2024

Hi Kglad, thanks,  i did realize i posted in the wrong lace.  Thanks for moving it.

 

I tryed using:
"./videos/IDLE_SCREEN.mp4";

 

but still doesent work.

 

 

kglad
Braniac
May 24, 2024

movieclip_1 is the video component.   


zip the folder that contains your fla and other files

upload it to a file server 

post a link to the zip here

John T Smith
Braniac
May 23, 2024

You posted in Using the Community (which is about the forums) so what does this have to do with Adobe?

 

What Adobe program are you using?

Provide the Adobe program name and a Moderator will move this message to that forum

kglad
Braniac
May 23, 2024

try

 

"./videos/IDLE_SCREEN.mp4";