@icvdeveloper/common-module 0.0.107 → 0.0.108

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.
Files changed (93) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/assets/svg/answer.svg +14 -14
  4. package/dist/runtime/assets/svg/avatar.svg +1 -1
  5. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  6. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  7. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  8. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  9. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  10. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -1
  11. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  12. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  13. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  14. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  15. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  16. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  17. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  18. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  19. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  20. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  21. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  22. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  23. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  24. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  25. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  26. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  27. package/dist/runtime/assets/svg/phone.svg +1 -1
  28. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  29. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  30. package/dist/runtime/assets/svg/reject.svg +14 -14
  31. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  32. package/dist/runtime/components/affiliates/AffiliatePage.vue +17 -17
  33. package/dist/runtime/components/agenda/AgendaList.vue +271 -271
  34. package/dist/runtime/components/agenda/AgendaTabbed.vue +309 -309
  35. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +67 -67
  36. package/dist/runtime/components/agenda/components/Calendar.vue +81 -81
  37. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  38. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  39. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  40. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  41. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  42. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  43. package/dist/runtime/components/auth/Registration.vue +27 -27
  44. package/dist/runtime/components/auth/Ucc.vue +124 -124
  45. package/dist/runtime/components/core/Accordion.vue +97 -97
  46. package/dist/runtime/components/core/CountdownTimer.vue +357 -357
  47. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  48. package/dist/runtime/components/core/Modal.vue +111 -111
  49. package/dist/runtime/components/core/Navbar.vue +154 -154
  50. package/dist/runtime/components/core/SvgIcon.vue +157 -157
  51. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  52. package/dist/runtime/components/events/EventHeader.vue +133 -133
  53. package/dist/runtime/components/events/ListEvents.vue +551 -551
  54. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  55. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  56. package/dist/runtime/components/forms/Message.vue +27 -27
  57. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  58. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  59. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  60. package/dist/runtime/components/forms/TextArea.vue +26 -26
  61. package/dist/runtime/components/forms/TextInput.vue +28 -28
  62. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  63. package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +157 -157
  64. package/dist/runtime/components/media/ArchiveVideoPlayer.vue +186 -186
  65. package/dist/runtime/components/media/PlayerAndContentContainer.vue +175 -175
  66. package/dist/runtime/components/media/WebcastVideoPlayer.vue +167 -167
  67. package/dist/runtime/components/media/components/AgendaPanel.vue +43 -43
  68. package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +91 -91
  69. package/dist/runtime/components/media/components/CeCreditNotification.vue +95 -95
  70. package/dist/runtime/components/media/components/ContentAccordion.vue +63 -63
  71. package/dist/runtime/components/media/components/ContentAccordion.vue.d.ts +1 -3
  72. package/dist/runtime/components/media/components/ContentArea.vue +158 -158
  73. package/dist/runtime/components/media/components/ContentTabs.vue +231 -231
  74. package/dist/runtime/components/media/components/DocumentsPanel.vue +31 -31
  75. package/dist/runtime/components/media/components/JsonApi.vue +31 -31
  76. package/dist/runtime/components/media/components/MediaContainer.vue +63 -63
  77. package/dist/runtime/components/media/components/OverviewPanel.vue +52 -52
  78. package/dist/runtime/components/media/components/PresentersPanel.vue +52 -52
  79. package/dist/runtime/components/media/components/SessionReporting.vue +93 -93
  80. package/dist/runtime/components/media/components/SponsorsPanel.vue +71 -71
  81. package/dist/runtime/components/media/components/WindowContent.vue +92 -92
  82. package/dist/runtime/components/media/components/WindowSlide.vue +72 -72
  83. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  84. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  85. package/dist/runtime/components/profile/Profile.vue +149 -149
  86. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  87. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  88. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  89. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  90. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  91. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  92. package/dist/runtime/composables/useUcc.mjs +1 -0
  93. package/package.json +1 -1
