@mux/mux-player 0.1.0-beta.21
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/CHANGELOG.md +281 -0
- package/LICENSE +9 -0
- package/README.md +231 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/dialog.ts.html +247 -0
- package/coverage/lcov-report/src/errors.ts.html +574 -0
- package/coverage/lcov-report/src/helpers.ts.html +478 -0
- package/coverage/lcov-report/src/html.ts.html +580 -0
- package/coverage/lcov-report/src/index.html +251 -0
- package/coverage/lcov-report/src/index.ts.html +2941 -0
- package/coverage/lcov-report/src/logger.ts.html +163 -0
- package/coverage/lcov-report/src/media-chrome/dialog.ts.html +661 -0
- package/coverage/lcov-report/src/media-chrome/index.html +131 -0
- package/coverage/lcov-report/src/media-chrome/time-display.ts.html +295 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/airplay.svg.html +109 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/captions-off.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/captions-on.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/fullscreen-enter.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/fullscreen-exit.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/index.html +326 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/pause.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/pip-enter.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/pip-exit.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/play.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/seek-backward.svg.html +124 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/seek-forward.svg.html +124 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-high.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-low.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-medium.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-off.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons.ts.html +184 -0
- package/coverage/lcov-report/src/media-theme-mux/index.html +146 -0
- package/coverage/lcov-report/src/media-theme-mux/media-theme-mux.ts.html +1279 -0
- package/coverage/lcov-report/src/media-theme-mux/styles.css.html +586 -0
- package/coverage/lcov-report/src/styles.css.html +211 -0
- package/coverage/lcov-report/src/template.ts.html +463 -0
- package/coverage/lcov-report/src/utils.ts.html +385 -0
- package/coverage/lcov-report/src/video-api.ts.html +979 -0
- package/coverage/lcov.info +4058 -0
- package/dist/index.cjs.js +1432 -0
- package/dist/index.mjs +709 -0
- package/dist/mux-player.js +1478 -0
- package/dist/mux-player.mjs +1478 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/dialog.d.ts +6 -0
- package/dist/types/errors.d.ts +6 -0
- package/dist/types/helpers.d.ts +26 -0
- package/dist/types/html.d.ts +18 -0
- package/dist/types/index.d.ts +199 -0
- package/dist/types/logger.d.ts +5 -0
- package/dist/types/media-chrome/dialog.d.ts +12 -0
- package/dist/types/media-chrome/time-display.d.ts +9 -0
- package/dist/types/media-theme-mux/icons.d.ts +15 -0
- package/dist/types/media-theme-mux/media-theme-mux.d.ts +29 -0
- package/dist/types/template.d.ts +5 -0
- package/dist/types/utils.d.ts +10 -0
- package/dist/types/video-api.d.ts +64 -0
- package/dist/types-ts3.4/dialog.d.ts +6 -0
- package/dist/types-ts3.4/errors.d.ts +6 -0
- package/dist/types-ts3.4/helpers.d.ts +26 -0
- package/dist/types-ts3.4/html.d.ts +18 -0
- package/dist/types-ts3.4/index.d.ts +180 -0
- package/dist/types-ts3.4/logger.d.ts +5 -0
- package/dist/types-ts3.4/media-chrome/dialog.d.ts +12 -0
- package/dist/types-ts3.4/media-chrome/time-display.d.ts +9 -0
- package/dist/types-ts3.4/media-theme-mux/icons.d.ts +15 -0
- package/dist/types-ts3.4/media-theme-mux/media-theme-mux.d.ts +29 -0
- package/dist/types-ts3.4/template.d.ts +5 -0
- package/dist/types-ts3.4/utils.d.ts +10 -0
- package/dist/types-ts3.4/video-api.d.ts +53 -0
- package/lang/en.json +32 -0
- package/lang/nl.json +31 -0
- package/package.json +107 -0
- package/src/dialog.ts +54 -0
- package/src/errors.ts +163 -0
- package/src/helpers.ts +131 -0
- package/src/html.ts +165 -0
- package/src/index.ts +952 -0
- package/src/logger.ts +26 -0
- package/src/media-chrome/dialog.ts +192 -0
- package/src/media-chrome/time-display.ts +70 -0
- package/src/media-theme-mux/icons/airplay.svg +8 -0
- package/src/media-theme-mux/icons/captions-off.svg +5 -0
- package/src/media-theme-mux/icons/captions-on.svg +5 -0
- package/src/media-theme-mux/icons/fullscreen-enter.svg +5 -0
- package/src/media-theme-mux/icons/fullscreen-exit.svg +5 -0
- package/src/media-theme-mux/icons/pause.svg +5 -0
- package/src/media-theme-mux/icons/pip-enter.svg +5 -0
- package/src/media-theme-mux/icons/pip-exit.svg +5 -0
- package/src/media-theme-mux/icons/play.svg +5 -0
- package/src/media-theme-mux/icons/seek-backward.svg +13 -0
- package/src/media-theme-mux/icons/seek-forward.svg +13 -0
- package/src/media-theme-mux/icons/volume-high.svg +6 -0
- package/src/media-theme-mux/icons/volume-low.svg +6 -0
- package/src/media-theme-mux/icons/volume-medium.svg +6 -0
- package/src/media-theme-mux/icons/volume-off.svg +6 -0
- package/src/media-theme-mux/icons.ts +33 -0
- package/src/media-theme-mux/media-theme-mux.ts +398 -0
- package/src/media-theme-mux/styles.css +167 -0
- package/src/styles.css +42 -0
- package/src/template.ts +126 -0
- package/src/types.d.ts +52 -0
- package/src/utils.ts +100 -0
- package/src/video-api.ts +298 -0
- package/test/errors.test.js +169 -0
- package/test/helpers.test.js +78 -0
- package/test/player.test.js +696 -0
- package/test/template.test.js +70 -0
- package/test/utils.test.js +21 -0
- package/test/web-test-runner.config.mjs +29 -0
- package/tsconfig.json +21 -0
package/src/logger.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { i18n } from './utils';
|
|
2
|
+
import { getPlayerVersion } from './helpers';
|
|
3
|
+
import type { DevlogOptions } from './types';
|
|
4
|
+
|
|
5
|
+
const prefix = `[mux-player ${getPlayerVersion()}]`;
|
|
6
|
+
|
|
7
|
+
export function log(...args: any[]) {
|
|
8
|
+
console.log(prefix, ...args);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function warn(...args: any[]) {
|
|
12
|
+
console.warn(prefix, ...args);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function error(...args: any[]) {
|
|
16
|
+
console.error(prefix, ...args);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function devlog(opts: DevlogOptions) {
|
|
20
|
+
let message = opts.message ?? '';
|
|
21
|
+
if (opts.file) {
|
|
22
|
+
const githubErrorsBase = 'https://github.com/muxinc/elements/blob/main/errors/';
|
|
23
|
+
message += ` ${i18n(`Read more: `)}\n${githubErrorsBase}${opts.file}`;
|
|
24
|
+
}
|
|
25
|
+
warn(message);
|
|
26
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/* Inspired by HTMLDialogElement &
|
|
2
|
+
https://github.com/GoogleChrome/dialog-polyfill/blob/master/index.js */
|
|
3
|
+
|
|
4
|
+
const styles = `
|
|
5
|
+
:host {
|
|
6
|
+
z-index: 100;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
color: #fff;
|
|
17
|
+
line-height: 18px;
|
|
18
|
+
font-family: Arial, sans-serif;
|
|
19
|
+
padding: var(--media-dialog-backdrop-padding, 0);
|
|
20
|
+
background: var(--media-dialog-backdrop-background,
|
|
21
|
+
linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))
|
|
22
|
+
);
|
|
23
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
24
|
+
transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;
|
|
25
|
+
transform: var(--media-dialog-transform-open, none) !important;
|
|
26
|
+
visibility: visible !important;
|
|
27
|
+
opacity: 1 !important;
|
|
28
|
+
pointer-events: auto !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host(:not([open])) {
|
|
32
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
33
|
+
transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;
|
|
34
|
+
transform: var(--media-dialog-transform-close, none) !important;
|
|
35
|
+
visibility: hidden !important;
|
|
36
|
+
opacity: 0 !important;
|
|
37
|
+
pointer-events: none !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
Only show outline when keyboard focusing.
|
|
42
|
+
https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
|
|
43
|
+
:host-context support is bad https://caniuse.com/mdn-css_selectors_host-context
|
|
44
|
+
*/
|
|
45
|
+
:host-context([media-keyboard-control]) ::slotted(:focus),
|
|
46
|
+
:host-context([media-keyboard-control]) :focus {
|
|
47
|
+
box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dialog {
|
|
51
|
+
position: relative;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
background: var(--media-dialog-background, none);
|
|
54
|
+
padding: var(--media-dialog-padding, 10px);
|
|
55
|
+
width: min(320px, 100%);
|
|
56
|
+
word-wrap: break-word;
|
|
57
|
+
max-height: 100%;
|
|
58
|
+
overflow: auto;
|
|
59
|
+
text-align: center;
|
|
60
|
+
line-height: 1.4;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
const template = document.createElement('template');
|
|
65
|
+
template.innerHTML = `
|
|
66
|
+
<style>
|
|
67
|
+
${styles}
|
|
68
|
+
</style>
|
|
69
|
+
|
|
70
|
+
<div class="dialog">
|
|
71
|
+
<slot></slot>
|
|
72
|
+
</div>
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
class MediaDialog extends HTMLElement {
|
|
76
|
+
static styles: string = styles;
|
|
77
|
+
static template: HTMLTemplateElement = template;
|
|
78
|
+
static observedAttributes = ['open'];
|
|
79
|
+
|
|
80
|
+
_previouslyFocusedElement?: Element | null;
|
|
81
|
+
|
|
82
|
+
constructor() {
|
|
83
|
+
super();
|
|
84
|
+
|
|
85
|
+
this.attachShadow({ mode: 'open' });
|
|
86
|
+
this.shadowRoot?.appendChild((this.constructor as any).template.content.cloneNode(true));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
show() {
|
|
90
|
+
this.setAttribute('open', '');
|
|
91
|
+
this.dispatchEvent(new CustomEvent('open', { composed: true, bubbles: true }));
|
|
92
|
+
focus(this);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
close() {
|
|
96
|
+
// If already closed, don't re-emit value (circular due to attributeChangedCallback()) (CJP)
|
|
97
|
+
if (!this.hasAttribute('open')) return;
|
|
98
|
+
this.removeAttribute('open');
|
|
99
|
+
this.dispatchEvent(new CustomEvent('close', { composed: true, bubbles: true }));
|
|
100
|
+
restoreFocus(this);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string) {
|
|
104
|
+
if (attrName === 'open' && oldValue !== newValue) {
|
|
105
|
+
newValue != null ? this.show() : this.close();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
connectedCallback() {
|
|
110
|
+
if (!this.hasAttribute('role')) {
|
|
111
|
+
this.setAttribute('role', 'dialog');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (this.hasAttribute('open')) {
|
|
115
|
+
focus(this);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function focus(el: MediaDialog) {
|
|
121
|
+
const initFocus = new CustomEvent('initfocus', { composed: true, bubbles: true, cancelable: true });
|
|
122
|
+
el.dispatchEvent(initFocus);
|
|
123
|
+
|
|
124
|
+
// If `event.preventDefault()` was called in a listener prevent focusing.
|
|
125
|
+
if (initFocus.defaultPrevented) return;
|
|
126
|
+
|
|
127
|
+
// Find element with `autofocus` attribute, or fall back to the first form/tabindex control.
|
|
128
|
+
let target: Element | null | undefined = el.querySelector('[autofocus]:not([disabled])');
|
|
129
|
+
if (!target && (el as HTMLElement).tabIndex >= 0) {
|
|
130
|
+
target = el;
|
|
131
|
+
}
|
|
132
|
+
if (!target) {
|
|
133
|
+
target = findFocusableElementWithin(el.shadowRoot);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
el._previouslyFocusedElement = document.activeElement;
|
|
137
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
138
|
+
document.activeElement.blur();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
el.addEventListener(
|
|
142
|
+
'transitionend',
|
|
143
|
+
() => {
|
|
144
|
+
if (target instanceof HTMLElement) {
|
|
145
|
+
target.focus({ preventScroll: true });
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{ once: true }
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function findFocusableElementWithin(hostElement: Element | ShadowRoot | null | undefined): Element | null | undefined {
|
|
153
|
+
// Note that this is 'any focusable area'. This list is probably not exhaustive, but the
|
|
154
|
+
// alternative involves stepping through and trying to focus everything.
|
|
155
|
+
const opts = ['button', 'input', 'keygen', 'select', 'textarea'];
|
|
156
|
+
const query = opts.map(function (el) {
|
|
157
|
+
return el + ':not([disabled])';
|
|
158
|
+
});
|
|
159
|
+
// TODO(samthor): tabindex values that are not numeric are not focusable.
|
|
160
|
+
query.push('[tabindex]:not([disabled]):not([tabindex=""])'); // tabindex != "", not disabled
|
|
161
|
+
let target = hostElement?.querySelector(query.join(', '));
|
|
162
|
+
|
|
163
|
+
if (!target && 'attachShadow' in Element.prototype) {
|
|
164
|
+
// If we haven't found a focusable target, see if the host element contains an element
|
|
165
|
+
// which has a shadowRoot.
|
|
166
|
+
// Recursively search for the first focusable item in shadow roots.
|
|
167
|
+
const elems = hostElement?.querySelectorAll('*') || [];
|
|
168
|
+
for (let i = 0; i < elems.length; i++) {
|
|
169
|
+
if (elems[i].tagName && elems[i].shadowRoot) {
|
|
170
|
+
target = findFocusableElementWithin(elems[i].shadowRoot);
|
|
171
|
+
if (target) {
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return target;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function restoreFocus(el: MediaDialog) {
|
|
182
|
+
if (el._previouslyFocusedElement instanceof HTMLElement) {
|
|
183
|
+
el._previouslyFocusedElement.focus();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (!globalThis.customElements.get('media-dialog')) {
|
|
188
|
+
globalThis.customElements.define('media-dialog', MediaDialog);
|
|
189
|
+
(globalThis as any).MediaDialog = MediaDialog;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export default MediaDialog;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const styles = `
|
|
2
|
+
:host {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
media-time-display {
|
|
6
|
+
color: inherit;
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
const template = document.createElement('template');
|
|
11
|
+
template.innerHTML = `
|
|
12
|
+
<style>
|
|
13
|
+
${styles}
|
|
14
|
+
</style>
|
|
15
|
+
<media-time-display show-duration></media-time-display>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
const ButtonPressedKeys = ['Enter', ' '];
|
|
19
|
+
|
|
20
|
+
class MxpTimeDisplay extends HTMLElement {
|
|
21
|
+
static styles: string = styles;
|
|
22
|
+
static template: HTMLTemplateElement = template;
|
|
23
|
+
timeDisplayEl: HTMLElement | null | undefined;
|
|
24
|
+
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
this.attachShadow({ mode: 'open' });
|
|
29
|
+
this.shadowRoot?.appendChild((this.constructor as any).template.content.cloneNode(true));
|
|
30
|
+
this.timeDisplayEl = this.shadowRoot?.querySelector('media-time-display');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
toggleTimeDisplay() {
|
|
34
|
+
if (this.timeDisplayEl?.hasAttribute('remaining')) {
|
|
35
|
+
this.timeDisplayEl?.removeAttribute('remaining');
|
|
36
|
+
} else {
|
|
37
|
+
this.timeDisplayEl?.setAttribute('remaining', '');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
const keyUpHandler = (e: KeyboardEvent) => {
|
|
43
|
+
const { key } = e;
|
|
44
|
+
if (!ButtonPressedKeys.includes(key)) {
|
|
45
|
+
this.removeEventListener('keyup', keyUpHandler);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
this.toggleTimeDisplay();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
this.addEventListener('keydown', (e) => {
|
|
53
|
+
const { metaKey, altKey, key } = e;
|
|
54
|
+
if (metaKey || altKey || !ButtonPressedKeys.includes(key)) {
|
|
55
|
+
this.removeEventListener('keyup', keyUpHandler);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.addEventListener('keyup', keyUpHandler);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
this.addEventListener('click', this.toggleTimeDisplay);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!globalThis.customElements.get('mxp-time-display')) {
|
|
66
|
+
globalThis.customElements.define('mxp-time-display', MxpTimeDisplay);
|
|
67
|
+
(globalThis as any).MxpTimeDisplay = MxpTimeDisplay;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export default MxpTimeDisplay;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 20 18" slot="airplay">
|
|
2
|
+
<path
|
|
3
|
+
d="M10.19 11.22a.25.25 0 0 0-.38 0l-5.46 6.37a.25.25 0 0 0 .19.41h10.92a.25.25 0 0 0 .19-.41Z"
|
|
4
|
+
/>
|
|
5
|
+
<path
|
|
6
|
+
d="M19 0H1a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h2.94L5 13.75H1.25V1.25h17.5v12.5H15L16.06 15H19a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1Z"
|
|
7
|
+
/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 20 18" slot="off">
|
|
2
|
+
<path
|
|
3
|
+
d="M19.83 2.68a2.58 2.58 0 0 0-2.3-2.5C15.72.06 12.86 0 10 0S4.28.06 2.47.18a2.58 2.58 0 0 0-2.3 2.5 115.86 115.86 0 0 0 0 12.64 2.58 2.58 0 0 0 2.3 2.5c1.81.12 4.67.18 7.53.18s5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5 115.86 115.86 0 0 0 0-12.64Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18s-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11 122.5 122.5 0 0 1 0-12.42 1.11 1.11 0 0 1 .91-1.11C4.24 1.57 7 1.5 10 1.5s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11 122.5 122.5 0 0 1 0 12.42ZM7.84 11a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.1 2.1 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42 1.81 1.81 0 0 1 .73-.16 1.68 1.68 0 0 1 .7.14 1.39 1.39 0 0 1 .51.39l1.08-.89a2.18 2.18 0 0 0-.47-.44A2.81 2.81 0 0 0 8.4 6a2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0A4.08 4.08 0 0 0 5.88 6a3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06 3.27 3.27 0 0 0 1.09.67 3.85 3.85 0 0 0 1.38.23 3.2 3.2 0 0 0 1.28-.27 2.49 2.49 0 0 0 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18A1.54 1.54 0 0 1 13 11a1.69 1.69 0 0 1-.57-.42A2.12 2.12 0 0 1 12 10a2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58 1.71 1.71 0 0 1 .7.14 1.39 1.39 0 0 1 .51.39L16 6.73a2.43 2.43 0 0 0-.47-.44A3.22 3.22 0 0 0 15 6a3 3 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0A4.06 4.06 0 0 0 12.5 6a3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38 2.93 2.93 0 0 0 .72 1.06 3.17 3.17 0 0 0 1.09.67 3.83 3.83 0 0 0 1.37.23 3.16 3.16 0 0 0 1.28-.27 2.45 2.45 0 0 0 1-.83L15 10.51a1.49 1.49 0 0 1-.54.49Z"
|
|
4
|
+
/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 20 18" slot="on">
|
|
2
|
+
<path
|
|
3
|
+
d="M19.83 2.68a2.58 2.58 0 0 0-2.3-2.5C13.91-.06 6.09-.06 2.47.18a2.58 2.58 0 0 0-2.3 2.5 115.86 115.86 0 0 0 0 12.64 2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5 115.86 115.86 0 0 0 0-12.64ZM8.42 12.78a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27A4 4 0 0 1 4 12a3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64A3.53 3.53 0 0 1 4 6.26a3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 .67.06 4.57 4.57 0 0 1 .68.18 3.59 3.59 0 0 1 .64.34 2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1 2.74 2.74 0 0 0 .16 1 2.39 2.39 0 0 0 .46.77 2.07 2.07 0 0 0 .67.5 2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 .67.06 4.27 4.27 0 0 1 .68.18 3.59 3.59 0 0 1 .64.34 2.46 2.46 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 3 3 0 0 0-.16 1 3 3 0 0 0 .16 1 2.58 2.58 0 0 0 .46.77 2.07 2.07 0 0 0 .67.5 2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"
|
|
4
|
+
/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 18 18" slot="enter">
|
|
2
|
+
<path
|
|
3
|
+
d="M17.25 11.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 0 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM5.75 16.5H1.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 0 0 0-1.5Zm0-16.5h-5A.76.76 0 0 0 0 .75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V1.5h4.25A.76.76 0 0 0 6.5.75.76.76 0 0 0 5.75 0Z"
|
|
4
|
+
/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 18 18" slot="exit">
|
|
2
|
+
<path
|
|
3
|
+
d="M17.25 11.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 0 0 1.5 0V13h4.25a.75.75 0 0 0 0-1.5Zm-5-5h5a.75.75 0 0 0 0-1.5H13V.75a.75.75 0 0 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 0 0 0 1.5H5v4.25a.75.75 0 0 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5A.76.76 0 0 0 5 .75V5H.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 5.75 0Z"
|
|
4
|
+
/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 16 18" slot="backward">
|
|
2
|
+
<path
|
|
3
|
+
d="M8.75 3.42H4.68l2.14-2.14A.75.75 0 0 0 5.76.22L2.22 3.75a.77.77 0 0 0 0 1.07l3.54 3.53a.75.75 0 0 0 1.06 0 .75.75 0 0 0 0-1.06L4.45 4.92h4.3A5.75 5.75 0 0 1 11 16a.75.75 0 0 0 .29 1.44.72.72 0 0 0 .29-.06A7.25 7.25 0 0 0 8.75 3.42Z"
|
|
4
|
+
/>
|
|
5
|
+
<text
|
|
6
|
+
class="value"
|
|
7
|
+
transform="translate(.6 17.8)"
|
|
8
|
+
style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
|
|
9
|
+
>
|
|
10
|
+
{{value}}
|
|
11
|
+
</text>
|
|
12
|
+
<path style="fill: none" d="M0 0h16v18H0z" />
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 16 18" slot="forward">
|
|
2
|
+
<path
|
|
3
|
+
d="M7.25 3.42h4.07L9.18 1.28A.75.75 0 0 1 10.24.22l3.54 3.53a.77.77 0 0 1 0 1.07l-3.54 3.53a.75.75 0 0 1-1.06 0 .75.75 0 0 1 0-1.06l2.37-2.37h-4.3A5.75 5.75 0 0 0 5 16a.75.75 0 0 1-.29 1.44.72.72 0 0 1-.29-.06A7.25 7.25 0 0 1 7.25 3.42Z"
|
|
4
|
+
/>
|
|
5
|
+
<text
|
|
6
|
+
class="value"
|
|
7
|
+
transform="translate(6.5 17.8)"
|
|
8
|
+
style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
|
|
9
|
+
>
|
|
10
|
+
{{value}}
|
|
11
|
+
</text>
|
|
12
|
+
<path style="fill: none" d="M0 0h16v18H0z" />
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 18 18" slot="high">
|
|
2
|
+
<path
|
|
3
|
+
d="m8.14 1.86-4 4a.49.49 0 0 1-.35.14H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V2.21a.5.5 0 0 0-.86-.35ZM10.88.3v1.52A7.52 7.52 0 0 1 16.47 9a7.52 7.52 0 0 1-5.59 7.18v1.52A9 9 0 0 0 18 9 9 9 0 0 0 10.88.3ZM14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66A5.49 5.49 0 0 0 14.44 9Z"
|
|
4
|
+
/>
|
|
5
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 18 18" slot="low">
|
|
2
|
+
<path
|
|
3
|
+
d="m8.14 1.86-4 4a.49.49 0 0 1-.35.14H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V2.21a.5.5 0 0 0-.86-.35ZM14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66A5.49 5.49 0 0 0 14.44 9Z"
|
|
4
|
+
/>
|
|
5
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 18 18" slot="medium">
|
|
2
|
+
<path
|
|
3
|
+
d="m8.14 1.86-4 4a.49.49 0 0 1-.35.14H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V2.21a.5.5 0 0 0-.86-.35ZM14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66A5.49 5.49 0 0 0 14.44 9Z"
|
|
4
|
+
/>
|
|
5
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg aria-hidden="true" viewBox="0 0 18 18" slot="off">
|
|
2
|
+
<path
|
|
3
|
+
d="m0 1.05 4.48 4.47-.33.33a.49.49 0 0 1-.36.15H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.48.48 0 0 0 .36.15.5.5 0 0 0 .5-.5v-5.75l4.67 4.66a7.71 7.71 0 0 1-2.79 1.47v1.52a9.32 9.32 0 0 0 3.87-1.91L17 18l1-1L1.06 0Zm5.36 5.36L7.75 8.8V14L5 11.26a1.74 1.74 0 0 0-1.24-.51H1.25v-3.5h2.54A1.74 1.74 0 0 0 5 6.74ZM16.47 9a7.19 7.19 0 0 1-.89 3.47l1.11 1.1A8.64 8.64 0 0 0 18 9 9 9 0 0 0 10.88.3v1.52A7.52 7.52 0 0 1 16.47 9ZM9 5.88V2.21a.5.5 0 0 0-.5-.5.48.48 0 0 0-.36.15L6.56 3.44ZM12.91 9a4.28 4.28 0 0 1-.07.72l1.22 1.22A5.2 5.2 0 0 0 14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66A4 4 0 0 1 12.91 9Z"
|
|
4
|
+
/>
|
|
5
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { createTemplateInstance } from '../html';
|
|
3
|
+
import airplayIcon from './icons/airplay.svg';
|
|
4
|
+
import captionsOffIcon from './icons/captions-off.svg';
|
|
5
|
+
import captionsOnIcon from './icons/captions-on.svg';
|
|
6
|
+
import fullscreenEnter from './icons/fullscreen-enter.svg';
|
|
7
|
+
import fullscreenExit from './icons/fullscreen-exit.svg';
|
|
8
|
+
import pause from './icons/pause.svg';
|
|
9
|
+
import pipEnter from './icons/pip-enter.svg';
|
|
10
|
+
import pipExit from './icons/pip-exit.svg';
|
|
11
|
+
import play from './icons/play.svg';
|
|
12
|
+
import seekBackward from './icons/seek-backward.svg';
|
|
13
|
+
import seekForward from './icons/seek-forward.svg';
|
|
14
|
+
import volumeHigh from './icons/volume-high.svg';
|
|
15
|
+
import volumeLow from './icons/volume-low.svg';
|
|
16
|
+
import volumeMedium from './icons/volume-medium.svg';
|
|
17
|
+
import volumeOff from './icons/volume-off.svg';
|
|
18
|
+
|
|
19
|
+
export const Airplay = () => createTemplateInstance(airplayIcon);
|
|
20
|
+
export const CaptionsOff = () => createTemplateInstance(captionsOffIcon);
|
|
21
|
+
export const CaptionsOn = () => createTemplateInstance(captionsOnIcon);
|
|
22
|
+
export const FullscreenEnter = () => createTemplateInstance(fullscreenEnter);
|
|
23
|
+
export const FullscreenExit = () => createTemplateInstance(fullscreenExit);
|
|
24
|
+
export const Pause = () => createTemplateInstance(pause);
|
|
25
|
+
export const PipEnter = () => createTemplateInstance(pipEnter);
|
|
26
|
+
export const PipExit = () => createTemplateInstance(pipExit);
|
|
27
|
+
export const Play = () => createTemplateInstance(play);
|
|
28
|
+
export const SeekBackward = (p: any) => createTemplateInstance(seekBackward, p);
|
|
29
|
+
export const SeekForward = (p: any) => createTemplateInstance(seekForward, p);
|
|
30
|
+
export const VolumeHigh = () => createTemplateInstance(volumeHigh);
|
|
31
|
+
export const VolumeLow = () => createTemplateInstance(volumeLow);
|
|
32
|
+
export const VolumeMedium = () => createTemplateInstance(volumeMedium);
|
|
33
|
+
export const VolumeOff = () => createTemplateInstance(volumeOff);
|