@@ -12,19 +12,49 @@ $_documentContainer.innerHTML = `<dom-module id="demo-element">
12
12
</style>
13
13
<h1><code><google-youtube></code> Demo</h1>
14
14
<h3>Full API Demo</h3>
15
- <google-youtube id="googleYouTube" playsupported="{{playSupported}}" video-id="mN7IAaRdi_k" state="{{state}}" currenttime="{{currentTime}}" currenttimeformatted="{{currentTimeFormatted}}" duration="{{duration}}" durationformatted="{{durationFormatted}}" fractionloaded="{{fractionLoaded}}" volume="{{volume}}" playbackrate="{{playbackRate}}" playbackquality="{{playbackQuality}}" on-google-youtube-state-change="handleStateChange" on-google-youtube-error="handleYouTubeError">
15
+ <google-youtube
16
+ id="googleYouTube"
17
+ playsupported="{{playSupported}}"
18
+ video-id="mN7IAaRdi_k"
19
+ state="{{state}}"
20
+ currenttime="{{currentTime}}"
21
+ currenttimeformatted="{{currentTimeFormatted}}"
22
+ duration="{{duration}}"
23
+ durationformatted="{{durationFormatted}}"
24
+ fractionloaded="{{fractionLoaded}}"
25
+ volume="{{volume}}"
26
+ playbackrate="{{playbackRate}}"
27
+ playbackquality="{{playbackQuality}}"
28
+ on-google-youtube-state-change="handleStateChange"
29
+ on-google-youtube-error="handleYouTubeError">
16
30
</google-youtube>
17
31
18
32
<div>
19
- <p>Playback Progress: <span>{{currentTimeFormatted}}</span> / <span>{{durationFormatted}}</span> <progress max="1" value="{{computeProgress(currentTime, duration)}}"></progress></p>
33
+ <p>
34
+ Playback Progress:
35
+ <span>{{currentTimeFormatted}}</span>
36
+ /
37
+ <span>{{durationFormatted}}</span>
38
+ <progress max="1" value="{{computeProgress(currentTime, duration)}}"></progress>
39
+ </p>
20
40
<p>Volume: <span>{{volume}}</span></p>
21
41
<p>Playback Rate: <span>{{playbackRate}}</span></p>
22
42
<p>Playback Quality: <span>{{playbackQuality}}</span></p>
23
43
</div>
24
44
25
45
<div>
26
- <button id="play-video" disabled="{{computePlayDisabled(state, playSupported)}}" on-click="handlePlayVideo">Play</button>
27
- <button id="pause-video" disabled="{{computePauseDisabled(state)}}" on-click="handlePauseVideo">Pause</button>
46
+ <button
47
+ id="play-video"
48
+ disabled="{{computePlayDisabled(state, playSupported)}}"
49
+ on-click="handlePlayVideo">
50
+ Play
51
+ </button>
52
+ <button
53
+ id="pause-video"
54
+ disabled="{{computePauseDisabled(state)}}"
55
+ on-click="handlePauseVideo">
56
+ Pause
57
+ </button>
28
58
</div>
29
59
30
60
<div>
@@ -43,11 +73,19 @@ $_documentContainer.innerHTML = `<dom-module id="demo-element">
43
73
</div>
44
74
45
75
<h3>Custom Thumbnail Demo</h3>
46
- <google-youtube video-id="yRbOSdAe_JU" width="853px" height="480px" thumbnail="//www.polymer-project.org/images/logos/p-logo.svg">
76
+ <google-youtube
77
+ video-id="yRbOSdAe_JU"
78
+ width="853px"
79
+ height="480px"
80
+ thumbnail="//www.polymer-project.org/images/logos/p-logo.svg">
47
81
</google-youtube>
48
82
49
83
<h3>Playlist Demo</h3>
50
- <google-youtube list="PLNYkxOF6rcICc687SxHQRuo9TVNOJelSZ" list-type="playlist" width="640px" height="480px">
84
+ <google-youtube
85
+ list="PLNYkxOF6rcICc687SxHQRuo9TVNOJelSZ"
86
+ list-type="playlist"
87
+ width="640px"
88
+ height="480px">
51
89
</google-youtube>
52
90
</template>
53
91
0 commit comments