Copy link to clipboard
Copied
I want to prompt interactivity when video file is finished. As it is, the video just stays on the last frame and users don't know it's finished or could be just buffering or paused. Video length in seconds is not a reliable method because of differences in platforms. Can't Captivate pick up end of video as an event I can use to trigger an action?
Copy link to clipboard
Copied
Not at the moment no. End of a video is not a usable event to trigger actions.
Copy link to clipboard
Copied
This was brought up over 2 years ago and Adobe still hasn't implemented what should be a STANDARD feature of a built in event listener for the end of the video. How can they think this wouldn't be useful?
Copy link to clipboard
Copied
Did you log a feature request?
Copy link to clipboard
Copied
Adobe is still using an ancient SWF flv video player, so are you really surprised?
Copy link to clipboard
Copied
Only for SWF output, not for HTML5 output, where video is MP4.
Copy link to clipboard
Copied
We have abandoned video using the options in Captivate, and using YouTube as a delivery platform also.
Our approach is to create HTML5 pages and inserting into Captivate as HTML5 animations. Video then uses the native browser playbar with fullscreen functionality and closed-captioning using vtt or injecting the CC into CP's closed captioning format.
You can then use the video events built into the browser and control your CP course.
Copy link to clipboard
Copied
This sounds interesting. Can you share an example or sample slide so I can
see the detail for how you implemented this?
Thanks so much,
Jeff
On Sat, Feb 6, 2016 at 2:42 AM, TLCMediaDesign <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Here is a simple implementation. Save this html file as the exact same name as your video (mp4), do not use spaces in either name. Zip them both together and insert as an HTML5 Animation. This is set up for 480p (854 x 480). Resize the animation in Captivate to the video size and turn off scrolling.
For example:
myVideo.html
myVideo.mp4
The line: wp.cp.show("Text_Caption_1"); designates what should happen when the video is done. In this case it shows Text_Caption_1. Showing will only work for HTML5. You could alert something also.
<!doctype html>
<html>
<head>
<meta charset= "utf-8">
<title>Video</title>
<script>
var wp = window.parent;
function loadVideo()
{
var url = decodeURIComponent( window.location.pathname );
var filename = url.substring( url.lastIndexOf( '/' ) + 1 );
var n = filename.lastIndexOf( '.' );
var vid = filename.substr( 0, n ) + '.mp4';
var setSrc = document.getElementById( "myVideo" ).src = vid;
myVid = document.getElementById( 'myVideo' );
myVid.addEventListener( 'ended', videoEnd, false);
}
function videoEnd( e )
{
wp.cp.show("Your text caption prompt");
myVid.removeEventListener( 'ended', videoEnd, false );
}
function clearAll()
{
myVid.removeEventListener( 'ended', videoEnd, false );
wp = null, myVid = null;
}
</script>
</head>
<body style="margin:0 0 0 0" onload="loadVideo();" onUnload="clearAll();">
<video id="myVideo" src="" controls autoplay preload="none" width="854" height="480"></video>
</body>
</html>
Copy link to clipboard
Copied
Thanks so much, this could be a better way to present the kind of video
content I have in my current project (26 very short videos on task based
topics.) I'm too far along on this current project to make this kind of
switch but I can use it next time. Where/how would I pick up the end of
video information (I'm not real technical so it's not obvious when I look
at the HTML?) Thanks again, Jeff
On Sat, Feb 6, 2016 at 10:30 AM, TLCMediaDesign <forums_noreply@adobe.com>
Copy link to clipboard
Copied
The video end event is captured throught this event listener:
myVid.addEventListener( 'ended', videoEnd, false);
Which then calls this function:
function videoEnd( e )
{
wp.cp.show("Your text caption prompt");
myVid.removeEventListener( 'ended', videoEnd, false );
}
Copy link to clipboard
Copied
Thank you very much for this code.
I can't get my object to appear after the video has ended. The videoEnd function is getting called as I added an alert to test it, but no matter what I do I can't get my object to appear. I just want a simple button to appear after the video has ended.
Does this not work with the current version of Captivate?
UPDATE:
Nevermind, I got it to work now. I'm fairly new to Captivate and I'm still getting used to using the timeline. My object in the timeline didn't stretch as far as the HTML5 animation so that's why it wasn't appearing.
Once again, thanx for the code!!
Copy link to clipboard
Copied
Mastering Timeline should be your first priority when starting with Captivate. Here is a link to one of my multiple posts about the Timeline, the most visited on: