11<!DOCTYPE html>
22< html >
33 < head >
4+ <!-- page title -->
45 < title > YouTube in Your App</ title >
6+ <!-- Style imports for Material Design Lite -->
7+ < link rel ="stylesheet " href ="https://fonts.googleapis.com/icon?family=Material+Icons ">
8+ < link rel ="stylesheet " href ="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css ">
9+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
10+
511 <!-- This code loads the iFrame Player API code asynchronously.-->
612 < script src = "https://www.youtube.com/iframe_api "> </ script >
713 <!-- This is the source of the Javscript for the demo -->
814 < script src ="demo.js "> </ script >
915 </ head >
1016 < body >
11- Demo | < a href =player_control.html > Player Controls and Data</ a > | < a href =event_listeners.html > Event Listeners</ a > < br >
12- <!-- The iframe video player will replace this <div> tag. -->
13- < div id ="player "> </ div >
14- < br > < br >
15-
16- <!-- This table contains metadata on the video in the iframe -->
17- < div > Metadata</ div >
18- < table border ="1 ">
19- < tr >
20- < td style ="width:100px "> Title</ td >
21- < td id ="title " style ="width:500px "> </ td >
22- </ tr > < tr >
23- < td style ="width:100px "> Author</ td >
24- < td id ="author " style ="width:500px "> </ td >
25- </ tr > < tr >
26- < td style ="width:100px "> Duration</ td >
27- < td id ="duration " style ="width:500px "> </ td >
28- </ tr > < tr >
29- < td style ="width:100px "> URL</ td >
30- < td id ="url " style ="width:500px "> </ td >
31- </ tr > < tr >
32- < td style ="width:100px "> Embed Code</ td >
33- < td id ="embedCode " style ="width:500px "> </ td >
34- </ tr > < tr >
35- < td style ="width:100px "> % loaded</ td >
36- < td id =percentLoaded style ="width:500px "> </ td >
37- </ tr >
38- </ table >
39- < br >
40-
41- <!-- This table contains editable video on the video in the iframe -->
42- < div > Video Attributes</ div >
43- < table border ="1 ">
44- < tr >
45- < td style ="width:120px "> VideoID</ td >
46- < td style ="width:100px " id ="video_id "> </ td >
47- < td >
48- < input id ="video_idOption " type ="text ">
49- < input type ="button " value ="Load " onClick ="loadNewVideo() ">
50- < input type ="button " value ="Cue " onClick ="cueNewVideo() ">
51- </ td >
52- </ tr > < tr >
53- < td style ="width:120px "> Status</ td >
54- < td style ="width:100px " id ="status "> </ td >
55- < td >
56- < input type ="button " value ="Play " onClick ="playVideo() ">
57- < input type ="button " value ="Pause " onClick ="pauseVideo() ">
58- < input type ="button " value ="Stop " onClick ="stopVideo() ">
59- </ td >
60- </ tr > < tr >
61- < td style ="width:120px "> Current Progress</ td >
62- < td style ="width:100px " id ="currentTime "> </ td >
63- < td type ="text ">
64- < input id ="currentTimeOption " type ="text ">
65- < input type ="button " value ="Seek " onClick ="seekTo() ">
66- </ td >
67- </ tr > < tr >
68- < td style ="width:120px "> Volume (0-100)</ td >
69- < td style ="width:100px " id ="volume "> </ td >
70- < td type ="text ">
71- < input id ="volumeOption " type ="text ">
72- < input type ="button " value ="Set " onClick ="setVolume() ">
73- </ td >
74- </ tr > < tr >
75- < td style ="width:120px "> Muted?</ td >
76- < td style ="width:100px " id ="mute "> </ td >
77- < td >
78- < input type ="button " value ="Mute " onClick ="mute() ">
79- < input type ="button " value ="Unmute " onClick ="unmute() ">
80- </ td >
81- </ tr > < tr >
82- < td style ="width:120px "> Video Quality</ td >
83- < td style ="width:100px " id =quality > </ td >
84- < td >
85- < select id ="qualityOption ">
86- </ select >
87- < input type ="button " value ="Set " onClick ="setQuality() ">
88- </ td >
89- </ tr > < tr >
90- < td style ="width:120px "> Playback Rate</ td >
91- < td style ="width:100px " id =rate > </ td >
92- < td >
93- < select id ="rateOption ">
94- </ select >
95- < input type ="button " value ="Set " onClick ="setRate() ">
96- </ td >
97- </ tr >
98- </ table >
17+ <!-- Header -->
18+ < div class ="mdl-layout mdl-js-layout mdl-layout--fixed-header ">
19+ < header class ="mdl-layout__header ">
20+ < div class ="mdl-layout__header-row ">
21+ <!-- Title -->
22+ < span class ="mdl-layout-title "> YouTube in Your App</ span >
23+ <!-- Add spacer, to align navigation to the right -->
24+ < div class ="mdl-layout-spacer "> </ div >
25+ <!-- Navigation. We hide it in small screens. -->
26+ < nav class ="mdl-navigation ">
27+ < a class ="mdl-navigation__link " href ="# "> < b > Demo</ b > </ a >
28+ < a class ="mdl-navigation__link " href ="player_control.html "> Player Controls and Data</ a >
29+ < a class ="mdl-navigation__link " href ="event_listeners.html "> Event Listeners</ a >
30+ </ nav >
31+ </ div >
32+ </ header >
33+ < main class ="mdl-layout__content ">
34+ < div class ="mdl-grid ">
35+ < div class ="mdl-cell mdl-cell--5-col ">
36+ <!-- The iframe video player will replace this <div> tag. -->
37+ < div id ="player "> </ div >
38+ </ div >
39+ < div class ="mdl-cell mdl-cell--7-col ">
40+ <!-- This table contains editable video on the video in the iframe -->
41+ < table class ="mdl-data-table ">
42+ < tr >
43+ < td class ="mdl-data-table__cell--non-numeric "> VideoID</ td >
44+ < td id ="video_id "> </ td >
45+ < td class ="mdl-data-table__cell--non-numeric ">
46+ < input id ="video_idOption " type ="text ">
47+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="loadNewVideo() "> Load</ button >
48+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="cueNewVideo() "> Cue</ button >
49+ </ td >
50+ </ tr > < tr >
51+ < td class ="mdl-data-table__cell--non-numeric "> Status</ td >
52+ < td id ="status "> </ td >
53+ < td class ="mdl-data-table__cell--non-numeric ">
54+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="playVideo() "> Play</ button >
55+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="pauseVideo() "> Pause</ button >
56+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="stopVideo() "> Stop</ button >
57+ </ td >
58+ </ tr > < tr >
59+ < td class ="mdl-data-table__cell--non-numeric "> Current Progress</ td >
60+ < td id ="currentTime "> </ td >
61+ < td class ="mdl-data-table__cell--non-numeric ">
62+ < input id ="currentTimeOption " type ="text ">
63+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="seekTo() "> Seek</ button >
64+ </ td >
65+ </ tr > < tr >
66+ < td class ="mdl-data-table__cell--non-numeric "> Volume (0-100)</ td >
67+ < td id ="volume "> </ td >
68+ < td class ="mdl-data-table__cell--non-numeric ">
69+ < input id ="volumeOption " type ="text ">
70+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="setVolume() "> Set</ button >
71+ </ td >
72+ </ tr > < tr >
73+ < td class ="mdl-data-table__cell--non-numeric "> Muted?</ td >
74+ < td id ="mute "> </ td >
75+ < td class ="mdl-data-table__cell--non-numeric ">
76+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="mute() "> Mute</ button >
77+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="unmute() "> Unmute</ button >
78+ </ td >
79+ </ tr > < tr >
80+ < td class ="mdl-data-table__cell--non-numeric "> Video Quality</ td >
81+ < td id =quality > </ td >
82+ < td class ="mdl-data-table__cell--non-numeric ">
83+ < select id ="qualityOption ">
84+ </ select >
85+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="setQuality() "> Set</ button >
86+ </ td >
87+ </ tr > < tr >
88+ < td class ="mdl-data-table__cell--non-numeric "> Playback Rate</ td >
89+ < td id =rate > </ td >
90+ < td class ="mdl-data-table__cell--non-numeric ">
91+ < select id ="rateOption ">
92+ </ select >
93+ < button class ="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored " onClick ="setRate() "> Set</ button >
94+ </ td >
95+ </ tr >
96+ </ table >
97+ </ div >
98+ </ div >
99+ < div class ="mdl-grid ">
100+ < div class ="mdl-cell mdl-cell--4-col ">
101+ <!-- This table contains metadata on the video in the iframe -->
102+ < table class ="mdl-data-table ">
103+ < tr >
104+ < td class ="mdl-data-table__cell--non-numeric "> Title</ td >
105+ < td id ="title " class ="mdl-data-table__cell--non-numeric "> </ td >
106+ </ tr > < tr >
107+ < td class ="mdl-data-table__cell--non-numeric "> Author</ td >
108+ < td id ="author " class ="mdl-data-table__cell--non-numeric "> </ td >
109+ </ tr > < tr >
110+ < td class ="mdl-data-table__cell--non-numeric "> Duration</ td >
111+ < td id ="duration "> </ td >
112+ </ tr > < tr >
113+ < td class ="mdl-data-table__cell--non-numeric "> % loaded</ td >
114+ < td id =percentLoaded > </ td >
115+ </ tr > < tr >
116+ < td class ="mdl-data-table__cell--non-numeric "> Embed Code</ td >
117+ < td id ="embedCode "> </ td >
118+ </ tr > < tr >
119+ < td class ="mdl-data-table__cell--non-numeric "> URL</ td >
120+ < td id ="url "> </ td >
121+ </ tr >
122+ </ table >
123+ </ div >
124+ </ div >
125+ </ main >
126+ </ div >
99127 </ body >
100128</ html >
0 commit comments