@@ -1,167 +1,167 @@
1
- <script lang="ts" setup>
2
- import { toRefs, computed, watch, onMounted, nextTick } from "vue";
3
- import { get } from "lodash-es";
4
- import { getUnixTime } from "date-fns";
5
- import { Presentation, Stream, PlayerObj } from "../../models/conference";
6
- import { WebcastPlayerClassObj } from "../../@types/components";
7
- import { useScripts } from "../../composables/useScripts";
8
- import { useClassBinding } from "../../composables/useClassBinding";
9
-
10
- type Props = {
11
- stream: Stream;
12
- presentation: Presentation;
13
- classObject?: WebcastPlayerClassObj;
14
- };
15
-
16
- const props = withDefaults(defineProps<Props>(), {
17
- classObject: () => {
18
- return {
19
- container: "",
20
- playerElement: "",
21
- embedElement: "",
22
- };
23
- },
24
- });
25
-
26
- const { stream, presentation } = toRefs(props);
27
-
28
- const { loadScripts } = useScripts();
29
- const { classBinding } = useClassBinding();
30
-
31
- // data
32
- let icvPlayerObj: PlayerObj = {
33
- autostart: false,
34
- format: "hls",
35
- playerDiv: "mediaPlayer",
36
- loadCustomStream: () => {},
37
- };
38
- let timeInterval: NodeJS.Timer | null = null;
39
-
40
- // emits
41
- const emit = defineEmits<{
42
- (event: "time", value: Number): void;
43
- }>();
44
-
45
- // computed
46
- const isHtml = computed(() => {
47
- return stream.value.type === "embed";
48
- });
49
-
50
- const isHls = computed(() => {
51
- return stream.value.type === "hls";
52
- });
53
-
54
- // methods
55
- const setupMediaPlayer = () => {
56
- if (icvPlayerObj) {
57
- icvPlayerObj = <PlayerObj>{};
58
- }
59
- if (isHls.value) {
60
- nextTick(() => {
61
- icvPlayerObj = new window.ICVDMStreamPlayer();
62
- icvPlayerObj.format = stream.value.type;
63
- icvPlayerObj.playerDiv = "mediaPlayer";
64
- icvPlayerObj.autostart = true;
65
- playStream();
66
- });
67
- }
68
- };
69
-
70
- const playStream = () => {
71
- if (isHls.value) {
72
- icvPlayerObj.format = ["audio", "audio_slide"].includes(stream.value.type)
73
- ? "audio"
74
- : "video";
75
- icvPlayerObj.loadCustomStream({
76
- file: stream.value.hls_url,
77
- });
78
- }
79
- };
80
-
81
- const checkStreamTime = () => {
82
- const defaultStreamUt = getUnixTime(Date.now()) - 40;
83
- const maxStreamDelay = defaultStreamUt - 20;
84
- let streamUt = get(icvPlayerObj, "stream_ut", defaultStreamUt);
85
-
86
- if (streamUt > maxStreamDelay) {
87
- streamUt = defaultStreamUt;
88
- }
89
- emit("time", streamUt);
90
- };
91
-
92
- const cleanup = () => {
93
- if (icvPlayerObj) {
94
- icvPlayerObj = <PlayerObj>{};
95
- }
96
- clearInterval(timeInterval);
97
- };
98
-
99
- // watchers
100
-
101
- watch(
102
- presentation,
103
- (_oldPresentation: Presentation, _newPresentation: Presentation) => {
104
- if (_oldPresentation.type !== _newPresentation.type) {
105
- setupMediaPlayer();
106
- }
107
- }
108
- );
109
-
110
- watch(stream, (_oldStream, _newStream) => {
111
- if (_oldStream !== _newStream) {
112
- setupMediaPlayer();
113
- }
114
- });
115
-
116
- // on mount
117
- // @todo figure out why ICVDMStreamPlayer doesn't load when loadScripts is run asynchroniously
118
- onMounted(() => {
119
- const _script = document.createElement("script");
120
- _script.setAttribute(
121
- "src",
122
- "https://cdn.v3mediaportal.com/streaming-player/js/icvdm.player.min.js?_id=75"
123
- );
124
- document.head.appendChild(_script);
125
- _script.onload = () => {
126
- if (get(window, "ICVDMStreamPlayer", false)) {
127
- setupMediaPlayer();
128
- timeInterval = setInterval(checkStreamTime, 1000);
129
- }
130
- };
131
- });
132
- </script>
133
-
134
- <template>
135
- <div
136
- id="webcast-player-container"
137
- :class="classBinding(classObject, 'container', 'text-center')"
138
- >
139
- <div
140
- v-if="isHls"
141
- id="mediaPlayer"
142
- ref="mediaPlayer"
143
- :class="classBinding(classObject, 'playerElement', '')"
144
- ></div>
145
- <span
146
- v-if="isHtml"
147
- :v-html="stream.embed_html"
148
- :class="classBinding(classObject, 'embedElement', '')"
149
- ></span>
150
- </div>
151
- </template>
152
-
153
- <style>
154
- #webcast-player-container > span {
155
- padding-bottom: 56.25%;
156
- height: 0;
157
- position: relative;
158
- display: block;
159
- }
160
- #webcast-player-container > span > iframe {
161
- position: absolute;
162
- top: 0;
163
- left: 0;
164
- height: 100%;
165
- width: 100%;
166
- }
167
- </style>
1
+ <script lang="ts" setup>
2
+ import { toRefs, computed, watch, onMounted, nextTick } from "vue";
3
+ import { get } from "lodash-es";
4
+ import { getUnixTime } from "date-fns";
5
+ import { Presentation, Stream, PlayerObj } from "../../models/conference";
6
+ import { WebcastPlayerClassObj } from "../../@types/components";
7
+ import { useScripts } from "../../composables/useScripts";
8
+ import { useClassBinding } from "../../composables/useClassBinding";
9
+
10
+ type Props = {
11
+ stream: Stream;
12
+ presentation: Presentation;
13
+ classObject?: WebcastPlayerClassObj;
14
+ };
15
+
16
+ const props = withDefaults(defineProps<Props>(), {
17
+ classObject: () => {
18
+ return {
19
+ container: "",
20
+ playerElement: "",
21
+ embedElement: "",
22
+ };
23
+ },
24
+ });
25
+
26
+ const { stream, presentation } = toRefs(props);
27
+
28
+ const { loadScripts } = useScripts();
29
+ const { classBinding } = useClassBinding();
30
+
31
+ // data
32
+ let icvPlayerObj: PlayerObj = {
33
+ autostart: false,
34
+ format: "hls",
35
+ playerDiv: "mediaPlayer",
36
+ loadCustomStream: () => {},
37
+ };
38
+ let timeInterval: NodeJS.Timer | null = null;
39
+
40
+ // emits
41
+ const emit = defineEmits<{
42
+ (event: "time", value: Number): void;
43
+ }>();
44
+
45
+ // computed
46
+ const isHtml = computed(() => {
47
+ return stream.value.type === "embed";
48
+ });
49
+
50
+ const isHls = computed(() => {
51
+ return stream.value.type === "hls";
52
+ });
53
+
54
+ // methods
55
+ const setupMediaPlayer = () => {
56
+ if (icvPlayerObj) {
57
+ icvPlayerObj = <PlayerObj>{};
58
+ }
59
+ if (isHls.value) {
60
+ nextTick(() => {
61
+ icvPlayerObj = new window.ICVDMStreamPlayer();
62
+ icvPlayerObj.format = stream.value.type;
63
+ icvPlayerObj.playerDiv = "mediaPlayer";
64
+ icvPlayerObj.autostart = true;
65
+ playStream();
66
+ });
67
+ }
68
+ };
69
+
70
+ const playStream = () => {
71
+ if (isHls.value) {
72
+ icvPlayerObj.format = ["audio", "audio_slide"].includes(stream.value.type)
73
+ ? "audio"
74
+ : "video";
75
+ icvPlayerObj.loadCustomStream({
76
+ file: stream.value.hls_url,
77
+ });
78
+ }
79
+ };
80
+
81
+ const checkStreamTime = () => {
82
+ const defaultStreamUt = getUnixTime(Date.now()) - 40;
83
+ const maxStreamDelay = defaultStreamUt - 20;
84
+ let streamUt = get(icvPlayerObj, "stream_ut", defaultStreamUt);
85
+
86
+ if (streamUt > maxStreamDelay) {
87
+ streamUt = defaultStreamUt;
88
+ }
89
+ emit("time", streamUt);
90
+ };
91
+
92
+ const cleanup = () => {
93
+ if (icvPlayerObj) {
94
+ icvPlayerObj = <PlayerObj>{};
95
+ }
96
+ clearInterval(timeInterval);
97
+ };
98
+
99
+ // watchers
100
+
101
+ watch(
102
+ presentation,
103
+ (_oldPresentation: Presentation, _newPresentation: Presentation) => {
104
+ if (_oldPresentation.type !== _newPresentation.type) {
105
+ setupMediaPlayer();
106
+ }
107
+ }
108
+ );
109
+
110
+ watch(stream, (_oldStream, _newStream) => {
111
+ if (_oldStream !== _newStream) {
112
+ setupMediaPlayer();
113
+ }
114
+ });
115
+
116
+ // on mount
117
+ // @todo figure out why ICVDMStreamPlayer doesn't load when loadScripts is run asynchroniously
118
+ onMounted(() => {
119
+ const _script = document.createElement("script");
120
+ _script.setAttribute(
121
+ "src",
122
+ "https://cdn.v3mediaportal.com/streaming-player/js/icvdm.player.min.js?_id=75"
123
+ );
124
+ document.head.appendChild(_script);
125
+ _script.onload = () => {
126
+ if (get(window, "ICVDMStreamPlayer", false)) {
127
+ setupMediaPlayer();
128
+ timeInterval = setInterval(checkStreamTime, 1000);
129
+ }
130
+ };
131
+ });
132
+ </script>
133
+
134
+ <template>
135
+ <div
136
+ id="webcast-player-container"
137
+ :class="classBinding(classObject, 'container', 'text-center')"
138
+ >
139
+ <div
140
+ v-if="isHls"
141
+ id="mediaPlayer"
142
+ ref="mediaPlayer"
143
+ :class="classBinding(classObject, 'playerElement', '')"
144
+ ></div>
145
+ <span
146
+ v-if="isHtml"
147
+ :v-html="stream.embed_html"
148
+ :class="classBinding(classObject, 'embedElement', '')"
149
+ ></span>
150
+ </div>
151
+ </template>
152
+
153
+ <style>
154
+ #webcast-player-container > span {
155
+ padding-bottom: 56.25%;
156
+ height: 0;
157
+ position: relative;
158
+ display: block;
159
+ }
160
+ #webcast-player-container > span > iframe {
161
+ position: absolute;
162
+ top: 0;
163
+ left: 0;
164
+ height: 100%;
165
+ width: 100%;
166
+ }
167
+ </style>
@@ -1,45 +1,45 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs } from "vue";
3
- import { Conference } from "../../../models/conference";
4
- import {
5
- AgendaPanelClassObj,
6
- AgendaPanelCompObj,
7
- AgendaListClassObj,
8
- } from "../../../@types/components";
9
- import { useClassBinding } from "../../../composables/useClassBinding";
10
-
11
- type Props = {
12
- conference: Conference | null;
13
- classObject?: AgendaPanelClassObj;
14
- };
15
-
16
- const props = withDefaults(defineProps<Props>(), {
17
- classObject: () => {
18
- return {
19
- container: "",
20
- components: ref<AgendaPanelCompObj>({
21
- agendaList: ref<AgendaListClassObj>({}),
22
- }),
23
- };
24
- },
25
- });
26
-
27
- const { conference } = toRefs(props);
28
-
29
- const { classBinding } = useClassBinding();
30
- </script>
31
-
32
- <template>
33
- <div :class="classBinding(classObject, 'container', '')">
34
- <CommonAgendaList
35
- :use-calendar="false"
36
- :conference="conference"
37
- :class-object="classObject.components.agendaList"
38
- style="margin-top: 0; margin-bottom: 0; border: none"
39
- />
40
- </div>
41
- </template>
42
-
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs } from "vue";
3
+ import { Conference } from "../../../models/conference";
4
+ import {
5
+ AgendaPanelClassObj,
6
+ AgendaPanelCompObj,
7
+ AgendaListClassObj,
8
+ } from "../../../@types/components";
9
+ import { useClassBinding } from "../../../composables/useClassBinding";
10
+
11
+ type Props = {
12
+ conference: Conference | null;
13
+ classObject?: AgendaPanelClassObj;
14
+ };
15
+
16
+ const props = withDefaults(defineProps<Props>(), {
17
+ classObject: () => {
18
+ return {
19
+ container: "",
20
+ components: ref<AgendaPanelCompObj>({
21
+ agendaList: ref<AgendaListClassObj>({}),
22
+ }),
23
+ };
24
+ },
25
+ });
26
+
27
+ const { conference } = toRefs(props);
28
+
29
+ const { classBinding } = useClassBinding();
30
+ </script>
31
+
32
+ <template>
33
+ <div :class="classBinding(classObject, 'container', '')">
34
+ <CommonAgendaList
35
+ :use-calendar="false"
36
+ :conference="conference"
37
+ :class-object="classObject.components.agendaList"
38
+ style="margin-top: 0; margin-bottom: 0; border: none"
39
+ />
40
+ </div>
41
+ </template>
42
+
43
43
  <style scoped>
