If you mean there's a play bar with controls, and if the person doesn't want that, he can do:
http://www.youtube.com/v/ROVy9PC8_8A...fxfBlnY&loop=1
(controls=0 in the url).
Arie.
If you mean there's a play bar with controls, and if the person doesn't want that, he can do:
http://www.youtube.com/v/ROVy9PC8_8A...fxfBlnY&loop=1
(controls=0 in the url).
Arie.
It would be more efficient to do it offline, as I'm guessing ukstormer doesn't want to use up bandwidth getting the video.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
Hi Guys,
Firstly, Bernie, yes the code simple plays both videos and then stops which is where I was originally.
Hi Molendijk, the videos are to be played locally on a screen with no connection to the internet (videos will be updated via the intranet).
Still looking for a solution.
Ukstormer
sorry ukstormer, it appears i've been barking up the wrong tree. try this:
Code:<!DOCTYPE html> <html> <head> <title>MultipleVideo</title> <script type="text/javascript"> var myVideo = _V_("my_video_1"); function onComplete(){ var = document.getElementsByTagName('video')[0]; // get my <video> tag var videoPlaying = myVideo1.currentSrc; //file being played myVideo1.src ='video/test20.mp4'; // set up the new src (reels) myVideo.load(); // load the new video myVideo.play(); // play the new video myVideo.removeEvent("ended", onComplete); // remove the listener } myVideo.addEvent("ended", onComplete);//listenerhandler function loop(){ if(var videoplaying == 'video/test20.mp3'){ var = document.getElementsByTagName('video')[0]; // get my <video> tag var videoPlaying = myVideo1.currentSrc; //file being played myVideo1.src ='video/test10.mp4'; // set up the new src (reels) myVideo.load(); // load the new video myVideo.play(); // play the new video myVideo.removeEvent("ended", loop); // remove the listener } } myVideo.addEvent("ended", loop);//listenerhandler </script> </head> <body> <video id="my_video_1"autoplay preload="auto"width="640"height="480" src data-setup="{}"> <source id="mp4Vid" src="video/test10.mp4" type='video/mp4'> </video> <script src="js/videoHandlers.js"></script> </body> </html>
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
Hi Bernie,
The new code just plays the first video and then stops . . . .
Arie
Many thanks but that software is Windows based, I am using Linux and a Chrome window in full screen mode.
Ok final try:
Code:<!DOCTYPE html> <html> <head> <title>MultipleVideo</title> <script type="text/javascript"> var myVideo = _V_("my_video_1"); function onComplete(){ var = document.getElementsByTagName('video')[0]; // get my <video> tag if(myVideo1.currentSrc == "video/test10.mp4"){ var nextVideo = 'video/test20.mp4'; } else { var nextVideo = 'video/test20.mp4'; } var videoPlaying = myVideo1.currentSrc; //file being played myVideo1.src = nextVideo; // set up the new src (reels) myVideo.load(); // load the new video myVideo.play(); // play the new video } myVideo.addEvent("ended", onComplete);//listenerhandler </script> </head> <body> <video id="my_video_1"autoplay preload="auto"width="640"height="480" src data-setup="{}"> <source id="mp4Vid" src="video/test10.mp4" type='video/mp4'> </video> <script src="js/videoHandlers.js"></script> </body> </html>
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
No, afraid not, same thing as before, as it stands will not work, remove the 'src' text after the height deceleration and then first video plays and stops at the end.
Still looking for a script to play several MP4 files back to back, saw something regards using 'video.onended' but not too sure how to implement it correctly, any help much appreciated.
Yo, sup ukstormer, my blog is a bit buggy and I am not replying there, fortunately I found your post here when you mentioned my name. crazy hun?
So, to keep it playing is simple, create an array with all the videos you want then call it sequentially.
I didn't test it, but it should play. Let me know ninja, my email is marcelo.duende@gmail.com. PeaceCode:var arrVideos = ["vid01.mp4","vid02.mp4","vid03.mp4"]; var myIndex = 0; var myVideo = _V_("my_video_1"); function onComplete(){ var myVideo1 = document.getElementsByTagName('video')[0]; // get my <video> tag var videoPlaying = myVideo1.currentSrc; // get the file being played myVideo1.src = arrVideos[myIndex]; // set up the new src (reels) if(myIndex == arrVideos.length-1){ myIndex = 0; } myIndex++; myVideo.load(); // load the new video myVideo.play(); // play the new video myVideo.addEvent("ended", onComplete); // listener handler };
Bookmarks