Skip to main content
Lee Millard
Known Participant
January 18, 2018
Question

Multi-State Web Object is Playing All Video States at Once

  • January 18, 2018
  • 2 replies
  • 577 views

The Setup

I'm using Adobe Captivate 2017. I have a video being loaded via a URL through a Web Object on a page. I have multiple states of this video, all pointing to different URLs (which are different language versions). Based on the user's language selection, it will load the proper state of the video.

The Problem

When I have Auto Load un-checked, everything works fine as it should. When I have Auto Load checked (preferred), ALL states are playing (selected state visible, but all the others playing audio in the background).

Help?

Has anyone experienced the same? I'm trying to figure out if it's a Captivate glitch or if it's based on the URL I'm pulling the video from. Second, if anyone has experienced this, how can I get this to work as expected (only playing video/audio of selected web object state).

Thank you!

This topic has been closed for replies.

2 replies

Lee Millard
Known Participant
January 30, 2018

Sorry, I thought I followed up, but didn't. I tried your method Jeremy and it didn't work for me either. Because of time constraints I abandoned trying to make it work and just made 11 slides with 11 different URL's auto-loading in them through Web Objects. Then, based on a language selection variable I made, depending on what language was selected, it would skip to that particular video slide. Not as slick as I would like but it worked. Because I added 10 slides on to my total slide count too, I had to rework my progress meter as well.

If anyone has any more ideas I would love to try them out! Thanks!

Jeremy Shimmerman
Participating Frequently
January 18, 2018

I think if you use different object states with a web object, things might get a bit buggy.  Instead I suggest using javascript to change the source of the loaded web object. 

Attach this to one of your language buttons - (obviously putting in the new url) 

document.getElementsByTagName("iframe")[0].src="www.anotherWebsite.com"

Lee Millard
Known Participant
January 18, 2018

Thanks for the quick response @JeremyS_77 ! I'm fairly new to Captivate (coming over from years of Articulate experience). So, we have our language selection screen on the first slide and the multi-state video/web object on slide 5. Would I put this JS code in on slide 5 on the slide enter action as a conditional statement (plays x based on X language selected)? Or would I add this to the actions in the language button like you said, somehow loading it on slide 5?

Appreciate your help and bearing with any newb questions.

Jeremy Shimmerman
Participating Frequently
January 19, 2018

If the language selection buttons are on another slide this is one way you could handle this.

Create a variable called 'lang'.  Its under Project -> Variables. 

Then, for each language button execute javascript.

lang=www.languageselectedURL.com

Then, on slide 5 - the one with your web object - execute java script on slide enter. Put in the following script:

document.getElementsByTagName("iframe")[0].src=lang

This will load the url that you selected from your language buttons into your web object.  Let me know if this works for you. I can take a look tomorrow if you have any questions.