Forum Moderators: open

Message Too Old, No Replies

video first then load page html5

video playing into webpage

         

peten

8:18 pm on Sep 6, 2014 (gmt 0)

10+ Year Member



Hi folks

Another little charmer i have looked but cant stumble on the answer .

I need to have a web page run a video first then load the main page on completion . can anyone help


Thanks Pete.

birdbrain

11:12 pm on Sep 6, 2014 (gmt 0)



Hi there peten,
try it like this...


<script>
(function() {
'use strict';

function init(){
var v=document.getElementsByTagName('video')[0];
v.addEventListener('ended',function(){
window.location='http://www.example.com';
});
}
window.addEventListener?
window.addEventListener('load',init,false):
window.attachEvent('onload',init);
})();
</script>



birdbrain

tbear

8:55 am on Sep 7, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm sorry to say, I walk when I land on a site that does that.
Like the official F1 page...... so annoying. :(

birdbrain

9:33 am on Sep 7, 2014 (gmt 0)



Hi there tbear,
our friend Pete asked for a solution to his specific problem. ;)

What makes you think that he would be the slightest bit
interested in your personal walking inclinations?


birdbrain

tbear

10:02 am on Sep 7, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Absolutely nothing at all........... ;D

not2easy

2:39 pm on Sep 7, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Interesting, that was my first reaction when I read it. But from other questions, I believe this is for a specific group of users and Pete is giving them just what they want. For passersby, it may seem an unusual request. I'm happy birdbrain knew just what was needed and stopped in to help.

tbear

3:02 pm on Sep 7, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Best keep it in the family, then........

peten

7:52 pm on Sep 7, 2014 (gmt 0)

10+ Year Member



Hi Birdbrain

Thanks will give that a whirl .

It is a website for a motor club with an article on a one of only 4 made car with a video giving a short story of it's total rebuild to original ford spec then an information page with links to a large up and coming car show where both the vehicle and my club will be with said car on our stand .

So yes bit of a limited group of users i suppose althou the hits say otherwise truely global in nature ..



Pete .