Solved

Html5 video intro and show site

Posted on 2014-03-24
5
1,061 Views
Last Modified: 2014-05-24
how do you put an html5 video has an intro nd then show the site (same as flash intro) ? You do a simple JS redirect ? or  there is other tricks ?
And how to do make the animation start automaticaly without the controls buttons (back & fortword...).
0
Comment
Question by:ymazal_ca
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39950168
You would use javascript and detect when the movie is done.  

You can use videojs http://www.videojs.com/  and there is an api for the video being complete https://github.com/videojs/video.js/blob/stable/docs/api/vjs.Player.md#ended-event

However, "flash" intro's are rare for a reason.  Viewers really don't want to sit through an intro.  Just take them to your home page and offer your video there.  I know site owners keep wanting to add these things, but site viewers don't want to wait.
0
 

Author Comment

by:ymazal_ca
ID: 39950218
Can't you put some how a "skip inro" on the video thrue JavaScript ? This way you could skip the intr if you don't feel like seeing it...

The problem it an html5 movie, not flash...
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39950264
You can play a video intro just as you would flash.  Videojs is just one player and if you go to docs > player api doc https://github.com/videojs/video.js/blob/stable/docs/api/vjs.Player.md you can see all the events you can have access to.  

One of those events is the ended event.  They have sample code but you can add whatever you want.  
vjs.Player.prototype.onEnded = function(){
  if (this.options_['loop']) {
    this.currentTime(0);
    this.play();
  }
};

Open in new window


What you might try is adding a modal to the  home page and when the page loads, show the modal which will contain the video.  All they have to do is click outside the modal to get to the home page and you can have an ended event that closes the modal.  I would add a cookie that they have already visited the home page and not show the intro again to the same person though.    

If you think it is of interest to see a 2nd or 3rd time, you can have a link that will display the modal/video.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Google Sheets Script 21 53
stop navigation from wrapping 7 52
Download a website to hdd 2 49
Regular Expression 1-100 with two digits 15 21
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now