File: audio_player.html

package info (click to toggle)
chromium-browser 41.0.2272.118-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 2,189,132 kB
  • sloc: cpp: 9,691,462; ansic: 3,341,451; python: 712,689; asm: 518,779; xml: 208,926; java: 169,820; sh: 119,353; perl: 68,907; makefile: 28,311; yacc: 13,305; objc: 11,385; tcl: 3,186; cs: 2,225; sql: 2,217; lex: 2,215; lisp: 1,349; pascal: 1,256; awk: 407; ruby: 155; sed: 53; php: 14; exp: 11
file content (206 lines) | stat: -rw-r--r-- 7,886 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!--
  -- Copyright 2014 The Chromium Authors. All rights reserved.
  -- Use of this source code is governed by a BSD-style license that can be
  -- found in the LICENSE file.
  -->
<!DOCTYPE HTML>
<html>
<head>
  <!-- We have to set some default title, or chrome will use the page name.
    -- As soon as the i18n'd strings are loaded we replace it with the correct
    -- string. Until then, use an invisible non-whitespace character.
    -->
  <title>&#xFEFF;</title>
  <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
  <link rel="stylesheet" type="text/css" href="css/audio_player.css">

  <!-- Don't load mediaplayer_scripts.js when flattening is disabled -->
  <if expr="False"><!-- </if>
    <script src="js/audio_player_scripts.js"></script>
  <if expr="False"> --></if>
  <if expr="False">
    <!-- This section is used when the file manager is loaded with
         'filemgr-ext-path' command-line flag. -->
    <!-- Keep the list in sync with audio_player_scripts.js. -->
    <script src="../../webui//resources/js/cr.js"></script>
    <script src="../../webui/resources/js/cr/event_target.js"></script>
    <script src="../../webui/resources/js/cr/ui/array_data_model.js">
    </script>

    <script src="../../../third_party/polymer/polymer/polymer.js"></script>

    <script src="../file_manager/common/js/async_util.js"></script>
    <script src="../file_manager/common/js/file_type.js"></script>
    <script src="../file_manager/common/js/util.js"></script>
    <script src="../file_manager/common/js/volume_manager_common.js"></script>
    <script src="../file_manager/foreground/js/volume_manager_wrapper.js"></script>
    <script src="../file_manager/foreground/js/metadata/metadata_cache.js"></script>

    <script src="js/audio_player.js"></script>

    <script src="elements/track_list.js"></script>
    <script src="elements/control_panel.js"></script>
    <script src="elements/volume_controller.js"></script>
    <script src="elements/audio_player.js"></script>
   </if>
 </head>
<body>
  <!-- Definition of <track-list> tag. -->
  <polymer-element name="track-list" attributes="tracks">
    <template>
      <link rel="stylesheet" href="elements/track_list.css"></link>
      <template id="tracks" repeat="{{track, index in tracks}}">
        <div class="track" active?="{{track.active}}" index="{{index}}" on-click="{{trackClicked}}">
          <div class="data">
            <div class="data-title">{{track.title}}</div>
            <div class="data-artist">{{track.artist}}</div>
          </div>
        </div>
      </template>
    </template>
  </polymer-element>

  <!-- Definition of <control-panel> tag. -->
  <polymer-element name="control-panel">
    <template>
      <link rel="stylesheet" href="elements/control_panel.css"></link>

      <div class="controls">
        <div class="upper-controls time-controls">
          <div class="time media-control">
            <div class="current">{{timeString_}}</div>
          </div>
          <div class="progress media-control custom-slider">
            <input name="timeInput"
                   type="range"
                   min="0" max="{{duration}}" value="{{time}}">
            <div class="bar">
              <div class="filled" style="width: {{time/duration*100}}%;"></div>
              <div class="cap left"></div>
              <div class="cap right"></div>
            </div>
          </div>
          <div class="time media-control">
            <div class="duration">{{durationString_}}</div>
          </div>
        </div>
        <div class="lower-controls audio-controls">
          <!-- Shuffle toggle button in the bottom line. -->
          <button class="shuffle-mode media-button toggle" state="default">
            <label>
              <input id="shuffleCheckbox"
                     type="checkbox"
                     checked="{{model.shuffle}}"></input>
              <span class="icon"></span>
            </label>
          </button>

          <!-- Repeat toggle button in the bottom line. -->
          <button class="repeat media-button toggle" state="default">
            <label>
              <input id="repeatCheckbox"
                     type="checkbox"
                     checked="{{model.repeat}}"></input>
              <span class="icon"></span>
            </label>
          </button>

          <!-- Prev button in the bottom line. -->
          <button class="previous media-button"
                 state="default"
                 on-click="{{previousClick}}">
            <div class="normal default"></div>
            <div class="disabled"></div>
          </button>

          <!-- Play button in the bottom line. -->
          <button class="play media-control media-button"
                  state='{{playing ? "playing" : "ended"}}'
                  on-click="{{playClick}}">
            <div class="normal playing"></div>
            <div class="normal ended"></div>
            <div class="disabled"></div>
          </button>

          <!-- Next button in the bottom line. -->
          <button class="next media-button"
                  state="default"
                  on-click="{{nextClick}}">
            <div class="normal default"></div>
            <div class="disabled"></div>
          </button>

          <div id="volumeContainer"
               class="default-hidden"
               anchor-point="bottom center">
            <volume-controller id="volumeSlider"
                               width="32" height="85" value="50">
            </volume-controller>

            <polymer-anchor-point id="anchorHelper"></polymer-anchor-point>
          </div>

          <!-- Volume button in the bottom line. -->
          <button id="volumeButton"
                  class="volume media-button toggle"
                  state="default"
                  on-click="{{volumeButtonClick}}"
                  anchor-point="bottom center">
            <label>
              <input type="checkbox" checked="{{volumeSliderShown}}"></input>
              <span class="icon"></span>
            </label>
          </button>

          <!-- Playlist button in the bottom line. -->
          <button id="playlistButton"
                  class="playlist media-button toggle"
                  state="default">
            <label>
              <input type="checkbox" checked="{{model.expanded}}"></input>
              <span class="icon"></span>
            </label>
          </button>
        </div>
      </div>
    </template>
  </polymer-element>

  <!-- Definition of <volume-controller> tag. -->
  <polymer-element name="volume-controller" attributes="width height value">
    <template>
      <link rel="stylesheet" href="elements/volume_controller.css"></link>

      <div id="background"></div>
      <input name="rawValueInput" id="rawValueInput"
             type="range" min="0" max="100" value="{{rawValue}}">
      <div id="bar">
        <div class="filled" style="height: {{rawValue}}%;"></div>
        <div class="cap left"></div>
        <div class="cap right"></div>
      </div>
    </template>
  </polymer-element>

  <!-- Definition of <audio-player> tag. -->
  <polymer-element name="audio-player"
                   attributes="playing currenttrackurl playcount">
    <template>
      <link rel="stylesheet" href="elements/audio_player.css"></link>

      <track-list id="trackList" expanded?="{{model.expanded}}"
                  on-replay="{{onReplayCurrentTrack}}"></track-list>
      <control-panel id="audioController"
                     on-next-clicked="{{onControllerNextClicked}}"
                     on-previous-clicked="{{onControllerPreviousClicked}}">
      </control-panel>
      <audio id="audio"></audio>
    </template>
  </polymer-element>

  <div class="audio-player">
    <!-- Place the audio player. -->
    <audio-player></audio-player>
  </div>
</body>
</html>