@webitel/ui-sdk 24.4.37 → 24.4.38

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.4.37",
3
+ "version": "24.4.38",
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
117
  'duration', 'mute', 'volume', 'captions', 'settings',
113
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', {