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

Using JavaScript to Play Videos (HTML5 Output)

New Here ,
Jan 15, 2017 Jan 15, 2017

Hi,

I want to use button controls on a slide to manipulate videos on the slide. Rather than use the Action On Success: Show if the button is clicked, I want to use the Action Execute JavaScript. I can do the following in HTML with JavaScript but I can't get it to work in Captivate's Action Execute JavaScript.Script Window:

<button onclick="playVid()" type="button">Play Video</button>

var vid = document.getElementById("Video_1");

function playVid()

{

    vid.play();

}

110
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
no replies

Have something to add?

Join the conversation
Resources
Help resources