@webitel/ui-sdk 24.6.56 → 24.6.57

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "24.6.56",
3
+ "version": "24.6.57",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -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
- const controls = [
114
+
115
+ const defaultControls = [
111
116
  'play-large', 'play', 'progress', 'current-time',
112
- 'mute', 'volume', 'captions', 'settings', 'pip',
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) this.setupPlayer();
141
- else if (typeof this.download === 'string') {
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
- svg {
195
- width: var(--plyr-controls-icon-size);
196
- height: var(--plyr-controls-icon-size);
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 {