@webitel/ui-sdk 24.6.56 → 24.6.58
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/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +13095 -13090
- package/dist/ui-sdk.umd.cjs +17 -17
- package/package.json +1 -1
- package/src/components/wt-player/wt-player.vue +23 -10
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
- package/src/mixins/validationMixin/useValidation.js +1 -0
- package/src/mixins/validationMixin/validationMixin.js +1 -0
package/package.json
CHANGED
|
@@ -41,6 +41,10 @@ export default {
|
|
|
41
41
|
type: Boolean,
|
|
42
42
|
default: false,
|
|
43
43
|
},
|
|
44
|
+
hideDuration: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
44
48
|
download: {
|
|
45
49
|
type: [String, Function, Boolean],
|
|
46
50
|
default: () => (url) => url.replace('/stream', '/download'),
|
|
@@ -107,11 +111,17 @@ export default {
|
|
|
107
111
|
const baseURL = this.$baseURL || process.env.BASE_URL || import.meta.env.BASE_URL;
|
|
108
112
|
const iconUrl = createPlyrURL(baseURL);
|
|
109
113
|
if (this.player) this.player.destroy();
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
const defaultControls = [
|
|
111
116
|
'play-large', 'play', 'progress', 'current-time',
|
|
112
|
-
'mute', 'volume', 'captions', 'settings',
|
|
113
|
-
'airplay', 'fullscreen',
|
|
117
|
+
'duration', 'mute', 'volume', 'captions', 'settings',
|
|
118
|
+
'pip', 'airplay', 'fullscreen',
|
|
114
119
|
];
|
|
120
|
+
|
|
121
|
+
const controls = this.hideDuration
|
|
122
|
+
? defaultControls.filter(control => control !== 'duration')
|
|
123
|
+
: defaultControls;
|
|
124
|
+
|
|
115
125
|
if (this.download) controls.push('download');
|
|
116
126
|
this.player = new Plyr(this.$refs.player, {
|
|
117
127
|
// this.player = new Plyr('.wt-player__player', {
|
|
@@ -137,8 +147,9 @@ export default {
|
|
|
137
147
|
this.player.muted = false;
|
|
138
148
|
},
|
|
139
149
|
setupDownload() {
|
|
140
|
-
if (!this.download)
|
|
141
|
-
|
|
150
|
+
if (!this.download) {
|
|
151
|
+
this.setupPlayer();
|
|
152
|
+
} else if (typeof this.download === 'string') {
|
|
142
153
|
this.player.download = this.download;
|
|
143
154
|
} else if (typeof this.download === 'function') {
|
|
144
155
|
this.player.download = this.download(this.src);
|
|
@@ -188,13 +199,15 @@ export default {
|
|
|
188
199
|
box-shadow: var(--elevation-10);
|
|
189
200
|
}
|
|
190
201
|
|
|
191
|
-
.plyr__controls .plyr__control
|
|
202
|
+
.plyr__controls > .plyr__control,
|
|
203
|
+
.plyr__controls > .plyr__controls__item > .plyr__control {
|
|
192
204
|
padding: var(--plyr-controls-icon-padding);
|
|
205
|
+
}
|
|
193
206
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
207
|
+
.plyr__controls > .plyr__control > svg,
|
|
208
|
+
.plyr__controls > .plyr__controls__item > .plyr__control > svg {
|
|
209
|
+
width: var(--plyr-controls-icon-size);
|
|
210
|
+
height: var(--plyr-controls-icon-size);
|
|
198
211
|
}
|
|
199
212
|
|
|
200
213
|
.plyr__control--overlaid svg {
|
package/src/locale/en/en.js
CHANGED
|
@@ -255,6 +255,7 @@ export default {
|
|
|
255
255
|
minLength: 'Quantity of characters should not be less than',
|
|
256
256
|
url: 'Should look like url',
|
|
257
257
|
websocketValidator: 'Should look like WebSocket url',
|
|
258
|
+
isRegExpMatched: 'Password must match the regular expression:',
|
|
258
259
|
regExpValidator: 'This regular expression is not valid',
|
|
259
260
|
domainValidator: 'Incorrect domain',
|
|
260
261
|
decimalValidator: 'Decimal precision should be no more than { count } places',
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -253,6 +253,7 @@ export default {
|
|
|
253
253
|
minLength: 'Количество символов не должно быть меньше, чем',
|
|
254
254
|
url: 'Необходимо ввести корректный url-адрес',
|
|
255
255
|
websocketValidator: 'Необходимо ввести корректный WebSocket url-адрес',
|
|
256
|
+
isRegExpMatched: 'Пароль должен соответствовать регулярному выражению:',
|
|
256
257
|
regExpValidator: 'Не правильное регулярное выражение',
|
|
257
258
|
domainValidator: 'Неправильный домен',
|
|
258
259
|
decimalValidator: 'Количество десятичных знаков не должно быть больше { count }',
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -253,6 +253,7 @@ export default {
|
|
|
253
253
|
minLength: 'Кількість символів повинна бути не меншою, ніж',
|
|
254
254
|
url: 'Необхідно ввести правильну url-адресу',
|
|
255
255
|
websocketValidator: 'Необхідно ввести правильну WebSocket url-адресу',
|
|
256
|
+
isRegExpMatched: 'Пароль має відповідати регулярному виразу:',
|
|
256
257
|
regExpValidator: 'Не правильний регулярний вираз',
|
|
257
258
|
domainValidator: 'Невірний домен',
|
|
258
259
|
decimalValidator: 'Кількість десяткових знаків не повинна бути більше { count }',
|
|
@@ -41,6 +41,7 @@ export function useValidation({
|
|
|
41
41
|
else if (v.value.decimalValidator?.$invalid) validationText = `${t('validation.decimalValidator')} ${v.value.decimalValidator.$params.count}`;
|
|
42
42
|
else if (v.value.websocketValidator?.$invalid) validationText = `${t('validation.websocketValidator')}`;
|
|
43
43
|
else if (v.value.integer?.$invalid) validationText = `${t('validation.integer')}`;
|
|
44
|
+
else if (v.value.isRegExpMatched?.$invalid) validationText = v.value.isRegExpMatched?.$params?.errorMessage || `${t('validation.isRegExpMatched')} ${v.value.isRegExpMatched?.$params?.regExp}`;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
if (customValidators && customValidators.value) {
|
|
@@ -36,6 +36,7 @@ export default {
|
|
|
36
36
|
else if (this.v.decimalValidator?.$invalid) validationText = `${this.$t('validation.decimalValidator')} ${this.v.decimalValidator.$params.count}`;
|
|
37
37
|
else if (this.v.websocketValidator?.$invalid) validationText = `${this.$t('validation.websocketValidator')}`;
|
|
38
38
|
else if (this.v.integer?.$invalid) validationText = `${this.$t('validation.integer')}`;
|
|
39
|
+
else if (this.v.isRegExpMatched?.$invalid) validationText = this.v.isRegExpMatched?.$params?.errorMessage || `${t('validation.isRegExpMatched')} ${this.v.isRegExpMatched?.$params?.regExp}`;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
for (const { name, text } of this.customValidators) {
|