Jump to content
AAndr3

3 videos a dar seguidos

Recommended Posts

AAndr3

boas tardes. queria saber como por 3 videos a dar sequencialmente sempre a repetir. 

obg

Share this post


Link to post
Share on other sites
Zex

Alguns browsers podem bloquear os videos (verifique as opções de segurança).
Funciona no computador local.

<HTML>

<HEAD>
	<TITLE> Videos em sequência </TITLE>
</HEAD>



<SCRIPT>

//---------------------------------------------------------------------

function $id (id) 
{ 
var res = document.getElementById(id);
if (res==null) 
  alert("$id: id not found: "+id);
return( res ); 
}
  
//---------------------------------------------------------------------
//---------------------------------------------------------------------

function watch_video3 () 
  {  
  if ( V3.ended )
    {
    V1.play()
    watch_video1()
    }
  else
    setTimeout( "watch_video3()", 1000 )
  } 

//---------------------------------------------------------------------

function watch_video2 () 
  {  
  if ( V2.ended )
    {
    V3.play()
    watch_video3()
    }
  else
    setTimeout( "watch_video2()", 1000 )
  } 

//---------------------------------------------------------------------

function watch_video1 () 
  {  
  if ( V1.ended )
    {
    V2.play()
    watch_video2()
    }
  else
    setTimeout( "watch_video1()", 1000 )
  } 

//---------------------------------------------------------------------

var V1
var V2
var V3

function run () 
  { 
  V1 = $id('video1')
  V2 = $id('video2')
  V3 = $id('video3')

  V1.play()

  watch_video1() 
  } // run

//---------------------------------------------------------------------

</SCRIPT>



<BODY onload="setTimeout('run()',1000)" > 


<CENTER>

<video id=video1 width="320" height="200">
  <source src="video_seq1.mp4" >
</video>

<video id=video2 width="320" height="200">
  <source src="video_seq2.mp4" type="video/mp4" >
</video>

<video id=video3 width="320" height="200">
  <source src="video_seq3.mp4" type="video/mp4">
</video>

</CENTER>

</BODY>

</HTML>

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.