@outbook/webcomponents-player-timeline 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/player-timeline.js +42 -32
package/package.json
CHANGED
package/player-timeline.js
CHANGED
|
@@ -177,43 +177,52 @@ function ComponentPlayerTimeline(element) {
|
|
|
177
177
|
></div>
|
|
178
178
|
`;
|
|
179
179
|
})}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
${totalTime > 0
|
|
181
|
+
? html`
|
|
182
|
+
<div
|
|
183
|
+
class="player-timeline__completed"
|
|
184
|
+
style="width:${isDragging ? progressVisible : progress}%;"
|
|
185
|
+
>
|
|
186
|
+
<div class="player-timeline__thumb"></div>
|
|
187
|
+
</div>
|
|
188
|
+
`
|
|
189
|
+
: nothing}
|
|
186
190
|
</div>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
191
|
+
${totalTime > 0
|
|
192
|
+
? html`
|
|
193
|
+
<div
|
|
194
|
+
class="player-timeline__track-real"
|
|
195
|
+
@click="${handleTimeline}"
|
|
196
|
+
@keydown="${handleTimeline}"
|
|
197
|
+
@mousemove="${handleThumbMouseMove}"
|
|
198
|
+
@touchmove="${ifDefined(
|
|
199
|
+
isTouch() ? handleThumbTouchMove : undefined
|
|
200
|
+
)}"
|
|
201
|
+
@mouseout="${handleTimelineOut}"
|
|
202
|
+
@mousedown="${handleThumbMouseDown}"
|
|
203
|
+
@touchstart="${ifDefined(
|
|
204
|
+
isTouch() ? handleThumbMouseDown : undefined
|
|
205
|
+
)}"
|
|
206
|
+
@mouseup="${handleThumbMouseUp}"
|
|
207
|
+
@touchend="${ifDefined(
|
|
208
|
+
isTouch() ? handleThumbTouchEnd : undefined
|
|
209
|
+
)}"
|
|
210
|
+
aria-valuemin="0"
|
|
211
|
+
aria-valuemax="100"
|
|
212
|
+
aria-valuenow="${progress}"
|
|
213
|
+
aria-valuetext="${a11yTime({ time: currentTime, literals })}"
|
|
214
|
+
role="slider"
|
|
215
|
+
tabindex="0"
|
|
216
|
+
></div>
|
|
217
|
+
`
|
|
218
|
+
: nothing}
|
|
209
219
|
</div>
|
|
210
220
|
<div class="player-timeline__numbers">
|
|
211
221
|
<div>${formatTime(currentTime)}</div>
|
|
212
222
|
<div>${formatTime(totalTime)}</div>
|
|
213
223
|
</div>
|
|
214
|
-
${timePosition
|
|
215
|
-
?
|
|
216
|
-
: html`
|
|
224
|
+
${timePosition && totalTime > 0
|
|
225
|
+
? html`
|
|
217
226
|
<div
|
|
218
227
|
class="player-timeline__tooltip"
|
|
219
228
|
style="--timeline-tooltip-position: ${timePosition.left}px;"
|
|
@@ -231,7 +240,8 @@ function ComponentPlayerTimeline(element) {
|
|
|
231
240
|
</span>
|
|
232
241
|
</div>
|
|
233
242
|
</div>
|
|
234
|
-
`
|
|
243
|
+
`
|
|
244
|
+
: nothing}
|
|
235
245
|
</div>
|
|
236
246
|
`;
|
|
237
247
|
}
|