SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
1
HOW TO MAKE WEB PAGE
WITH VIDEOS PLAYING CONTINUOUSLY
We can use function getDuration() in "swfobject.js" with data retrieved from the Google "gdata.feeds"
webs. But the fact that pause between videos is shorter or longer in one or two seconds is not important.
Because of it, I take the easiest way, using the familiar function setTimeout("..",1000) to control the
change of videos.
You can try this web page at address:
https://files.myopera.com/phanhung20/files/nonstop-simple3.html
and download RAR file (three files: nonstop-simple3.html, myList1.js, playing-videos.pdf) from:
http://www.mediafire.com/download/903gf057br6jzo7/nonstop-videos.rar
Pic. 1- The web page nonstop-simple3.html
The main html file “nonstop-simple3.html” stores information of only six videos. Other 66 video’s
information is saved in a javascript file “myList1.js”. You can easily add more videos by typing for each
new video three elements:
1- Title of video:
You must avoid to write any double quotation marks inside a pair of beginning and ending ones and
need to rewrite those marks “ to ”. For example:
This line: t("Evita "Don't Cry For Me Argentina", Francis Goya") ; will halt the web at once.
2
The right script is: t("Evita "Don't Cry For Me Argentina", Francis Goya") ;
2- Id (Identifier) of video: v(“TrwKuoF-WOo“);
Pic. 2 – Id (11 characters-numbers) is at the end of address of the web (click in it to see full content)
3- duration - the time elapse of the video: d(265);
I have retrieved 265 seconds from gdata web. But in youtube web we see 4:24 (264 seconds).
Pic. 3 – duration (4:24) and title ((HD 720p) “Don’t Cry …) shown in youtube.com page
Title can be freely changed, but Id and duration must be exact as you see them in youtube.com web
page.
There is an extract from “myList1.js”:
t("Mal... CHRISTOPHE... oneiraki") ;
v("dueE06-rzbk");d(216);
t("Helmut Lotti - "Those Were The Days"") ;
v("tX2sVv3yYgE");d(233);
t("Sen Masao _ Kitagunino Haru") ;
v("0kHyeZDDwl4");d(163);
Two file “nonstop-simple3.html” (4.7 KB) and “myList1.js” (4.6 KB), can be downloaded to your PC, using
the links and they must be placed in the same folder:
https://files.myopera.com/phanhung20/files/nonstop-simple3.html
https://files.myopera.com/phanhung20/files/myList1.js
The whole source codes of those files are shown here.
3
nonstop-simple3.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Continously Playing</title>
<head>
<style>
body{
background-color:#999;
font-family:Arial;
font-size:12px;
}
a {
text-decoration:none;
color:blue;
}
a:hover {
text-decoration:underline;
color: #0099ff;
}
#list1{
width: 640px; /*850px*/
height: 130px;
margin:0px;
padding:0px;
border:1px solid #666;
text-align:left;
overflow:auto;
background-color:#ddd;
line-height:150%;
}
</style>
<script>
function play(i){
c = 0;
window.scrollTo(0,0);
obj = document.getElementById("vidTitle");
4
last = last = vid.length - 1;
obj.innerHTML = '['+ j + ' / total:'+ last +']&nbsp;&nbsp;<b>'+tit[i]+
'</b>';
obj = document.getElementById("player1");
stID = "http://www.youtube.com/embed/" + vid[i] + "?autoplay=1";
obj.setAttribute("src",stID);
}
var c = 0; var j = 0;
function count(){
last = vid.length - 1;
c = c + 1;
obj = document.getElementById("showSeconds");
obj.value = c + " / dur:" + dur[j];
if(c>dur[j]){
if(j<=last){j=j+1; play(j)}
if (j>last){j=1;play(j)}
}
mytimer = setTimeout("count()",1000);
}
function backVideo(){
len = vid.length -1;
if(j>=2){j=j-1;play(j);}
if (j==1){play(j);alert("Begin Of List");}
}
function nextVideo(){
last = vid.length -1;
if(j<=last){j=j+1;play(j);}
if (j>last){j=1;play(j);}
}
function endVid(){
clearTimeout(mytimer);
st = "http://www.youtube.com/embed/ntGJ2vkLbIo?autoplay=0";
obj = document.getElementById("player1");
obj.setAttribute("src",st);
obj = document.getElementById("vidTitle");
obj.innerHTML = '';
c = 0; j = 0;
}
function sec(m,s){
return m*60 + s;
}
function t(ti){
tit.push(ti);
}
function v(vi){
vid.push(vi);
}
5
function d(du){
dur.push(du);
}
function quit(){
if(mytimer){
clearTimeout(mytimer);
}
}
//Creating three arrays
tit = []; vid = []; dur = [];
k=0;
tit[k]="" ;vid[k]="" ;dur[k]=0;
t("Richard Abel - Spanish Eyes") ;
v("ntGJ2vkLbIo");d(183);
t("CUANDO SALI DE CUBA- SUSANA PEÑA");
v("9CLAAJYRo-I");d(95);
t("FRANCK POURCELL - BESAME MUCHO");
v("RK208ZT82Is");d(sec(3,12));
// In the youtube.com page "franck pourcel besame mucho"
// you see: duration of the video is 3:12. Function sec(..) will return 192 seconds.
t("Evita "Don't Cry For Me Argentina", Francis Goya") ;
v("TrwKuoF-WOo");d(265);
//
t("NO MATTER WHAT _ Francis Goya & RICHARD CLAYDERMAN") ;
v("NPer39-JSr0");d(214);
t("The old rowan tree") ;
v("wmt16uvPDqg");d(161);
function init(){
ss = '';
len = vid.length;
for (i=1;i<len;i++){
xx = '<li><a href="#" onclick="j =' + i +'; play('
+ i+');">'+ tit[i]+ '</a><br>'; // them j = i;
ss = ss + xx;
}
obj = document.getElementById('list1');
obj.innerHTML = '<ol><br>' + ss + '</ol>';
}
</script>
<script type="text/javascript" src="myList1.js"></script>
6
</head>
<body onload="init()" onload="quit()">
<div align="center">
<iframe id="player1" width="835" height="480"
src="http://www.youtube.com/embed/ntGJ2vkLbIo?autoplay=0" frameborder="0" allowfullscreen
></iframe>
<br>
You are watching:
<br><span id="vidTitle"></span>
<br>
<input type="button" value="Play All" onclick="count()">&nbsp;
<input type="button" value="End" onclick="endVid()">&nbsp;
<input type="text" id="showSeconds" value="0/dur" size=28 style="text-align:center">&nbsp;
<input type="button" value="Back" onclick = "backVideo();">&nbsp;
<input type="button" value="Next" onclick="nextVideo()">
<br>
<br>
<div id="list1">
</div>
<br>
<iframe src="http://www.slideshare.net/slideshow/embed_code/21827746" width="835" height="560"
frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-
width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
<div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/phanhung20/nonstop-vid"
title="Nonstop vid" target="_blank">Nonstop vid</a> </strong> from <strong><a
href="http://www.slideshare.net/phanhung20" target="_blank">phanhung20</a></strong> </div>
<br>
</div>
</body>
</html>
myList1.js
t("Che Sara, Rocco Granata") ;
v("mdlE_FTym7I");d(224);
t("Je T'aime Mon Amour ~ Claudia Jung & Richard Clayd") ;
v("ZNFxeAOZRY0");d(236);
t("Madonna - 26 Years of La Isla Bonita") ;
v("dhPkFXGlfds");d(261);
t("Besame mucho - saxo soprano") ;
v("AHZUf3tfZE8");d(237);
t("Humayun's Tomb") ; //documentary
7
v("uuWAMfejnLI");d(265);
t("Smokie - Needles And Pins") ;
v("pa648JF3SoU");d(159);
t("Feelings... - Romantic Violin") ;
v("owBLIJBLbJo");d(230);
t("Michael Learns to Rock - That's Why (You Go Away) Live") ;
v("HaBIQ7TRYbs");d(258);
t("Richard clayderman Dancing Queen") ;
v("xSv5XhAZQHA");d(231);
t("Richard Clayderman - ABBA - Fernando.mp4") ;
v("Kidut_LpYS0");d(267);
t("Green Green Grass Of Home - Tom Jones & Englebert Humperdink ( with lyrics )") ;
v("t5CdDpe87eM");d(186);
t("TOM JONES - PLEASE RELEASE ME (LIVE)") ;
v("AY3JJnL4Fz4");d(148);
t("Richard Clayderman & Francis Goya - My Heart Will Go On") ;
v("3EC-xqcSGfg");d(285);
t("VIDEO--AMORE--AMOR .--FRANCIS GOYA") ;
v("B2XYGgoYu5U");d(205);
t("GOODBYE MY LOVE GOODBYE--FRANCIS GOYA") ;
v("-gnTgDeo-x8");d(172);
t("The Moon Represents My Heart") ;
v("Y-4q0ylUS6k");d(217);
t("O sole mio - Graziano") ;
v("qA4PjcqOXQo");d(197);
t("FRANCIS GOYA - WHEN YOU TELL ME THAT YOU LOVE ME") ;
v("y5omkOu12S4");d(246);
t("SOMEWHERE MY LOVE - Billy Vaughn") ;
v("X5caDaz-_Ko");d(120);
t("Sigrid & Marina - Santa Lucia 2010") ;
v("uNDg3yObq4E");d(183);
8
t("HAWAII - Aloha Oe") ;
v("-fOQmQCtBbM");d(207);
t("Karaoke (in spanish) - CUANDO CALIENTA EL SOL") ;
v("uSbtp4EY_sU");d(148);
t("Quando Quando Quando") ;
v("AiMTmh6MrqQ");d(193);
t("Mantovani & Orchestra - Amapola") ;
v("3tDmmwMnUYU");d(168);
t("Solamente Una Vez You Belong To My Heart Performed On Yamaha Tyros 4 By Rico") ;
v("JahmgMw996w");d(166);
t("BAILAMOS ** QUOC KHANH") ;
v("dFv8LqxMJHs");d(276);
t("Rhythms del mundo - Hotel California") ;
v("fCKHLjOCZi0");d(416);
t("ABBA I Do, I Do, I Do, I Do, I Do Performed On Yamaha Tyros 4") ;
v("CUAIYIh932M");d(218);
t("Guantanamera") ;
v("nkHz1hCJUqE");d(169);
t("Apache - Hank Marvin - 2000") ;
v("RB91ayDlQLE");d(196);
t("Chiquitita - Richard Clayderman") ;
v("x0fe8zqK2Y8");d(217);
t("You dont have to say you love me - Romantic , instrumental 200ic") ;
v("SNTrJIIom3w");d(196);
t("Robertino Loretti - Schubert - Serenata") ;
v("ASuQ7oVH2yE");d(172);
t("Toto Cutugno - Clandestino") ;
v("BGz--IIgJQo");d(200);
t("Lê Toàn - Cha Tôi (Papa)") ;
v("mMumDBAed_Q");d(283);
t("Yesterday - Mantovani Orchestra") ;
v("oW2SDwSJrLg");d(205);
t("Stranger on the Shore - by Boots Randolph") ;
9
v("sv6FH5tlWZg");d(202);
t("Smokie - Needles and Pins 1977") ;
v("7beP1eIeVNI");d(139);
t("TOM JONES - Delilah (1968)") ;
v("8a_T3U1rg2I");d(213);
t("Triệu Đóa Hoa Hồng - Gia Huy") ;
v("_zJPXFCk5Ak");d(279);
t("HÒA TẤU GUITAR 04") ;
v("G2luX73arA8");d(173);
t("Mua Thu La Bay - Karaoke") ;
v("UCxs6YsL6xo");d(212);
t("Biscaya") ;
v("x-32fx-AcYI");d(243);
t("Franck Pourcel - Adieu, jolie Candy (1969)") ;
v("w8eAKPRO8O0");d(180);
t("Donna Donna Kinh điển nhạc Pháp") ;
v("RmsWnZXVIaI");d(144);
t("Khi xưa ta bé - Karaoke") ;
v("CDv9iSnlbJ4");d(303);
t("Pardonne moi ce caprice - Mathiew") ;
v("C-Lh0lhsOhw");d(200);
t("Tuyết Rơi (Tombe La Neige) - Ngọc Lan") ;
v("ji9CW85d7UQ");d(375);
t("Mal... CHRISTOPHE... oneiraki") ;
v("dueE06-rzbk");d(216);
t("Helmut Lotti - "Those Were The Days"") ;
v("tX2sVv3yYgE");d(233);
t("Sen Masao _ Kitagunino Haru") ;
v("0kHyeZDDwl4");d(163);
t("Hana (Flower)") ;
v("1taY9sBRyZs");d(176);
10
t("Teresa Teng ♪ Toki no Nagare ni mi o Makase ♪ Legendado ♪ HD Video") ;
v("_yMALArKnEU");d(200);
t("KARAOKE -Xin thời gian ngừng trôi Ngọc Lan") ;
v("hoxUYh4fVnQ");d(238);
t("Airport - Japan 200ic") ;
v("-RF7vr9Uw9I");d(230);
t("Trio Ambisi - Asing Sing So") ;
v("Av1Ilext1wE");d(269);
t("Rudy Wairata - Rayuan Pulau Kelapa") ;
v("4--RjaheiVg");d(191);
t("Rayuan Pulau Kelapa, Habil prod.mpg") ;
v("9hzt0qeIZrM");d(314);
t("Bengawan Solo - A Duet in Indonesian") ;
v("cxyJ49awbt4");d(246);
t("Ayo Mama") ;
v("g-cog8ueNJA");d(226);
t("Andy Tielman Bengawan Solo") ;
v("ATo8qV4Cgaw");d(222);
t("Teresa Teng - 恰似你的 ") ;
v("1WqhF6hRiiM");d(248);
t("Vuong Phi - No Regrets") ;
v("-7ruFFLOgsQ");d(269);
t("Yi Qi Zou Guo De Ri - (Liu De Hua) in chinese-cantonese") ;
v("EKy_E64Xd7A");d(235);
t("Journey to the West - Girl's Love - Tinh nu nhi - by pvhung20") ;
v("eVizTSJ80bo");d(274);
t("The best of instrumental .-Francis Goya(Quiero)") ;
v("10z3c8Q35O8");d(201);
May 25, 2013 - phanhung20

Mais conteúdo relacionado

Mais procurados

Security of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go CenterSecurity of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go Center
Deep Datta
 
Biicode OpenExpoDay
Biicode OpenExpoDayBiicode OpenExpoDay
Biicode OpenExpoDay
fcofdezc
 

Mais procurados (20)

Security of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go CenterSecurity of Go Modules and Vulnerability Scanning in Go Center
Security of Go Modules and Vulnerability Scanning in Go Center
 
Augeas
AugeasAugeas
Augeas
 
Vcs24
Vcs24Vcs24
Vcs24
 
Biicode OpenExpoDay
Biicode OpenExpoDayBiicode OpenExpoDay
Biicode OpenExpoDay
 
Python + Hive on AWS EMR で貧者のログサマリ
Python + Hive on AWS EMR で貧者のログサマリPython + Hive on AWS EMR で貧者のログサマリ
Python + Hive on AWS EMR で貧者のログサマリ
 
test
testtest
test
 
OSC 2018 Nagoya rsyncやシェルでバックアップするよりも簡単にOSSのBaculaでバックアップしてみよう
OSC 2018 Nagoya rsyncやシェルでバックアップするよりも簡単にOSSのBaculaでバックアップしてみようOSC 2018 Nagoya rsyncやシェルでバックアップするよりも簡単にOSSのBaculaでバックアップしてみよう
OSC 2018 Nagoya rsyncやシェルでバックアップするよりも簡単にOSSのBaculaでバックアップしてみよう
 
[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선
 
Backups
BackupsBackups
Backups
 
Dr feelgood
Dr feelgoodDr feelgood
Dr feelgood
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
FreeBSD Document Project
FreeBSD Document ProjectFreeBSD Document Project
FreeBSD Document Project
 
Innodb plugin in MySQL 5.1
Innodb plugin in MySQL 5.1Innodb plugin in MySQL 5.1
Innodb plugin in MySQL 5.1
 
Most frequently used unix commands for database administrator
Most frequently used unix commands for database administratorMost frequently used unix commands for database administrator
Most frequently used unix commands for database administrator
 
Install git and drush on Godaddy shared hosting
Install git and drush on Godaddy shared hostingInstall git and drush on Godaddy shared hosting
Install git and drush on Godaddy shared hosting
 
JFugue, Music, and the Future of Java [JavaOne 2016, CON1851]
JFugue, Music, and the Future of Java [JavaOne 2016, CON1851]JFugue, Music, and the Future of Java [JavaOne 2016, CON1851]
JFugue, Music, and the Future of Java [JavaOne 2016, CON1851]
 
Setuplog
SetuplogSetuplog
Setuplog
 
The Art, Joy, and Power of Creating Musical Programs (JFugue at SXSW Interact...
The Art, Joy, and Power of Creating Musical Programs (JFugue at SXSW Interact...The Art, Joy, and Power of Creating Musical Programs (JFugue at SXSW Interact...
The Art, Joy, and Power of Creating Musical Programs (JFugue at SXSW Interact...
 
Cucu video log
Cucu video logCucu video log
Cucu video log
 
WordPress in 30 minutes
WordPress in 30 minutesWordPress in 30 minutes
WordPress in 30 minutes
 

Destaque

Playing videos in html
Playing videos in htmlPlaying videos in html
Playing videos in html
Divam Goyal
 
Music video analysis – prayer in c 5
Music video analysis – prayer in c 5Music video analysis – prayer in c 5
Music video analysis – prayer in c 5
EmmaWatson1234
 
Student management system
Student management systemStudent management system
Student management system
Gaurav Subham
 
Project report-on-student-information-management-system-php-mysql
Project report-on-student-information-management-system-php-mysqlProject report-on-student-information-management-system-php-mysql
Project report-on-student-information-management-system-php-mysql
Raj Sharma
 

Destaque (10)

C is for content final happy hour
C is for content final happy hourC is for content final happy hour
C is for content final happy hour
 
Playing videos in html
Playing videos in htmlPlaying videos in html
Playing videos in html
 
Music video analysis – prayer in c 5
Music video analysis – prayer in c 5Music video analysis – prayer in c 5
Music video analysis – prayer in c 5
 
openFrameworks 007 - video
openFrameworks 007 - videoopenFrameworks 007 - video
openFrameworks 007 - video
 
Chandni Sharma,Project on HTML and CSS, student final year BCA, Dezyne E'cole...
Chandni Sharma,Project on HTML and CSS, student final year BCA, Dezyne E'cole...Chandni Sharma,Project on HTML and CSS, student final year BCA, Dezyne E'cole...
Chandni Sharma,Project on HTML and CSS, student final year BCA, Dezyne E'cole...
 
Student management system
Student management systemStudent management system
Student management system
 
Student Management System Project Abstract
Student Management System Project AbstractStudent Management System Project Abstract
Student Management System Project Abstract
 
Student management system
Student management systemStudent management system
Student management system
 
Student management system
Student management systemStudent management system
Student management system
 
Project report-on-student-information-management-system-php-mysql
Project report-on-student-information-management-system-php-mysqlProject report-on-student-information-management-system-php-mysql
Project report-on-student-information-management-system-php-mysql
 

Semelhante a Playing videos continously

Play search-videos-html
Play search-videos-htmlPlay search-videos-html
Play search-videos-html
pvhung20
 
Using HTML5 for a great Open Web
Using HTML5 for a great Open WebUsing HTML5 for a great Open Web
Using HTML5 for a great Open Web
Robert Nyman
 
webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5
smueller_sandsmedia
 
Rs cit important question
Rs cit important questionRs cit important question
Rs cit important question
SirajRock
 

Semelhante a Playing videos continously (20)

How to-save-video-list
How to-save-video-listHow to-save-video-list
How to-save-video-list
 
Non stop random2b
Non stop random2bNon stop random2b
Non stop random2b
 
Api vortrag
Api vortragApi vortrag
Api vortrag
 
Play search-videos-html
Play search-videos-htmlPlay search-videos-html
Play search-videos-html
 
Using HTML5 for a great Open Web
Using HTML5 for a great Open WebUsing HTML5 for a great Open Web
Using HTML5 for a great Open Web
 
Al Fazl International - Weekly 29 May 2015
Al Fazl International - Weekly 29 May 2015Al Fazl International - Weekly 29 May 2015
Al Fazl International - Weekly 29 May 2015
 
The Power of CSS
The Power of CSSThe Power of CSS
The Power of CSS
 
Videos on Android - Stuff What I Learned
Videos on Android - Stuff What I LearnedVideos on Android - Stuff What I Learned
Videos on Android - Stuff What I Learned
 
Porque VIM?
Porque VIM?Porque VIM?
Porque VIM?
 
Books
BooksBooks
Books
 
Data Mangling with mongoDB the Right Way [PyData London] 2016]
Data Mangling with mongoDB the Right Way [PyData London] 2016]Data Mangling with mongoDB the Right Way [PyData London] 2016]
Data Mangling with mongoDB the Right Way [PyData London] 2016]
 
Using Yahoo Pipes
Using Yahoo PipesUsing Yahoo Pipes
Using Yahoo Pipes
 
Brave new world of HTML5
Brave new world of HTML5Brave new world of HTML5
Brave new world of HTML5
 
webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5
 
Friv 4 friv4 Juegos Friv Games Online
Friv 4   friv4  Juegos Friv Games OnlineFriv 4   friv4  Juegos Friv Games Online
Friv 4 friv4 Juegos Friv Games Online
 
RCEC Email 3.5.03
RCEC Email 3.5.03RCEC Email 3.5.03
RCEC Email 3.5.03
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
 
Rs cit important question
Rs cit important questionRs cit important question
Rs cit important question
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
MongoDB - Monitoring and queueing
MongoDB - Monitoring and queueingMongoDB - Monitoring and queueing
MongoDB - Monitoring and queueing
 

Mais de phanhung20

Play audio-continuously
Play audio-continuouslyPlay audio-continuously
Play audio-continuously
phanhung20
 
Playing videos. See:slideshare.net/phanhung20/non-stop-random2b
Playing videos. See:slideshare.net/phanhung20/non-stop-random2bPlaying videos. See:slideshare.net/phanhung20/non-stop-random2b
Playing videos. See:slideshare.net/phanhung20/non-stop-random2b
phanhung20
 

Mais de phanhung20 (18)

Graph for Coulomb damped oscillation
Graph for Coulomb damped oscillationGraph for Coulomb damped oscillation
Graph for Coulomb damped oscillation
 
Search videos with youtube api3
Search videos with youtube api3Search videos with youtube api3
Search videos with youtube api3
 
Search and play more than 50 clips
Search and play more than 50 clipsSearch and play more than 50 clips
Search and play more than 50 clips
 
Search 500-video-clips
Search 500-video-clipsSearch 500-video-clips
Search 500-video-clips
 
Color ss2-pvh-bta1
Color ss2-pvh-bta1Color ss2-pvh-bta1
Color ss2-pvh-bta1
 
Pvh bai-tap-a2-2014-th-11(1)
Pvh bai-tap-a2-2014-th-11(1)Pvh bai-tap-a2-2014-th-11(1)
Pvh bai-tap-a2-2014-th-11(1)
 
Cau hoi thi vatly 2014 4 tin chi
Cau hoi thi vatly 2014 4 tin chiCau hoi thi vatly 2014 4 tin chi
Cau hoi thi vatly 2014 4 tin chi
 
Cau hoi-thi-catly-2014-thang11
Cau hoi-thi-catly-2014-thang11Cau hoi-thi-catly-2014-thang11
Cau hoi-thi-catly-2014-thang11
 
Pvh 11-2014-btvl-a1
Pvh 11-2014-btvl-a1Pvh 11-2014-btvl-a1
Pvh 11-2014-btvl-a1
 
Debai table1
Debai table1Debai table1
Debai table1
 
Bai tap-a1
Bai tap-a1Bai tap-a1
Bai tap-a1
 
Thi nghiema2
Thi nghiema2Thi nghiema2
Thi nghiema2
 
Thi nghiema1
Thi nghiema1Thi nghiema1
Thi nghiema1
 
Ly thuyetdosai so1
Ly thuyetdosai so1Ly thuyetdosai so1
Ly thuyetdosai so1
 
Bai tap a1
Bai tap a1Bai tap a1
Bai tap a1
 
Play audio-continuously
Play audio-continuouslyPlay audio-continuously
Play audio-continuously
 
Xem video-lien-tuc
Xem video-lien-tucXem video-lien-tuc
Xem video-lien-tuc
 
Playing videos. See:slideshare.net/phanhung20/non-stop-random2b
Playing videos. See:slideshare.net/phanhung20/non-stop-random2bPlaying videos. See:slideshare.net/phanhung20/non-stop-random2b
Playing videos. See:slideshare.net/phanhung20/non-stop-random2b
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

Último (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Playing videos continously

  • 1. 1 HOW TO MAKE WEB PAGE WITH VIDEOS PLAYING CONTINUOUSLY We can use function getDuration() in "swfobject.js" with data retrieved from the Google "gdata.feeds" webs. But the fact that pause between videos is shorter or longer in one or two seconds is not important. Because of it, I take the easiest way, using the familiar function setTimeout("..",1000) to control the change of videos. You can try this web page at address: https://files.myopera.com/phanhung20/files/nonstop-simple3.html and download RAR file (three files: nonstop-simple3.html, myList1.js, playing-videos.pdf) from: http://www.mediafire.com/download/903gf057br6jzo7/nonstop-videos.rar Pic. 1- The web page nonstop-simple3.html The main html file “nonstop-simple3.html” stores information of only six videos. Other 66 video’s information is saved in a javascript file “myList1.js”. You can easily add more videos by typing for each new video three elements: 1- Title of video: You must avoid to write any double quotation marks inside a pair of beginning and ending ones and need to rewrite those marks “ to ”. For example: This line: t("Evita "Don't Cry For Me Argentina", Francis Goya") ; will halt the web at once.
  • 2. 2 The right script is: t("Evita "Don't Cry For Me Argentina", Francis Goya") ; 2- Id (Identifier) of video: v(“TrwKuoF-WOo“); Pic. 2 – Id (11 characters-numbers) is at the end of address of the web (click in it to see full content) 3- duration - the time elapse of the video: d(265); I have retrieved 265 seconds from gdata web. But in youtube web we see 4:24 (264 seconds). Pic. 3 – duration (4:24) and title ((HD 720p) “Don’t Cry …) shown in youtube.com page Title can be freely changed, but Id and duration must be exact as you see them in youtube.com web page. There is an extract from “myList1.js”: t("Mal... CHRISTOPHE... oneiraki") ; v("dueE06-rzbk");d(216); t("Helmut Lotti - "Those Were The Days"") ; v("tX2sVv3yYgE");d(233); t("Sen Masao _ Kitagunino Haru") ; v("0kHyeZDDwl4");d(163); Two file “nonstop-simple3.html” (4.7 KB) and “myList1.js” (4.6 KB), can be downloaded to your PC, using the links and they must be placed in the same folder: https://files.myopera.com/phanhung20/files/nonstop-simple3.html https://files.myopera.com/phanhung20/files/myList1.js The whole source codes of those files are shown here.
  • 3. 3 nonstop-simple3.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Continously Playing</title> <head> <style> body{ background-color:#999; font-family:Arial; font-size:12px; } a { text-decoration:none; color:blue; } a:hover { text-decoration:underline; color: #0099ff; } #list1{ width: 640px; /*850px*/ height: 130px; margin:0px; padding:0px; border:1px solid #666; text-align:left; overflow:auto; background-color:#ddd; line-height:150%; } </style> <script> function play(i){ c = 0; window.scrollTo(0,0); obj = document.getElementById("vidTitle");
  • 4. 4 last = last = vid.length - 1; obj.innerHTML = '['+ j + ' / total:'+ last +']&nbsp;&nbsp;<b>'+tit[i]+ '</b>'; obj = document.getElementById("player1"); stID = "http://www.youtube.com/embed/" + vid[i] + "?autoplay=1"; obj.setAttribute("src",stID); } var c = 0; var j = 0; function count(){ last = vid.length - 1; c = c + 1; obj = document.getElementById("showSeconds"); obj.value = c + " / dur:" + dur[j]; if(c>dur[j]){ if(j<=last){j=j+1; play(j)} if (j>last){j=1;play(j)} } mytimer = setTimeout("count()",1000); } function backVideo(){ len = vid.length -1; if(j>=2){j=j-1;play(j);} if (j==1){play(j);alert("Begin Of List");} } function nextVideo(){ last = vid.length -1; if(j<=last){j=j+1;play(j);} if (j>last){j=1;play(j);} } function endVid(){ clearTimeout(mytimer); st = "http://www.youtube.com/embed/ntGJ2vkLbIo?autoplay=0"; obj = document.getElementById("player1"); obj.setAttribute("src",st); obj = document.getElementById("vidTitle"); obj.innerHTML = ''; c = 0; j = 0; } function sec(m,s){ return m*60 + s; } function t(ti){ tit.push(ti); } function v(vi){ vid.push(vi); }
  • 5. 5 function d(du){ dur.push(du); } function quit(){ if(mytimer){ clearTimeout(mytimer); } } //Creating three arrays tit = []; vid = []; dur = []; k=0; tit[k]="" ;vid[k]="" ;dur[k]=0; t("Richard Abel - Spanish Eyes") ; v("ntGJ2vkLbIo");d(183); t("CUANDO SALI DE CUBA- SUSANA PEÑA"); v("9CLAAJYRo-I");d(95); t("FRANCK POURCELL - BESAME MUCHO"); v("RK208ZT82Is");d(sec(3,12)); // In the youtube.com page "franck pourcel besame mucho" // you see: duration of the video is 3:12. Function sec(..) will return 192 seconds. t("Evita "Don't Cry For Me Argentina", Francis Goya") ; v("TrwKuoF-WOo");d(265); // t("NO MATTER WHAT _ Francis Goya & RICHARD CLAYDERMAN") ; v("NPer39-JSr0");d(214); t("The old rowan tree") ; v("wmt16uvPDqg");d(161); function init(){ ss = ''; len = vid.length; for (i=1;i<len;i++){ xx = '<li><a href="#" onclick="j =' + i +'; play(' + i+');">'+ tit[i]+ '</a><br>'; // them j = i; ss = ss + xx; } obj = document.getElementById('list1'); obj.innerHTML = '<ol><br>' + ss + '</ol>'; } </script> <script type="text/javascript" src="myList1.js"></script>
  • 6. 6 </head> <body onload="init()" onload="quit()"> <div align="center"> <iframe id="player1" width="835" height="480" src="http://www.youtube.com/embed/ntGJ2vkLbIo?autoplay=0" frameborder="0" allowfullscreen ></iframe> <br> You are watching: <br><span id="vidTitle"></span> <br> <input type="button" value="Play All" onclick="count()">&nbsp; <input type="button" value="End" onclick="endVid()">&nbsp; <input type="text" id="showSeconds" value="0/dur" size=28 style="text-align:center">&nbsp; <input type="button" value="Back" onclick = "backVideo();">&nbsp; <input type="button" value="Next" onclick="nextVideo()"> <br> <br> <div id="list1"> </div> <br> <iframe src="http://www.slideshare.net/slideshow/embed_code/21827746" width="835" height="560" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border- width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/phanhung20/nonstop-vid" title="Nonstop vid" target="_blank">Nonstop vid</a> </strong> from <strong><a href="http://www.slideshare.net/phanhung20" target="_blank">phanhung20</a></strong> </div> <br> </div> </body> </html> myList1.js t("Che Sara, Rocco Granata") ; v("mdlE_FTym7I");d(224); t("Je T'aime Mon Amour ~ Claudia Jung & Richard Clayd") ; v("ZNFxeAOZRY0");d(236); t("Madonna - 26 Years of La Isla Bonita") ; v("dhPkFXGlfds");d(261); t("Besame mucho - saxo soprano") ; v("AHZUf3tfZE8");d(237); t("Humayun's Tomb") ; //documentary
  • 7. 7 v("uuWAMfejnLI");d(265); t("Smokie - Needles And Pins") ; v("pa648JF3SoU");d(159); t("Feelings... - Romantic Violin") ; v("owBLIJBLbJo");d(230); t("Michael Learns to Rock - That's Why (You Go Away) Live") ; v("HaBIQ7TRYbs");d(258); t("Richard clayderman Dancing Queen") ; v("xSv5XhAZQHA");d(231); t("Richard Clayderman - ABBA - Fernando.mp4") ; v("Kidut_LpYS0");d(267); t("Green Green Grass Of Home - Tom Jones & Englebert Humperdink ( with lyrics )") ; v("t5CdDpe87eM");d(186); t("TOM JONES - PLEASE RELEASE ME (LIVE)") ; v("AY3JJnL4Fz4");d(148); t("Richard Clayderman & Francis Goya - My Heart Will Go On") ; v("3EC-xqcSGfg");d(285); t("VIDEO--AMORE--AMOR .--FRANCIS GOYA") ; v("B2XYGgoYu5U");d(205); t("GOODBYE MY LOVE GOODBYE--FRANCIS GOYA") ; v("-gnTgDeo-x8");d(172); t("The Moon Represents My Heart") ; v("Y-4q0ylUS6k");d(217); t("O sole mio - Graziano") ; v("qA4PjcqOXQo");d(197); t("FRANCIS GOYA - WHEN YOU TELL ME THAT YOU LOVE ME") ; v("y5omkOu12S4");d(246); t("SOMEWHERE MY LOVE - Billy Vaughn") ; v("X5caDaz-_Ko");d(120); t("Sigrid & Marina - Santa Lucia 2010") ; v("uNDg3yObq4E");d(183);
  • 8. 8 t("HAWAII - Aloha Oe") ; v("-fOQmQCtBbM");d(207); t("Karaoke (in spanish) - CUANDO CALIENTA EL SOL") ; v("uSbtp4EY_sU");d(148); t("Quando Quando Quando") ; v("AiMTmh6MrqQ");d(193); t("Mantovani & Orchestra - Amapola") ; v("3tDmmwMnUYU");d(168); t("Solamente Una Vez You Belong To My Heart Performed On Yamaha Tyros 4 By Rico") ; v("JahmgMw996w");d(166); t("BAILAMOS ** QUOC KHANH") ; v("dFv8LqxMJHs");d(276); t("Rhythms del mundo - Hotel California") ; v("fCKHLjOCZi0");d(416); t("ABBA I Do, I Do, I Do, I Do, I Do Performed On Yamaha Tyros 4") ; v("CUAIYIh932M");d(218); t("Guantanamera") ; v("nkHz1hCJUqE");d(169); t("Apache - Hank Marvin - 2000") ; v("RB91ayDlQLE");d(196); t("Chiquitita - Richard Clayderman") ; v("x0fe8zqK2Y8");d(217); t("You dont have to say you love me - Romantic , instrumental 200ic") ; v("SNTrJIIom3w");d(196); t("Robertino Loretti - Schubert - Serenata") ; v("ASuQ7oVH2yE");d(172); t("Toto Cutugno - Clandestino") ; v("BGz--IIgJQo");d(200); t("Lê Toàn - Cha Tôi (Papa)") ; v("mMumDBAed_Q");d(283); t("Yesterday - Mantovani Orchestra") ; v("oW2SDwSJrLg");d(205); t("Stranger on the Shore - by Boots Randolph") ;
  • 9. 9 v("sv6FH5tlWZg");d(202); t("Smokie - Needles and Pins 1977") ; v("7beP1eIeVNI");d(139); t("TOM JONES - Delilah (1968)") ; v("8a_T3U1rg2I");d(213); t("Triệu Đóa Hoa Hồng - Gia Huy") ; v("_zJPXFCk5Ak");d(279); t("HÒA TẤU GUITAR 04") ; v("G2luX73arA8");d(173); t("Mua Thu La Bay - Karaoke") ; v("UCxs6YsL6xo");d(212); t("Biscaya") ; v("x-32fx-AcYI");d(243); t("Franck Pourcel - Adieu, jolie Candy (1969)") ; v("w8eAKPRO8O0");d(180); t("Donna Donna Kinh điển nhạc Pháp") ; v("RmsWnZXVIaI");d(144); t("Khi xưa ta bé - Karaoke") ; v("CDv9iSnlbJ4");d(303); t("Pardonne moi ce caprice - Mathiew") ; v("C-Lh0lhsOhw");d(200); t("Tuyết Rơi (Tombe La Neige) - Ngọc Lan") ; v("ji9CW85d7UQ");d(375); t("Mal... CHRISTOPHE... oneiraki") ; v("dueE06-rzbk");d(216); t("Helmut Lotti - "Those Were The Days"") ; v("tX2sVv3yYgE");d(233); t("Sen Masao _ Kitagunino Haru") ; v("0kHyeZDDwl4");d(163); t("Hana (Flower)") ; v("1taY9sBRyZs");d(176);
  • 10. 10 t("Teresa Teng ♪ Toki no Nagare ni mi o Makase ♪ Legendado ♪ HD Video") ; v("_yMALArKnEU");d(200); t("KARAOKE -Xin thời gian ngừng trôi Ngọc Lan") ; v("hoxUYh4fVnQ");d(238); t("Airport - Japan 200ic") ; v("-RF7vr9Uw9I");d(230); t("Trio Ambisi - Asing Sing So") ; v("Av1Ilext1wE");d(269); t("Rudy Wairata - Rayuan Pulau Kelapa") ; v("4--RjaheiVg");d(191); t("Rayuan Pulau Kelapa, Habil prod.mpg") ; v("9hzt0qeIZrM");d(314); t("Bengawan Solo - A Duet in Indonesian") ; v("cxyJ49awbt4");d(246); t("Ayo Mama") ; v("g-cog8ueNJA");d(226); t("Andy Tielman Bengawan Solo") ; v("ATo8qV4Cgaw");d(222); t("Teresa Teng - 恰似你的 ") ; v("1WqhF6hRiiM");d(248); t("Vuong Phi - No Regrets") ; v("-7ruFFLOgsQ");d(269); t("Yi Qi Zou Guo De Ri - (Liu De Hua) in chinese-cantonese") ; v("EKy_E64Xd7A");d(235); t("Journey to the West - Girl's Love - Tinh nu nhi - by pvhung20") ; v("eVizTSJ80bo");d(274); t("The best of instrumental .-Francis Goya(Quiero)") ; v("10z3c8Q35O8");d(201); May 25, 2013 - phanhung20