Skip to content

Commit 2d94b25

Browse files
committed
Delete redundant modules loaded in tests and reformat demo elements.
1 parent da3b486 commit 2d94b25

File tree

4 files changed

+45
-14
lines changed

4 files changed

+45
-14
lines changed

demo/demo-elements.js

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,49 @@ $_documentContainer.innerHTML = `<dom-module id="demo-element">
1212
</style>
1313
<h1><code>&lt;google-youtube&gt;</code> Demo</h1>
1414
<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">
1630
</google-youtube>
1731
1832
<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>
2040
<p>Volume: <span>{{volume}}</span></p>
2141
<p>Playback Rate: <span>{{playbackRate}}</span></p>
2242
<p>Playback Quality: <span>{{playbackQuality}}</span></p>
2343
</div>
2444
2545
<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>
2858
</div>
2959
3060
<div>
@@ -43,11 +73,19 @@ $_documentContainer.innerHTML = `<dom-module id="demo-element">
4373
</div>
4474
4575
<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">
4781
</google-youtube>
4882
4983
<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">
5189
</google-youtube>
5290
</template>
5391

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
77
<title>&lt;google-youtube&gt; Demo</title>
8-
<script src="../../../@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
8+
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2.0.0/webcomponents-bundle.js"></script>
99
<script type="module" src="./demo-elements.js"></script>
1010

1111
<style>

test/google-youtube-basic.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
<title>google-youtube Basic Tests</title>
77
<script src="../../../@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
88
<script src="../../../wct-browser-legacy/browser.js"></script>
9-
10-
<script type="module" src="../../../@polymer/polymer/polymer-legacy.js"></script>
11-
<script type="module" src="../google-youtube.js"></script>
129
</head>
1310
<body>
1411
<test-fixture id="GoogleYoutube">

test/google-youtube-custom-thumbnail.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
<title>google-youtube Basic Tests</title>
77
<script src="../../../@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
88
<script src="../../../wct-browser-legacy/browser.js"></script>
9-
10-
<script type="module" src="../../../@polymer/polymer/polymer-legacy.js"></script>
11-
<script type="module" src="../../../@polymer/test-fixture/test-fixture.js"></script>
12-
<script type="module" src="../google-youtube.js"></script>
139
</head>
1410
<body>
1511
<test-fixture id="GoogleYoutube">

0 commit comments

Comments
 (0)