@webitel/ui-sdk 25.12.26 → 25.12.28
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/{install-CrrAB4P5.js → install-Bqlm16sb.js} +14793 -15617
- package/dist/{plyr-C3Uj3y6H.js → plyr-Br33nnwi.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +949 -950
- package/dist/{vidstack-Bq6c3Bam-qlp5tBOT.js → vidstack-Bq6c3Bam-CxzFv3Ko.js} +17 -17
- package/dist/{vidstack-D2pY00kU-CgOqqLnl.js → vidstack-D2pY00kU-DcpelJcf.js} +22 -22
- package/dist/{vidstack-DDXt6fpN-BqBO9dqI.js → vidstack-DDXt6fpN-Cg0bEHId.js} +4 -4
- package/dist/{vidstack-D_-9AA6_-B_AxbMpy.js → vidstack-D_-9AA6_-bnYaKyO1.js} +1 -1
- package/dist/vidstack-DqAw8m9J-DdJYKLyM.js +29 -0
- package/dist/{vidstack-audio-BcC_A5EM.js → vidstack-audio-DduGjEcQ.js} +2 -2
- package/dist/{vidstack-dash-BIJxAfqI.js → vidstack-dash-CKzRjcLs.js} +3 -3
- package/dist/{vidstack-google-cast-DHfvKys1.js → vidstack-google-cast-BiPwnnpT.js} +10 -10
- package/dist/{vidstack-hls--7YShOeE.js → vidstack-hls-OkFNv20L.js} +32 -32
- package/dist/{vidstack-video-DS-N7qQ5.js → vidstack-video-CB59bElo.js} +8 -8
- package/dist/{vidstack-vimeo-BZB0pZh_.js → vidstack-vimeo-NoVxwrcD.js} +22 -22
- package/dist/{vidstack-youtube-1XqeoBGJ.js → vidstack-youtube-C1voQhH8.js} +29 -29
- package/dist/vuex.esm-bundler-C04hKLcf.js +950 -0
- package/package.json +2 -2
- package/src/components/wt-button/wt-button.vue +28 -4
- package/src/components/wt-vidstack-player/components/{panels/media-control-panel/components/buttons → buttons}/fullscreen-button.vue +1 -1
- package/src/components/wt-vidstack-player/components/{panels/media-control-panel/media-control-panel.vue → controls-group/controls-group.vue} +15 -12
- package/src/components/wt-vidstack-player/components/index.ts +6 -0
- package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +11 -36
- package/src/components/wt-vidstack-player/components/panels/media-controls-panel/components/buttons/fullscreen-button.vue +40 -0
- package/src/components/wt-vidstack-player/components/panels/media-controls-panel/components/buttons/play-button.vue +42 -0
- package/src/components/wt-vidstack-player/components/panels/{media-control-panel → media-controls-panel}/components/sliders/time-slider.vue +1 -1
- package/src/components/wt-vidstack-player/components/panels/media-controls-panel/media-controls-panel.vue +20 -0
- package/src/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue +89 -0
- package/src/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue +134 -0
- package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +1 -1
- package/src/components/wt-vidstack-player/components/recording-indicator/recording-indicator.vue +64 -0
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +23 -40
- package/src/modules/CallSession/index.ts +4 -0
- package/src/modules/CallSession/modules/ScreenSharing/screen-sharing.vue +85 -0
- package/src/modules/CallSession/modules/VideoCall/video-call.vue +165 -0
- package/src/modules/CallSession/types/ScreenSharingSession.ts +7 -0
- package/src/modules/CallSession/types/index.ts +4 -0
- package/src/plugins/primevue/theme/extend/player/player.js +2 -3
- package/types/components/wt-vidstack-player/components/controls-group/controls-group.vue.d.ts +12 -0
- package/types/components/wt-vidstack-player/components/index.d.ts +6 -0
- package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +17 -11
- package/types/components/wt-vidstack-player/components/panels/media-controls-panel/components/buttons/fullscreen-button.vue.d.ts +6 -0
- package/types/components/wt-vidstack-player/components/panels/media-controls-panel/media-controls-panel.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/components/panels/{screen-sharing-control-panel/screen-sharing-control-panel.vue.d.ts → screen-sharing-controls-panel/screen-sharing-controls-panel.vue.d.ts} +2 -3
- package/types/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue.d.ts +18 -0
- package/types/components/wt-vidstack-player/components/recording-indicator/recording-indicator.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +19 -15
- package/types/modules/CallSession/index.d.ts +3 -0
- package/types/modules/CallSession/modules/ScreenSharing/screen-sharing.vue.d.ts +16 -0
- package/types/modules/CallSession/modules/VideoCall/video-call.vue.d.ts +20 -0
- package/types/modules/CallSession/types/ScreenSharingSession.d.ts +7 -0
- package/types/modules/CallSession/types/index.d.ts +3 -0
- package/dist/vidstack-DqAw8m9J-DyYO78jE.js +0 -29
- package/src/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue +0 -195
- /package/src/components/wt-vidstack-player/components/{panels/media-control-panel/components/buttons → buttons}/play-button.vue +0 -0
- /package/src/components/wt-vidstack-player/components/panels/{media-control-panel → media-controls-panel}/components/time-group.vue +0 -0
- /package/src/{components/wt-vidstack-player → modules/CallSession}/types/ScreenshotStatus.ts +0 -0
- /package/types/components/wt-vidstack-player/components/{panels/media-control-panel/components/buttons → buttons}/fullscreen-button.vue.d.ts +0 -0
- /package/types/components/wt-vidstack-player/components/{panels/media-control-panel/components/buttons → buttons}/play-button.vue.d.ts +0 -0
- /package/types/components/wt-vidstack-player/components/panels/{media-control-panel/components/sliders/time-slider.vue.d.ts → media-controls-panel/components/buttons/play-button.vue.d.ts} +0 -0
- /package/types/components/wt-vidstack-player/components/panels/{media-control-panel/components/time-group.vue.d.ts → media-controls-panel/components/sliders/time-slider.vue.d.ts} +0 -0
- /package/types/components/wt-vidstack-player/components/panels/{media-control-panel/media-control-panel.vue.d.ts → media-controls-panel/components/time-group.vue.d.ts} +0 -0
- /package/types/{components/wt-vidstack-player → modules/CallSession}/types/ScreenshotStatus.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "25.12.
|
|
3
|
+
"version": "25.12.28",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@vuepic/vue-datepicker": "^4.5.1",
|
|
57
57
|
"@vueuse/components": "^13.0.0",
|
|
58
58
|
"@webitel/api-services": "^0.0.81",
|
|
59
|
-
"@webitel/styleguide": "^24.12.
|
|
59
|
+
"@webitel/styleguide": "^24.12.84",
|
|
60
60
|
"autosize": "^6.0.1",
|
|
61
61
|
"axios": "^1.8.3",
|
|
62
62
|
"clipboard-copy": "^4.0.1",
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
<script lang="ts" setup>
|
|
37
37
|
import type { ButtonProps } from 'primevue';
|
|
38
|
-
import {computed, defineEmits, defineProps, ref, useAttrs, watch} from 'vue';
|
|
39
|
-
import {useStore} from "vuex";
|
|
38
|
+
import { computed, defineEmits, defineProps, inject,ref, useAttrs, watch } from 'vue';
|
|
40
39
|
|
|
41
40
|
import { ButtonColor, ButtonVariant, ComponentSize, } from '../../enums';
|
|
42
41
|
|
|
@@ -81,9 +80,34 @@ const emit = defineEmits(['click']);
|
|
|
81
80
|
const attrs = useAttrs();
|
|
82
81
|
|
|
83
82
|
const showLoader = ref(false);
|
|
84
|
-
const store = useStore();
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
// @Ler24
|
|
85
|
+
// Compatibility mode for Vuex (old mode) and when there is no Vuex in project (new mode)
|
|
86
|
+
const store = ref(null);
|
|
87
|
+
|
|
88
|
+
const initStore = async () => {
|
|
89
|
+
try {
|
|
90
|
+
const vuex = await import('vuex');
|
|
91
|
+
store.value = vuex.useStore();
|
|
92
|
+
} catch (e) {
|
|
93
|
+
store.value = null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
initStore();
|
|
97
|
+
|
|
98
|
+
const injectDarkMode = inject('darkMode');
|
|
99
|
+
|
|
100
|
+
const darkMode = computed(() => {
|
|
101
|
+
if (injectDarkMode?.value) {
|
|
102
|
+
return injectDarkMode.value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (store?.value?.getters) {
|
|
106
|
+
return store?.value?.getters['appearance/DARK_MODE'] ?? false;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return false;
|
|
110
|
+
});
|
|
87
111
|
|
|
88
112
|
/**
|
|
89
113
|
* @author: @Opelsandr Palonnyi
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
21
|
import {defineEmits} from "vue";
|
|
22
22
|
|
|
23
|
-
import WtIconBtn from '
|
|
23
|
+
import WtIconBtn from '../../../wt-icon-btn/wt-icon-btn.vue';
|
|
24
24
|
|
|
25
25
|
const emit = defineEmits<{
|
|
26
26
|
'toggle': [value: boolean];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<media-controls-group
|
|
3
|
-
class="
|
|
4
|
-
:class="`
|
|
3
|
+
class="controls-group"
|
|
4
|
+
:class="`controls-group--${size}`"
|
|
5
5
|
>
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
<time-slider />
|
|
9
|
-
<time-group />
|
|
6
|
+
<div class="controls-group__actions">
|
|
7
|
+
<slot />
|
|
10
8
|
</div>
|
|
11
9
|
</media-controls-group>
|
|
12
10
|
</template>
|
|
@@ -14,27 +12,32 @@
|
|
|
14
12
|
<script setup lang="ts">
|
|
15
13
|
import {inject} from "vue";
|
|
16
14
|
|
|
17
|
-
import PlayButton from "./components/buttons/play-button.vue";
|
|
18
|
-
import TimeSlider from "./components/sliders/time-slider.vue";
|
|
19
|
-
import TimeGroup from "./components/time-group.vue";
|
|
20
|
-
|
|
21
15
|
const { size } = inject('size');
|
|
22
16
|
|
|
23
17
|
</script>
|
|
24
18
|
|
|
25
19
|
<style scoped lang="scss">
|
|
26
|
-
.
|
|
20
|
+
.controls-group {
|
|
27
21
|
display: flex;
|
|
28
22
|
justify-content: center;
|
|
23
|
+
max-width: fit-content;
|
|
24
|
+
align-self: center;
|
|
29
25
|
|
|
30
26
|
&--sm {
|
|
31
|
-
|
|
27
|
+
width: 100%;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
|
|
30
|
+
.controls-group__actions {
|
|
32
31
|
border-top-left-radius: 0 !important;
|
|
33
32
|
border-top-right-radius: 0 !important;
|
|
34
33
|
gap: calc(var(--p-player-control-bar-sm-gap) * 2);
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
|
|
37
|
+
&--md {
|
|
38
|
+
align-self: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
38
41
|
&__actions {
|
|
39
42
|
width: 100%;
|
|
40
43
|
display: flex;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as ControlsGroup } from './controls-group/controls-group.vue';
|
|
2
|
+
export { default as VideoLayout } from './layouts/video-layout.vue';
|
|
3
|
+
export { default as MediaControlsPanel } from './panels/media-controls-panel/media-controls-panel.vue';
|
|
4
|
+
export { default as ScreenSharingControlsPanel } from './panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue';
|
|
5
|
+
export { default as VideoCallControlsPanel } from './panels/video-call-controls-panel/video-call-controls-panel.vue';
|
|
6
|
+
export { default as RecordingIndicator } from './recording-indicator/recording-indicator.vue';
|
|
@@ -4,28 +4,20 @@
|
|
|
4
4
|
:class="`video-layout--${size}`"
|
|
5
5
|
>
|
|
6
6
|
<video-display-panel
|
|
7
|
+
v-if="!props.hideDisplayPanel"
|
|
7
8
|
:title="props.title"
|
|
8
9
|
:username="props.username"
|
|
9
10
|
:closable="props.closable"
|
|
10
11
|
@close="emit('close-player')"
|
|
11
12
|
/>
|
|
12
13
|
|
|
13
|
-
<wt-loader size="sm" color="on-dark"/>
|
|
14
|
+
<wt-loader size="sm" color="on-dark" />
|
|
14
15
|
|
|
15
|
-
<
|
|
16
|
-
<media-control-panel />
|
|
17
|
-
</template>
|
|
16
|
+
<slot name="content" />
|
|
18
17
|
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
:screenshot-status="props.screenshotStatus"
|
|
23
|
-
:screenshot-is-loading="screenshotIsLoading"
|
|
24
|
-
@close-session="emit('close-session')"
|
|
25
|
-
@make-screenshot="emit('make-screenshot')"
|
|
26
|
-
@toggle-record="emit('toggle-record')"
|
|
27
|
-
/>
|
|
28
|
-
</template>
|
|
18
|
+
<slot name="controls-panel">
|
|
19
|
+
<media-controls-panel />
|
|
20
|
+
</slot>
|
|
29
21
|
</media-controls>
|
|
30
22
|
</template>
|
|
31
23
|
|
|
@@ -33,23 +25,16 @@
|
|
|
33
25
|
import {defineEmits, inject} from "vue";
|
|
34
26
|
|
|
35
27
|
import WtLoader from "../../../wt-loader/wt-loader.vue";
|
|
36
|
-
import {
|
|
37
|
-
import {WtVidstakPlayerControlsMode} from "../../types/WtVidstackPlayerControlsMode";
|
|
38
|
-
import {WtVidstackPlayerSession} from "../../types/WtVidstackPlayerSession";
|
|
39
|
-
import MediaControlPanel from "../panels/media-control-panel/media-control-panel.vue";
|
|
40
|
-
import ScreenSharingControlPanel from "../panels/screen-sharing-control-panel/screen-sharing-control-panel.vue";
|
|
28
|
+
import {MediaControlsPanel} from "../index";
|
|
41
29
|
import VideoDisplayPanel from "../panels/video-display-panel/video-display-panel.vue";
|
|
42
30
|
|
|
43
|
-
const {
|
|
31
|
+
const {size} = inject('size');
|
|
44
32
|
|
|
45
33
|
const props = defineProps<{
|
|
46
34
|
title?: string;
|
|
47
35
|
username?: string;
|
|
48
36
|
closable?: boolean;
|
|
49
|
-
|
|
50
|
-
session: WtVidstackPlayerSession
|
|
51
|
-
screenshotStatus: ScreenshotStatus
|
|
52
|
-
screenshotIsLoading: boolean
|
|
37
|
+
hideDisplayPanel?: boolean
|
|
53
38
|
}>();
|
|
54
39
|
|
|
55
40
|
const emit = defineEmits<{
|
|
@@ -62,15 +47,11 @@ const emit = defineEmits<{
|
|
|
62
47
|
|
|
63
48
|
<style scoped lang="scss">
|
|
64
49
|
.video-layout {
|
|
50
|
+
position: relative;
|
|
51
|
+
|
|
65
52
|
&--sm {
|
|
66
53
|
border-radius: var(--p-player-wrapper-sm-border-radius);
|
|
67
54
|
}
|
|
68
|
-
|
|
69
|
-
&--md {
|
|
70
|
-
.media-control-panel {
|
|
71
|
-
border-radius: var(--p-player-control-bar-md-border-radius);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
55
|
}
|
|
75
56
|
|
|
76
57
|
.controls {
|
|
@@ -85,12 +66,6 @@ const emit = defineEmits<{
|
|
|
85
66
|
transition: all var(--transition) ease-out;
|
|
86
67
|
}
|
|
87
68
|
|
|
88
|
-
.controls-group {
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
width: 100%;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
69
|
.wt-loader {
|
|
95
70
|
display: flex;
|
|
96
71
|
align-items: center;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<media-fullscreen-button
|
|
3
|
+
class="fullscreen-button"
|
|
4
|
+
@media-enter-fullscreen-request="toggleFullScreenRequest(true)"
|
|
5
|
+
@media-exit-fullscreen-request="toggleFullScreenRequest(false)"
|
|
6
|
+
>
|
|
7
|
+
<wt-icon-btn
|
|
8
|
+
icon="player-enter-fullscreen"
|
|
9
|
+
color="on-dark"
|
|
10
|
+
class="fullscreen-button__enter"
|
|
11
|
+
/>
|
|
12
|
+
<wt-icon-btn
|
|
13
|
+
icon="player-exit-fullscreen"
|
|
14
|
+
color="on-dark"
|
|
15
|
+
class="fullscreen-button__exit"
|
|
16
|
+
/>
|
|
17
|
+
</media-fullscreen-button>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import {defineEmits} from "vue";
|
|
22
|
+
|
|
23
|
+
import WtIconBtn from '../../../../../../wt-icon-btn/wt-icon-btn.vue';
|
|
24
|
+
|
|
25
|
+
const emit = defineEmits<{
|
|
26
|
+
'toggle': [value: boolean];
|
|
27
|
+
}>();
|
|
28
|
+
|
|
29
|
+
const toggleFullScreenRequest = (val: boolean) => {
|
|
30
|
+
emit('toggle', val)
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped>
|
|
35
|
+
.fullscreen-button[data-active] .fullscreen-button__enter,
|
|
36
|
+
.fullscreen-button:not([data-active]) .fullscreen-button__exit {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<media-play-button class="play-button">
|
|
3
|
+
<wt-button
|
|
4
|
+
:size="size"
|
|
5
|
+
variant="outlined"
|
|
6
|
+
color="secondary"
|
|
7
|
+
icon="play"
|
|
8
|
+
type="play"
|
|
9
|
+
rounded
|
|
10
|
+
contains-icon
|
|
11
|
+
class="play-button__play-icon"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<wt-button
|
|
15
|
+
:size="size"
|
|
16
|
+
variant="outlined"
|
|
17
|
+
color="secondary"
|
|
18
|
+
icon="pause"
|
|
19
|
+
type="pause"
|
|
20
|
+
rounded
|
|
21
|
+
contains-icon
|
|
22
|
+
class="play-button__pause-icon"
|
|
23
|
+
/>
|
|
24
|
+
</media-play-button>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import {inject} from "vue";
|
|
29
|
+
|
|
30
|
+
const {size} = inject('size');
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
.play-button {
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.play-button[data-paused] .play-button__pause-icon,
|
|
39
|
+
.play-button:not([data-paused]) .play-button__play-icon {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<controls-group class="media-control-panel">
|
|
3
|
+
<play-button />
|
|
4
|
+
|
|
5
|
+
<time-slider />
|
|
6
|
+
|
|
7
|
+
<time-group />
|
|
8
|
+
</controls-group>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import {ControlsGroup} from "../../../../../components/wt-vidstack-player/components";
|
|
13
|
+
import PlayButton from "./components/buttons/play-button.vue";
|
|
14
|
+
import TimeSlider from "./components/sliders/time-slider.vue";
|
|
15
|
+
import TimeGroup from "./components/time-group.vue";
|
|
16
|
+
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style scoped lang="scss">
|
|
20
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<controls-group class="screen-sharing-controls-panel">
|
|
3
|
+
<wt-button
|
|
4
|
+
rounded
|
|
5
|
+
contains-icon
|
|
6
|
+
variant="outlined"
|
|
7
|
+
color="secondary"
|
|
8
|
+
:loading="props.screenshotIsLoading"
|
|
9
|
+
:size="size"
|
|
10
|
+
:icon="screenShotIcon"
|
|
11
|
+
@click="makeScreenshot"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<wt-button
|
|
15
|
+
rounded
|
|
16
|
+
contains-icon
|
|
17
|
+
variant="outlined"
|
|
18
|
+
color="secondary"
|
|
19
|
+
:size="size"
|
|
20
|
+
:icon="recordIcon"
|
|
21
|
+
@click="emit('toggle-record')"
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
<wt-button
|
|
25
|
+
icon="sharing-end"
|
|
26
|
+
class="screen-sharing-control-panel__sharing-end"
|
|
27
|
+
color="error"
|
|
28
|
+
variant="outlined"
|
|
29
|
+
:size="size"
|
|
30
|
+
rounded
|
|
31
|
+
contains-icon
|
|
32
|
+
@click="closeSession"
|
|
33
|
+
/>
|
|
34
|
+
</controls-group>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup lang="ts">
|
|
38
|
+
import {computed, defineEmits, inject} from 'vue';
|
|
39
|
+
|
|
40
|
+
import {ControlsGroup} from '../../../../../components/wt-vidstack-player/components'
|
|
41
|
+
import {ScreenSharingSession, ScreenshotStatus} from "../../../types";
|
|
42
|
+
|
|
43
|
+
interface Props {
|
|
44
|
+
session: ScreenSharingSession
|
|
45
|
+
screenshotStatus: ScreenshotStatus | null
|
|
46
|
+
screenshotIsLoading: boolean
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const props = defineProps<Props>();
|
|
50
|
+
|
|
51
|
+
const emit = defineEmits<{
|
|
52
|
+
'close-session': [],
|
|
53
|
+
'make-screenshot': [],
|
|
54
|
+
'toggle-record': [],
|
|
55
|
+
}>()
|
|
56
|
+
|
|
57
|
+
const {size} = inject('size');
|
|
58
|
+
|
|
59
|
+
const recordIcon = computed(() => (props.session.recordings ? 'record-stop' : 'record-start'));
|
|
60
|
+
|
|
61
|
+
const screenShotIcon = computed(() => {
|
|
62
|
+
switch (props.screenshotStatus) {
|
|
63
|
+
case 'done':
|
|
64
|
+
return 'screenshot-done';
|
|
65
|
+
case 'error':
|
|
66
|
+
return 'screenshot-false';
|
|
67
|
+
default:
|
|
68
|
+
return 'screenshot';
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const closeSession = () => {
|
|
73
|
+
emit('close-session')
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const makeScreenshot = () => {
|
|
77
|
+
emit('make-screenshot')
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<style scoped lang="scss">
|
|
82
|
+
.screen-sharing-controls-panel {
|
|
83
|
+
position: relative;
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<controls-group class="video-call-controls-panel">
|
|
3
|
+
<wt-button
|
|
4
|
+
v-if="props.screenshotCallback"
|
|
5
|
+
rounded
|
|
6
|
+
contains-icon
|
|
7
|
+
variant="outlined"
|
|
8
|
+
color="secondary"
|
|
9
|
+
:loading="props.screenshotIsLoading"
|
|
10
|
+
:size="size"
|
|
11
|
+
:icon="screenShotIcon"
|
|
12
|
+
@click="props.screenshotCallback"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<wt-button
|
|
16
|
+
v-if="props.recordingsCallback"
|
|
17
|
+
rounded
|
|
18
|
+
contains-icon
|
|
19
|
+
variant="outlined"
|
|
20
|
+
color="secondary"
|
|
21
|
+
:size="size"
|
|
22
|
+
:icon="recordIcon"
|
|
23
|
+
@click="props.recordingsCallback"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<wt-button
|
|
27
|
+
v-if="props.micCallback"
|
|
28
|
+
rounded
|
|
29
|
+
contains-icon
|
|
30
|
+
variant="outlined"
|
|
31
|
+
color="secondary"
|
|
32
|
+
:size="size"
|
|
33
|
+
:icon="microphoneIcon"
|
|
34
|
+
@click="props.micCallback"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<wt-button
|
|
38
|
+
v-if="props.videoCallback"
|
|
39
|
+
rounded
|
|
40
|
+
contains-icon
|
|
41
|
+
variant="outlined"
|
|
42
|
+
color="secondary"
|
|
43
|
+
:size="size"
|
|
44
|
+
:icon="videoCamIcon"
|
|
45
|
+
@click="props.videoCallback"
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<wt-button
|
|
49
|
+
v-if="props.settingsCallback"
|
|
50
|
+
:size="size"
|
|
51
|
+
icon="settings"
|
|
52
|
+
variant="outlined"
|
|
53
|
+
color="secondary"
|
|
54
|
+
rounded
|
|
55
|
+
contains-icon
|
|
56
|
+
@click="props.settingsCallback"
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
<wt-button
|
|
60
|
+
v-if="props.chatCallback"
|
|
61
|
+
:size="size"
|
|
62
|
+
icon="chat"
|
|
63
|
+
variant="outlined"
|
|
64
|
+
color="secondary"
|
|
65
|
+
rounded
|
|
66
|
+
contains-icon
|
|
67
|
+
@click="props.chatCallback"
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<wt-button
|
|
71
|
+
v-if="props.callStateCallback"
|
|
72
|
+
:size="size"
|
|
73
|
+
:icon="callStateIcon"
|
|
74
|
+
:color="callStateButtonColor"
|
|
75
|
+
rounded
|
|
76
|
+
contains-icon
|
|
77
|
+
@click="props.callStateCallback"
|
|
78
|
+
/>
|
|
79
|
+
</controls-group>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script setup lang="ts">
|
|
83
|
+
import {computed, inject} from 'vue';
|
|
84
|
+
|
|
85
|
+
import {ControlsGroup} from '../../../../../components/wt-vidstack-player/components'
|
|
86
|
+
import {ScreenshotStatus} from '../../../../../modules/CallSession/types';
|
|
87
|
+
|
|
88
|
+
interface Props {
|
|
89
|
+
recordings: boolean
|
|
90
|
+
isMicMuted: boolean
|
|
91
|
+
isVideoMuted: boolean
|
|
92
|
+
isCallStarted: boolean
|
|
93
|
+
screenshotIsLoading: boolean
|
|
94
|
+
screenshotStatus: ScreenshotStatus | null
|
|
95
|
+
|
|
96
|
+
screenshotCallback?: () => void
|
|
97
|
+
recordingsCallback?: () => void
|
|
98
|
+
micCallback?: () => void
|
|
99
|
+
videoCallback?: () => void
|
|
100
|
+
settingsCallback?: () => void
|
|
101
|
+
chatCallback?: () => void
|
|
102
|
+
callStateCallback?: () => void
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const props = defineProps<Props>();
|
|
106
|
+
|
|
107
|
+
const {size} = inject('size');
|
|
108
|
+
|
|
109
|
+
const microphoneIcon = computed(() => (props.isMicMuted ? 'mic' : 'mic-muted'));
|
|
110
|
+
const videoCamIcon = computed(() => (props.isVideoMuted ? 'video-cam' : 'video-cam-off'));
|
|
111
|
+
const recordIcon = computed(() => (props.recordings ? 'record-stop' : 'record-start'));
|
|
112
|
+
const screenShotIcon = computed(() => {
|
|
113
|
+
switch (props.screenshotStatus) {
|
|
114
|
+
case 'done':
|
|
115
|
+
return 'screenshot-done';
|
|
116
|
+
case 'error':
|
|
117
|
+
return 'screenshot-false';
|
|
118
|
+
default:
|
|
119
|
+
return 'screenshot';
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const callStateIcon = computed(() => (props.isCallStarted ? 'call-end--filled' : 'call--filled'));
|
|
123
|
+
const callStateButtonColor = computed(() => (props.isCallStarted ? 'error' : 'success'));
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<style scoped lang="scss">
|
|
127
|
+
.video-call-controls-panel {
|
|
128
|
+
position: relative;
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
}
|
|
132
|
+
</style>
|
|
133
|
+
|
|
134
|
+
|
|
@@ -42,8 +42,8 @@ import {defineEmits, defineProps, inject, onBeforeUnmount, onMounted} from 'vue'
|
|
|
42
42
|
import {ComponentSize} from "../../../../../enums";
|
|
43
43
|
import WtAvatar from "../../../../wt-avatar/wt-avatar.vue";
|
|
44
44
|
import WtIconBtn from "../../../../wt-icon-btn/wt-icon-btn.vue";
|
|
45
|
+
import FullscreenButton from "../../buttons/fullscreen-button.vue";
|
|
45
46
|
import ToggleButton from "../../toggle-button.vue";
|
|
46
|
-
import FullscreenButton from "../media-control-panel/components/buttons/fullscreen-button.vue";
|
|
47
47
|
|
|
48
48
|
const { size, changeSize } = inject('size');
|
|
49
49
|
|
package/src/components/wt-vidstack-player/components/recording-indicator/recording-indicator.vue
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="recording-indicator"
|
|
4
|
+
>
|
|
5
|
+
<wt-indicator
|
|
6
|
+
color="error"
|
|
7
|
+
size="md"
|
|
8
|
+
/>
|
|
9
|
+
|
|
10
|
+
<span class="recording-indicator__time">{{ durationTime }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import {computed, onMounted, ref} from 'vue';
|
|
16
|
+
|
|
17
|
+
import convertDuration from '../../../../scripts/convertDuration';
|
|
18
|
+
|
|
19
|
+
const secondsElapsed = ref(0);
|
|
20
|
+
const timerId = ref<number | null>(null);
|
|
21
|
+
|
|
22
|
+
const startTimer = () => {
|
|
23
|
+
secondsElapsed.value = 0;
|
|
24
|
+
stopTimer();
|
|
25
|
+
timerId.value = window.setInterval(() => {
|
|
26
|
+
secondsElapsed.value++;
|
|
27
|
+
}, 1000);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const stopTimer = () => {
|
|
31
|
+
if (timerId.value !== null) {
|
|
32
|
+
clearInterval(timerId.value);
|
|
33
|
+
timerId.value = null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const durationTime = computed(() => convertDuration(secondsElapsed.value))
|
|
38
|
+
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
startTimer();
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss">
|
|
45
|
+
@use '@webitel/styleguide/typography' as *;
|
|
46
|
+
|
|
47
|
+
.recording-indicator {
|
|
48
|
+
background: var(--content-wrapper-color);
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
gap: var(--p-player-counter-gap);
|
|
53
|
+
padding: var(--p-player-counter-padding);
|
|
54
|
+
border-radius: var(--p-player-counter-border-radius);
|
|
55
|
+
box-shadow: var(--elevation-10);
|
|
56
|
+
|
|
57
|
+
// Agreed with @Evgeniy Trahtenberg
|
|
58
|
+
width: 100px;
|
|
59
|
+
|
|
60
|
+
&__time {
|
|
61
|
+
@extend %typo-body-1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|