44
44
  .sponsor-grid {
45
45
  display: grid;
@@ -51,4 +51,4 @@ const { classBinding } = useClassBinding();
51
51
  align-self: center;
52
52
  justify-self: center;
53
53
  }
54
- </style>
54
+ </style>
@@ -1,93 +1,93 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs, computed } from "vue";
3
- import { storeToRefs } from "pinia";
4
- import { useTemplateConfigsStore, useAuthStore } from "../../../store";
5
- import { Presentation } from "../../../models/conference";
6
- import {
7
- MediaContainerClassObj,
8
- MediaContainerCompObj,
9
- WebcastPlayerClassObj,
10
- } from "../../../@types/components";
11
- import { useClassBinding } from "../../../composables/useClassBinding";
12
-
13
- type Props = {
14
- presentation: Presentation;
15
- classObject?: MediaContainerClassObj;
16
- };
17
-
18
- const props = withDefaults(defineProps<Props>(), {
19
- classObject: () => {
20
- return {
21
- container: "",
22
- components: ref<MediaContainerCompObj>({
23
- webcastPlayer: ref<WebcastPlayerClassObj>({}),
24
- }),
25
- };
26
- },
27
- });
28
-
29
- const { presentation } = toRefs(props);
30
-
31
- const { classBinding } = useClassBinding();
32
-
33
- const { isLoggedIn } = storeToRefs(useAuthStore());
34
- const { pagesConfigValue } = storeToRefs(useTemplateConfigsStore());
35
-
36
- // emits
37
- const emit = defineEmits(["previewEnded"]);
38
-
39
- // data
40
- let playing = ref<boolean>(true);
41
-
42
- // computed
43
- const isPreview = computed((): boolean => {
44
- const previewEnabled = pagesConfigValue.value(
45
- "archive_player.preview_enabled",
46
- false
47
- );
48
- // @todo add check against conference-level portal configs
49
- // || pagesConfigValue.value("archive_player.preview_enabled", false);
50
- return !isLoggedIn && previewEnabled;
51
- });
52
-
53
- const previewDuration = computed((): number => {
54
- return pagesConfigValue.value("archive_player.preview_duration", 60);
55
- // @todo add check against conference-level portal configs
56
- // || pagesConfigValue.value("archive_player.preview_duration", 60);
57
- });
58
-
59
- // methods
60
- const firePreviewEnded = () => {
61
- playing.value = false;
62
- if (ref.mediaPlayer) {
63
- ref.mediaPlayer.stop();
64
- // @todo ensure emit will suffice
65
- // previewEnded = true;
66
- }
67
- emit("previewEnded");
68
- };
69
-
70
- const checkTime = (_time: Number) => {
71
- // @todo set current time for chapter timings only
72
- // setCurrentTime(_time);
73
- if (isPreview && _time >= previewDuration.value) {
74
- firePreviewEnded();
75
- }
76
- };
77
- </script>
78
-
79
- <template>
80
- <div :class="classBinding(classObject, 'container', 'media-container')">
81
- <CommonArchiveVideoPlayer
82
- ref="mediaPlayer"
83
- :presentation="presentation"
84
- :playing="playing"
85
- :class-object="classObject.components.webcastPlayer"
86
- @time="checkTime"
87
- ></CommonArchiveVideoPlayer>
88
- </div>
89
- </template>
90
-
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+ import { storeToRefs } from "pinia";
4
+ import { useTemplateConfigsStore, useAuthStore } from "../../../store";
5
+ import { Presentation } from "../../../models/conference";
6
+ import {
7
+ MediaContainerClassObj,
8
+ MediaContainerCompObj,
9
+ WebcastPlayerClassObj,
10
+ } from "../../../@types/components";
11
+ import { useClassBinding } from "../../../composables/useClassBinding";
12
+
13
+ type Props = {
14
+ presentation: Presentation;
15
+ classObject?: MediaContainerClassObj;
16
+ };
17
+
18
+ const props = withDefaults(defineProps<Props>(), {
19
+ classObject: () => {
20
+ return {
21
+ container: "",
22
+ components: ref<MediaContainerCompObj>({
23
+ webcastPlayer: ref<WebcastPlayerClassObj>({}),
24
+ }),
25
+ };
26
+ },
27
+ });
28
+
29
+ const { presentation } = toRefs(props);
30
+
31
+ const { classBinding } = useClassBinding();
32
+
33
+ const { isLoggedIn } = storeToRefs(useAuthStore());
34
+ const { pagesConfigValue } = storeToRefs(useTemplateConfigsStore());
35
+
36
+ // emits
37
+ const emit = defineEmits(["previewEnded"]);
38
+
39
+ // data
40
+ let playing = ref<boolean>(true);
41
+
42
+ // computed
43
+ const isPreview = computed((): boolean => {
44
+ const previewEnabled = pagesConfigValue.value(
45
+ "archive_player.preview_enabled",
46
+ false
47
+ );
48
+ // @todo add check against conference-level portal configs
49
+ // || pagesConfigValue.value("archive_player.preview_enabled", false);
50
+ return !isLoggedIn && previewEnabled;
51
+ });
52
+
53
+ const previewDuration = computed((): number => {
54
+ return pagesConfigValue.value("archive_player.preview_duration", 60);
55
+ // @todo add check against conference-level portal configs
56
+ // || pagesConfigValue.value("archive_player.preview_duration", 60);
57
+ });
58
+
59
+ // methods
60
+ const firePreviewEnded = () => {
61
+ playing.value = false;
62
+ if (ref.mediaPlayer) {
63
+ ref.mediaPlayer.stop();
64
+ // @todo ensure emit will suffice
65
+ // previewEnded = true;
66
+ }
67
+ emit("previewEnded");
68
+ };
69
+
70
+ const checkTime = (_time: Number) => {
71
+ // @todo set current time for chapter timings only
72
+ // setCurrentTime(_time);
73
+ if (isPreview && _time >= previewDuration.value) {
74
+ firePreviewEnded();
75
+ }
76
+ };
77
+ </script>
78
+
79
+ <template>
80
+ <div :class="classBinding(classObject, 'container', 'media-container')">
81
+ <CommonArchiveVideoPlayer
82
+ ref="mediaPlayer"
83
+ :presentation="presentation"
84
+ :playing="playing"
85
+ :class-object="classObject.components.webcastPlayer"
86
+ @time="checkTime"
87
+ ></CommonArchiveVideoPlayer>
88
+ </div>
89
+ </template>
90
+
91
91
  <style scoped>
92
92
  .media-container {
93
93
  display: grid;
@@ -133,4 +133,4 @@ const checkTime = (_time: Number) => {
133
133
  opacity: 0.7;
134
134
  }
135
135
  }
136
- </style>
136
+ </style>