Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

load a video into component HTML5

Explorer ,
May 23, 2024 May 23, 2024

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-8152...";

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!

TOPICS
How to
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 25, 2024 May 25, 2024

this.stop();

var videoURL=whatever;

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

Translate
Community Expert ,
May 23, 2024 May 23, 2024

try

 

"./videos/IDLE_SCREEN.mp4";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 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">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 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.

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

copy and paste here a screenshot showing your published files in their folder.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

files_1.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

code_1.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

any errors in the developer console?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

No.

attached info on the output tab

 

This is the way i did is, maybe there is a problem in the process.

1-drag and drop video componen from library to canvas

2-select the component from canvas, from code snippets>html5>components > video > Load a video.  Double click

3-change url to "./videos/IDLE_SCREEN.mp4";
4-test movieo on browser (firefox, safari, chrome)

the result is an image that says (no video with supperted format and MiME type found). 

this happens with the original url address that comes with the snippet, and with the ./videos url.  And also if there is no code at all.

Screen Shot 2024-05-23 at 4.52.07 PM.pngexpand imageScreen Shot 2024-05-23 at 4.52.19 PM.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

It only works if i go to components parameters and add the video in the source section.

 

but i wpuld prefer to have only 1 video component and be able to change what video plays there. 

 

thanks

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

that's not the developer console.  

 

test from animate and then open your browser's developer console.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

Screen Shot 2024-05-23 at 6.10.43 PM.pngexpand image

delevoper tools:

Screen Shot 2024-05-23 at 6.13.29 PM.pngexpand image

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

what's line 116 of your js file?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

when you say js file you mean this one:

Screen Shot 2024-05-23 at 7.16.22 PM.pngexpand image

this is line 116 of that file:
Screen Shot 2024-05-23 at 7.15.16 PM.pngexpand image

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

what's browserplacesviews.js?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

i dont know.  I looked for it but didnt find in the script.

I made a simpler file, just a video component with the load video code:

Screen Shot 2024-05-23 at 8.31.37 PM.pngexpand image

this is the folder:
Screen Shot 2024-05-23 at 8.33.35 PM.pngexpand image

this is in the browser (firefox) from Test in adobe animate , with Browser console:
Screen Shot 2024-05-23 at 8.32.37 PM.pngexpand image

and this is oppening the file (TEST VIDEO.html) from the folder to firefox, with browser console:
Screen Shot 2024-05-23 at 8.38.29 PM.pngexpand image


 

thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

create a new fla with a video component.

test 

check your console and see if it has the same errors 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

OK,

new fla Fila,

I left the URL that comes with the snippet.  doesnt load either.
Screen Shot 2024-05-23 at 9.14.30 PM.pngexpand image
file and published folder:
Screen Shot 2024-05-23 at 9.16.43 PM.pngexpand image
published html in firefox w browser console:
Screen Shot 2024-05-23 at 9.17.27 PM.pngexpand image
similar errors

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

don't add any code

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

no code:
Screen Shot 2024-05-23 at 9.25.00 PM.pngexpand image

published open in firefox:
Screen Shot 2024-05-23 at 9.26.24 PM.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

that looks like you're opening your published html.  are you?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2024 May 23, 2024

YES

 

i do both,  test form animate, and also open published html (which is the way i would have to run this)

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2024 May 23, 2024

don't open locally.

 

only use test in animate. what's that console show?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2024 May 24, 2024

animate > control > test...  in firefox:

Screen Shot 2024-05-24 at 7.51.49 AM.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines