Timed autoplay for video

schapman1885
schapman1885 Community Member Posts: 53
Is it possible to autoplay a video after a length of time?

Problem: I have several short mp4 videos in a training course. I am publishing with seamless play, but, b/w slides, it seems like there is a flash while the video is loading. My teammate requested that I try to enter the slide and show an static image, then use a delay to hide the image and then start the video. I cannot get it to run (works on preview, doesn't if I run the page myself.)  I played around with some of the js I found last night on the forum, but couldn't get it to work.

Comments

  • timk
    timk Community Member Posts: 1,176 ☆ Superstar ☆
    Just put the image over the video and add two actions to it:

    On: Show
    Action: Hide
    Target: This object
    Enter a time into the "Delay" field

    On: Hide
    Action: Play
    Target: Your video

    Uncheck "Autoplay" for the video.

    Tim
  • schapman1885
    schapman1885 Community Member Posts: 53
    Ok, I tried that last night, and it wouldn't trigger the play for the videos. What I did was...

    Video: unchecked autoplay, hidden

    Image: shown, always on top.

    On show:

    1.5 secs, hide image and show video

    1.6 secs play video.

    It works in preview, does not work if I run from html.
  • schapman1885
    schapman1885 Community Member Posts: 53
    Oh, I just reread your suggestions... let me try it that way.
  • schapman1885
    schapman1885 Community Member Posts: 53
    Still doesn't want to work when playing from html. Is it me?

     
  • schapman1885
    schapman1885 Community Member Posts: 53
    What I really want to have happen is I want to eliminate the flash of white that we see when going from one page to another while the video is loading. I've got Publish for seamless play turned on...but, what we are seeing isn't acceptable to the client. I need a way to "mask" it. Any ideas.
  • schapman1885
    schapman1885 Community Member Posts: 53
    I can even get a page to do an action like this

    On show: play video if condition is met.   (condition is met).

     
  • timk
    timk Community Member Posts: 1,176 ☆ Superstar ☆
    I tested several ways successfully to place an image over the video, hide the image and play the video. The only thing that didn't work was showing the video in IE. The video should be initially visible behind the image.

    You could add an event to the video at 000:00.10 to hide the image. This way the video can auto play, and the image will be hidden once the player is ready and the video is playing.
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    One other option is... if your video has enough extra frames ( 1 sec or so  ) at the start. Hide the video alltogether..on load start playing and fade in over a second...that way... no flash..works fine.

    If you can share a sample of a course with the video ( Dropbox or Wetransfer link ) we can fix it for you..so you can reuse it.

    Kind regards,

    Math
  • schapman1885
    schapman1885 Community Member Posts: 53
    Thanks, Math. Let me get one set up... I am particularly having issues on Chrome. In addition to the video problem, I am having a couple of objects randomly not appear... not sure what the problem really is.
  • schapman1885
    schapman1885 Community Member Posts: 53
    It works in Firefox and in IE... it doesn't work in chrome. Would like to figure out what the Chrome issue is. The Go button doesn't do anything...it was just one of the ones that keeps randomly disappearing... in Chrome. sigh.

    https://www.dropbox.com/s/l1r78vuvd6bbgay/Lectora.zip?dl=0

     
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Hi,

    Checked your .awt and as is indeed it didnot work. Fixed some things and now this one works as needed.
    I am not 100% sure whether this is all you need/want...but if i missed something let me know and will add it if needed.

    When running the index.html from the TestHTML folder now for me it works fine in IE, FF and Chrome.

    Kind regards,

    Math

    PS. the Go-button didnot do anything because there was no action on it ;-)
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    After uploading the previous post and rereading this thread i noticed my previous solution wasn't quite correct.
    So i changed some things..tested it, noticed indeed that straight from your computer Chrome doesnot play it as wanted... thats a Chrome security issue.... when uploading it to a server it works as planned...check here..
    https://www.mathnotermans.nl/LectoraVideo/
    Something to remember thus..Chrome has some build-in security measures that tend to block certain things when playing locally from your computer. If testing something and it works in all other browsers but not in Chrome..upload it to a server and test again... 99% of cases its Chromes internally security.

    So this version should fix all for you.
    Kind regards,
    Math
  • schapman1885
    schapman1885 Community Member Posts: 53
    Math, thank you for the help! I am seeing that it is the distribution of the actions that seems to work best. I actually set this up on my own... but because of the Chrome issue, I think I thought it didn't work. (2 weeks ago, Chrome worked fine with all of my software... new update...and nothing does.)

    I think I need to switch back to firefox... I'm also having issues with Captivate. Hating Chrome this week!
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!