@webitel/ui-sdk 25.12.27 → 25.12.29
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-A9G4M7-6.js → install-BlgO8vvA.js} +70931 -66811
- package/dist/{plyr-dI1qsIWm.js → plyr-DJyswX07.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +264 -265
- package/dist/{vidstack-Bq6c3Bam-Bpshd13A.js → vidstack-Bq6c3Bam-DjwO73JH.js} +2 -2
- package/dist/{vidstack-D2pY00kU-DknwOKzI.js → vidstack-D2pY00kU-9GfP8TVc.js} +2 -2
- package/dist/{vidstack-DDXt6fpN-2JcEs0WE.js → vidstack-DDXt6fpN-DS4AECfL.js} +1 -1
- package/dist/{vidstack-D_-9AA6_-ltFyEXo5.js → vidstack-D_-9AA6_-bomzWQ4f.js} +1 -1
- package/dist/{vidstack-DqAw8m9J-CL4FNO5F.js → vidstack-DqAw8m9J-CDpaNq7k.js} +1 -1
- package/dist/{vidstack-audio-CnLJOsQb.js → vidstack-audio-kqV18cx_.js} +2 -2
- package/dist/{vidstack-dash-DE9OxUbu.js → vidstack-dash-CQ4hwM3M.js} +3 -3
- package/dist/{vidstack-google-cast-DUF-rvcM.js → vidstack-google-cast-DTdO4f40.js} +3 -3
- package/dist/{vidstack-hls-B5QgAztZ.js → vidstack-hls-f3oAxxux.js} +3 -3
- package/dist/{vidstack-video-DK5nUu2T.js → vidstack-video-D0EY01uq.js} +2 -2
- package/dist/{vidstack-vimeo-BPIRVQ20.js → vidstack-vimeo-X0J_rLd3.js} +3 -3
- package/dist/{vidstack-youtube-BBGQ_xiA.js → vidstack-youtube-Crx9X7UA.js} +2 -2
- package/dist/{vuex.esm-bundler-07IDl-KX.js → vuex.esm-bundler-hTIuzsPk.js} +1 -1
- package/package.json +3 -2
- package/src/components/wt-app-header/wt-header-actions.vue +4 -1
- 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/enums/FormatDateMode/FormatDateMode.ts +6 -0
- package/src/enums/index.ts +2 -0
- package/src/modules/AuditForm/components/form-answers/answer-editing-info/audit-form-answer-editing-info.vue +3 -1
- 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/src/scripts/prettifyTime.js +5 -1
- package/src/utils/formatDate.ts +48 -0
- package/src/utils/index.ts +1 -0
- package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +2 -2
- 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/enums/FormatDateMode/FormatDateMode.d.ts +6 -0
- package/types/enums/index.d.ts +2 -1
- 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/types/utils/formatDate.d.ts +2 -0
- package/types/utils/index.d.ts +1 -0
- 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
|
@@ -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>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="wt-vidstack-player"
|
|
4
|
-
:class="[`wt-vidstack-player--${size}`]"
|
|
4
|
+
:class="{[`wt-vidstack-player--${size}`]: props.resizable}"
|
|
5
5
|
>
|
|
6
6
|
<media-player
|
|
7
7
|
ref="player"
|
|
@@ -17,20 +17,23 @@
|
|
|
17
17
|
<media-provider
|
|
18
18
|
class="wt-vidstack-player__provider"
|
|
19
19
|
></media-provider>
|
|
20
|
+
|
|
20
21
|
<video-layout
|
|
22
|
+
v-if="props.resizable"
|
|
21
23
|
:closable="props.closable"
|
|
22
24
|
:autoplay="props.autoplay"
|
|
23
25
|
:title="props.title"
|
|
24
26
|
:username="props.username"
|
|
25
|
-
:session="props.session"
|
|
26
|
-
:screenshot-status="props.screenshotStatus"
|
|
27
|
-
:screenshot-is-loading="screenshotIsLoading"
|
|
28
|
-
:mode="mode"
|
|
29
27
|
@close-player="emit('close')"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
>
|
|
29
|
+
<template #controls-panel>
|
|
30
|
+
<slot name="controls-panel" :size="size" />
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<template #content>
|
|
34
|
+
<slot name="content" :size="size" />
|
|
35
|
+
</template>
|
|
36
|
+
</video-layout>
|
|
34
37
|
|
|
35
38
|
</media-player>
|
|
36
39
|
</div>
|
|
@@ -40,23 +43,11 @@
|
|
|
40
43
|
import 'vidstack/player';
|
|
41
44
|
import 'vidstack/player/ui';
|
|
42
45
|
|
|
43
|
-
import type {
|
|
44
|
-
import {
|
|
45
|
-
computed,
|
|
46
|
-
defineEmits,
|
|
47
|
-
defineProps,
|
|
48
|
-
onBeforeUnmount,
|
|
49
|
-
onMounted,
|
|
50
|
-
provide,
|
|
51
|
-
ref,
|
|
52
|
-
useTemplateRef
|
|
53
|
-
} from 'vue';
|
|
46
|
+
import type {MediaPlayerElement} from 'vidstack/elements';
|
|
47
|
+
import {computed, defineEmits, defineProps, onBeforeUnmount, onMounted, provide, ref, useTemplateRef} from 'vue';
|
|
54
48
|
|
|
55
49
|
import {ComponentSize} from '../../enums';
|
|
56
|
-
import VideoLayout from
|
|
57
|
-
import {ScreenshotStatus} from "./types/ScreenshotStatus";
|
|
58
|
-
import {WtVidstakPlayerControlsMode} from "./types/WtVidstackPlayerControlsMode";
|
|
59
|
-
import {WtVidstackPlayerSession} from "./types/WtVidstackPlayerSession";
|
|
50
|
+
import {VideoLayout} from "./components";
|
|
60
51
|
|
|
61
52
|
interface Props {
|
|
62
53
|
src: string | { src: string; type?: string };
|
|
@@ -66,11 +57,8 @@ interface Props {
|
|
|
66
57
|
title?: string;
|
|
67
58
|
username?: string;
|
|
68
59
|
closable?: boolean;
|
|
60
|
+
resizable?: boolean;
|
|
69
61
|
stream?: MediaStream
|
|
70
|
-
mode: WtVidstakPlayerControlsMode;
|
|
71
|
-
session?: WtVidstackPlayerSession
|
|
72
|
-
screenshotStatus: ScreenshotStatus
|
|
73
|
-
screenshotIsLoading: boolean
|
|
74
62
|
}
|
|
75
63
|
|
|
76
64
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -80,14 +68,11 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
80
68
|
title: '',
|
|
81
69
|
username: '',
|
|
82
70
|
closable: false,
|
|
83
|
-
|
|
71
|
+
resizable: true,
|
|
84
72
|
});
|
|
85
73
|
|
|
86
74
|
const emit = defineEmits<{
|
|
87
75
|
'close': [],
|
|
88
|
-
'close-session': [],
|
|
89
|
-
'make-screenshot': [],
|
|
90
|
-
'toggle-record': [],
|
|
91
76
|
}>()
|
|
92
77
|
|
|
93
78
|
const player = useTemplateRef<MediaPlayerElement>('player');
|
|
@@ -100,8 +85,8 @@ const changeSize = (value) => {
|
|
|
100
85
|
/** @author liza-pohranichna
|
|
101
86
|
* options: [sm, md, lg]
|
|
102
87
|
* lg-size is fullscreen
|
|
103
|
-
*/
|
|
104
|
-
provide('size', {
|
|
88
|
+
*/
|
|
89
|
+
provide('size', {size, changeSize});
|
|
105
90
|
|
|
106
91
|
const normalizedType = computed(() => { // https://vidstack.io/docs/wc/player/core-concepts/loading/?styling=css#source-types
|
|
107
92
|
if (props.mime) return props.mime;
|
|
@@ -116,7 +101,7 @@ const normalizedType = computed(() => { // https://vidstack.io/docs/wc/player/co
|
|
|
116
101
|
|
|
117
102
|
const playerSrc = computed(() => {
|
|
118
103
|
if (typeof props.src === 'string') {
|
|
119
|
-
return {
|
|
104
|
+
return {src: props.src, type: normalizedType.value};
|
|
120
105
|
}
|
|
121
106
|
return {
|
|
122
107
|
src: props.src?.src || '',
|
|
@@ -129,7 +114,7 @@ const playerSrc = computed(() => {
|
|
|
129
114
|
* A brief delay ensures the internal <video> element is ready before playback starts.
|
|
130
115
|
*/
|
|
131
116
|
onMounted(() => {
|
|
132
|
-
if (player.value && props.
|
|
117
|
+
if (player.value && props.stream) {
|
|
133
118
|
const videoEl = player.value.querySelector('video')
|
|
134
119
|
|
|
135
120
|
videoEl.addEventListener("loadedmetadata", async () => {
|
|
@@ -162,8 +147,6 @@ onBeforeUnmount(() => {
|
|
|
162
147
|
&__player {
|
|
163
148
|
padding: 0;
|
|
164
149
|
margin: 0;
|
|
165
|
-
min-width: 0;
|
|
166
|
-
width: 100%;
|
|
167
150
|
}
|
|
168
151
|
|
|
169
152
|
&--sm {
|
|
@@ -181,8 +164,7 @@ onBeforeUnmount(() => {
|
|
|
181
164
|
.wt-vidstack-player__provider {
|
|
182
165
|
display: block;
|
|
183
166
|
height: 100%;
|
|
184
|
-
|
|
185
|
-
padding-bottom: 48px;
|
|
167
|
+
padding-bottom: var(--p-player-control-bar-sm-height);
|
|
186
168
|
}
|
|
187
169
|
}
|
|
188
170
|
|
|
@@ -207,6 +189,7 @@ onBeforeUnmount(() => {
|
|
|
207
189
|
display: flex;
|
|
208
190
|
align-items: center;
|
|
209
191
|
}
|
|
192
|
+
|
|
210
193
|
&__provider {
|
|
211
194
|
width: 100%;
|
|
212
195
|
min-width: 0;
|
package/src/enums/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { ChipColor } from './ChipColor/ChipColor';
|
|
|
9
9
|
import { ComponentSize } from './ComponentSize/ComponentSize';
|
|
10
10
|
import { CrudAction } from './CrudAction/CrudAction';
|
|
11
11
|
import { EmptyCause } from './EmptyCause/EmptyCause';
|
|
12
|
+
import { FormatDateMode } from './FormatDateMode/FormatDateMode';
|
|
12
13
|
import IconAction from './IconAction/IconAction.enum.js';
|
|
13
14
|
import { IconColor } from './IconColor/IconColor';
|
|
14
15
|
import { ProcessingTableColumnType } from './ProcessingTableColumnType/ProcessingTableColumnType';
|
|
@@ -38,6 +39,7 @@ export {
|
|
|
38
39
|
CrmSections,
|
|
39
40
|
CrudAction,
|
|
40
41
|
EmptyCause,
|
|
42
|
+
FormatDateMode,
|
|
41
43
|
IconAction,
|
|
42
44
|
IconColor,
|
|
43
45
|
ProcessingTableColumnType,
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script setup lang="ts">
|
|
34
|
+
import { FormatDateMode } from '@webitel/ui-sdk/enums'
|
|
35
|
+
import { formatDate } from '@webitel/ui-sdk/utils'
|
|
34
36
|
import {computed, ref, useTemplateRef } from "vue";
|
|
35
37
|
import { useI18n } from 'vue-i18n';
|
|
36
38
|
import {EngineQuestionAnswer} from "webitel-sdk";
|
|
@@ -53,7 +55,7 @@ const { t } = useI18n();
|
|
|
53
55
|
const initialComment = props.answer.comment; /* prevent editing-info change if comment is changing */
|
|
54
56
|
|
|
55
57
|
const updateTime = computed(() => {
|
|
56
|
-
return
|
|
58
|
+
return formatDate(props.answer.updatedAt, FormatDateMode.DATETIME);
|
|
57
59
|
});
|
|
58
60
|
|
|
59
61
|
const isCommentClamped = props.collapsible && computed(() => {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-vidstack-player
|
|
3
|
+
v-bind="attrs"
|
|
4
|
+
class="screen-sharing"
|
|
5
|
+
autoplay
|
|
6
|
+
muted
|
|
7
|
+
closable
|
|
8
|
+
>
|
|
9
|
+
<template #content="{ size }">
|
|
10
|
+
<div
|
|
11
|
+
:class="`screen-sharing__indicator--${size}`"
|
|
12
|
+
class="screen-sharing__indicator"
|
|
13
|
+
>
|
|
14
|
+
<recording-indicator
|
|
15
|
+
v-if="props.session.recordings"
|
|
16
|
+
:recording="props.session.recordings"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<template #controls-panel>
|
|
22
|
+
<screen-sharing-controls-panel
|
|
23
|
+
:session="props.session"
|
|
24
|
+
:screenshot-status="props.screenshotStatus"
|
|
25
|
+
:screenshot-is-loading="props.screenshotIsLoading"
|
|
26
|
+
@close-session="emit('close-session')"
|
|
27
|
+
@make-screenshot="emit('make-screenshot')"
|
|
28
|
+
@toggle-record="emit('toggle-record')"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
31
|
+
</wt-vidstack-player>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import {WtVidstackPlayer} from '@webitel/ui-sdk/components';
|
|
36
|
+
import {defineEmits, useAttrs} from 'vue';
|
|
37
|
+
|
|
38
|
+
import {RecordingIndicator,ScreenSharingControlsPanel} from "../../../../components/wt-vidstack-player/components";
|
|
39
|
+
import {ScreenSharingSession, ScreenshotStatus} from '../../types';
|
|
40
|
+
|
|
41
|
+
interface Props {
|
|
42
|
+
session: ScreenSharingSession
|
|
43
|
+
screenshotStatus: ScreenshotStatus | null
|
|
44
|
+
screenshotIsLoading: boolean
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const props = defineProps<Props>();
|
|
48
|
+
|
|
49
|
+
const emit = defineEmits<{
|
|
50
|
+
'close-session': [],
|
|
51
|
+
'make-screenshot': [],
|
|
52
|
+
'toggle-record': [],
|
|
53
|
+
}>()
|
|
54
|
+
|
|
55
|
+
const attrs = useAttrs();
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style lang="scss" scoped>
|
|
59
|
+
.screen-sharing {
|
|
60
|
+
|
|
61
|
+
&__indicator {
|
|
62
|
+
position: absolute;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: end;
|
|
67
|
+
justify-content: flex-end;
|
|
68
|
+
padding: var(--p-player-counter-position-padding-sm);
|
|
69
|
+
|
|
70
|
+
&--sm {
|
|
71
|
+
position: relative;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&--md {
|
|
75
|
+
right: var(--p-player-counter-position-padding-md);
|
|
76
|
+
bottom: var(--p-player-counter-position-padding-md);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&--lg {
|
|
80
|
+
right: var(--p-player-counter-position-padding-lg);
|
|
81
|
+
bottom: var(--p-player-counter-position-padding-lg);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-vidstack-player
|
|
3
|
+
:stream="mainStream"
|
|
4
|
+
class="video-call"
|
|
5
|
+
autoplay
|
|
6
|
+
muted
|
|
7
|
+
>
|
|
8
|
+
<template #content="{ size }">
|
|
9
|
+
<div
|
|
10
|
+
:class="`video-call-content--${size}`"
|
|
11
|
+
class="video-call-content"
|
|
12
|
+
>
|
|
13
|
+
<wt-vidstack-player
|
|
14
|
+
:stream="props.receiver"
|
|
15
|
+
:resizable="false"
|
|
16
|
+
:class="`video-call-receiver--${size}`"
|
|
17
|
+
static
|
|
18
|
+
autoplay
|
|
19
|
+
muted
|
|
20
|
+
class="receiver"
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<div
|
|
24
|
+
:class="`video-call__indicator--${size}`"
|
|
25
|
+
class="video-call__indicator"
|
|
26
|
+
>
|
|
27
|
+
<recording-indicator
|
|
28
|
+
v-if="props.recordings"
|
|
29
|
+
:recording="props.recordings"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<template #controls-panel>
|
|
36
|
+
<video-call-controls-panel
|
|
37
|
+
:recordings="props.recordings"
|
|
38
|
+
:is-mic-muted="props.isMicMuted"
|
|
39
|
+
:is-video-muted="props.isVideoMuted"
|
|
40
|
+
:is-call-started="props.isCallStarted"
|
|
41
|
+
:screenshot-status="props.screenshotStatus"
|
|
42
|
+
:screenshot-is-loading="props.screenshotIsLoading"
|
|
43
|
+
:screenshot-callback="props.screenshotCallback"
|
|
44
|
+
:recordings-callback="props.recordingsCallback"
|
|
45
|
+
:mic-callback="props.micCallback"
|
|
46
|
+
:video-callback="props.videoCallback"
|
|
47
|
+
:settings-callback="props.settingsCallback"
|
|
48
|
+
:chat-callback="props.chatCallback"
|
|
49
|
+
:call-state-callback="props.callStateCallback"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
</wt-vidstack-player>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script setup lang="ts">
|
|
56
|
+
import {WtVidstackPlayer} from '@webitel/ui-sdk/components';
|
|
57
|
+
import {computed} from 'vue';
|
|
58
|
+
|
|
59
|
+
import {RecordingIndicator, VideoCallControlsPanel} from "../../../../components/wt-vidstack-player/components";
|
|
60
|
+
import {ScreenshotStatus} from '../../types';
|
|
61
|
+
|
|
62
|
+
interface Props {
|
|
63
|
+
sender: MediaStream
|
|
64
|
+
receiver: MediaStream
|
|
65
|
+
isMicMuted: boolean
|
|
66
|
+
isVideoMuted: boolean
|
|
67
|
+
isCallStarted: boolean
|
|
68
|
+
recordings: boolean
|
|
69
|
+
screenshotStatus: ScreenshotStatus | null
|
|
70
|
+
screenshotIsLoading: boolean
|
|
71
|
+
|
|
72
|
+
screenshotCallback?: () => void
|
|
73
|
+
recordingsCallback?: () => void
|
|
74
|
+
micCallback?: () => void
|
|
75
|
+
videoCallback?: () => void
|
|
76
|
+
settingsCallback?: () => void
|
|
77
|
+
chatCallback?: () => void
|
|
78
|
+
callStateCallback?: () => void
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const props = defineProps<Props>();
|
|
82
|
+
|
|
83
|
+
const mainStream = computed(() => props.receiver || props.sender)
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<style lang="scss" scoped>
|
|
87
|
+
.video-call {
|
|
88
|
+
|
|
89
|
+
&-content {
|
|
90
|
+
height: 100%;
|
|
91
|
+
padding: var(--p-player-counter-position-padding-sm);
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
align-items: flex-end;
|
|
95
|
+
position: absolute;
|
|
96
|
+
left: 0;
|
|
97
|
+
top: 0;
|
|
98
|
+
|
|
99
|
+
&--sm {
|
|
100
|
+
position: relative;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&-receiver {
|
|
105
|
+
flex: 0 0 auto;
|
|
106
|
+
|
|
107
|
+
&--sm {
|
|
108
|
+
:deep(video) {
|
|
109
|
+
border-radius: var(--p-player-cam-preview-sm-border-radius);
|
|
110
|
+
}
|
|
111
|
+
width: var(--p-player-cam-preview-sm-width);
|
|
112
|
+
height: var(--p-player-cam-preview-sm-height);
|
|
113
|
+
position: relative;
|
|
114
|
+
right: 0;
|
|
115
|
+
bottom: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--md {
|
|
119
|
+
:deep(video) {
|
|
120
|
+
border-radius: var(--p-player-cam-preview-md-border-radius);
|
|
121
|
+
}
|
|
122
|
+
width: var(--p-player-cam-preview-md-width);
|
|
123
|
+
height: var(--p-player-cam-preview-md-height);
|
|
124
|
+
position: relative;
|
|
125
|
+
right: 0;
|
|
126
|
+
bottom: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&--lg {
|
|
130
|
+
:deep(video) {
|
|
131
|
+
border-radius: var(--p-player-cam-preview-lg-border-radius);
|
|
132
|
+
}
|
|
133
|
+
width: var(--p-player-cam-preview-lg-width);
|
|
134
|
+
height: var(--p-player-cam-preview-lg-height);
|
|
135
|
+
position: relative;
|
|
136
|
+
right: 0;
|
|
137
|
+
bottom: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&__indicator {
|
|
142
|
+
position: absolute;
|
|
143
|
+
width: 100%;
|
|
144
|
+
height: 100%;
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: end;
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
padding: var(--p-player-counter-position-padding-sm);
|
|
149
|
+
|
|
150
|
+
&--sm {
|
|
151
|
+
position: relative;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&--md {
|
|
155
|
+
right: var(--p-player-counter-position-padding-md);
|
|
156
|
+
bottom: var(--p-player-counter-position-padding-md);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&--lg {
|
|
160
|
+
right: var(--p-player-counter-position-padding-lg);
|
|
161
|
+
bottom: var(--p-player-counter-position-padding-lg);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
</style>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
const generateCustomSharingPanelSizeCss = ({ size, dt }) => `
|
|
2
|
-
.
|
|
2
|
+
.controls-group--${size} {
|
|
3
3
|
padding: ${dt(`player-control-bar-position-padding-${size}`)};
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
.media-control-panel--${size} .media-control-panel__actions {
|
|
6
|
+
.controls-group--${size} .controls-group__actions {
|
|
8
7
|
gap: ${dt(`player-control-bar-${size}-gap`)};
|
|
9
8
|
border-radius: ${dt(`player-control-bar-${size}-border-radius`)};
|
|
10
9
|
padding: ${dt(`player-control-bar-${size}-padding`)};
|