@icvdeveloper/common-module 0.0.127 → 0.0.129

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 (92) 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 +329 -329
  33. package/dist/runtime/components/agenda/AgendaList.vue +259 -259
  34. package/dist/runtime/components/agenda/AgendaTabbed.vue +305 -305
  35. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +67 -67
  36. package/dist/runtime/components/agenda/components/Calendar.vue +67 -67
  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 +129 -129
  45. package/dist/runtime/components/core/Accordion.vue +97 -97
  46. package/dist/runtime/components/core/CountdownTimer.vue +336 -336
  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 +554 -554
  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 +160 -160
  64. package/dist/runtime/components/media/ArchiveVideoPlayer.vue +186 -186
  65. package/dist/runtime/components/media/PlayerAndContentContainer.vue +183 -183
  66. package/dist/runtime/components/media/WebcastVideoPlayer.vue +140 -140
  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/ContentArea.vue +158 -158
  72. package/dist/runtime/components/media/components/ContentTabs.vue +231 -231
  73. package/dist/runtime/components/media/components/DocumentsPanel.vue +31 -31
  74. package/dist/runtime/components/media/components/JsonApi.vue +31 -31
  75. package/dist/runtime/components/media/components/MediaContainer.vue +63 -63
  76. package/dist/runtime/components/media/components/OverviewPanel.vue +52 -52
  77. package/dist/runtime/components/media/components/PresentersPanel.vue +52 -52
  78. package/dist/runtime/components/media/components/SessionReporting.vue +107 -102
  79. package/dist/runtime/components/media/components/SponsorsPanel.vue +71 -71
  80. package/dist/runtime/components/media/components/WindowContent.vue +92 -92
  81. package/dist/runtime/components/media/components/WindowSlide.vue +72 -72
  82. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  83. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  84. package/dist/runtime/components/profile/Profile.vue +149 -149
  85. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  86. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  87. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  88. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  89. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  90. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  91. package/dist/runtime/composables/useApi.mjs +3 -1
  92. package/package.json +1 -1
@@ -1,183 +1,183 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs, computed } from "vue";
3
- import { storeToRefs } from "pinia";
4
- import { useRoute } from "vue-router";
5
- import { useEvents } from "../../composables/useEvents";
6
- import { useClassBinding } from "../../composables/useClassBinding";
7
- import { Conference, Presentation } from "../../models/conference";
8
- import { SelectedContent } from "../../enums/general";
9
- import { usePresentationsStore } from "../../store/presentations";
10
- import { useAuthStore } from "../../store/auth";
11
- import {
12
- PlayerAndContentClassObj,
13
- PlayerAndContentCompObj,
14
- ContentTabsClassObj,
15
- ContentAreaClassObj,
16
- MediaContainerClassObj,
17
- } from "../../@types/components";
18
-
19
- type Props = {
20
- conference: Conference;
21
- presentation: Presentation;
22
- tabs?: Array<{ label: string; type: SelectedContent; content: string }>;
23
- classObject?: PlayerAndContentClassObj;
24
- };
25
-
26
- const props = withDefaults(defineProps<Props>(), {
27
- tabs: () => {
28
- return [
29
- { label: "Overview", type: SelectedContent.OVERVIEW, content: "string" },
30
- ];
31
- },
32
- classObject: () => {
33
- return {
34
- container: "",
35
- noTabsContainer: "",
36
- noTabsChild: "",
37
- withTabsContainer: "",
38
- withTabsChild: "",
39
- mediaTabsContainer: "",
40
- components: ref<PlayerAndContentCompObj>({
41
- contentTabs: ref<ContentTabsClassObj>({}),
42
- contentArea: ref<ContentAreaClassObj>({}),
43
- mediaContainer: ref<MediaContainerClassObj>({}),
44
- }),
45
- };
46
- },
47
- });
48
-
49
- const { conference, presentation } = toRefs(props);
50
-
51
- const route = useRoute();
52
-
53
- const { classBinding } = useClassBinding();
54
- const { getSponsors } = useEvents();
55
-
56
- const { selectedContent } = storeToRefs(usePresentationsStore());
57
- const { isLoggedIn } = storeToRefs(useAuthStore());
58
-
59
- // computed
60
-
61
- const isStreamTest = computed((): boolean => {
62
- return (
63
- route.params.channelid === "stream-test" ||
64
- String(route.name) === "stream-test"
65
- );
66
- });
67
-
68
- const hasAccess = computed((): boolean => {
69
- return isLoggedIn.value && conference.value.access;
70
- });
71
- </script>
72
-
73
- <template>
74
- <div :class="classBinding(classObject, 'container', 'flex flex-col w-full')">
75
- <!-- NO TABS -->
76
- <div
77
- v-if="isStreamTest || (hasAccess && !tabs.length)"
78
- :class="
79
- classBinding(
80
- classObject,
81
- 'noTabsContainer',
82
- 'container mx-auto flex flex-col text-center pt-6'
83
- )
84
- "
85
- >
86
- <div :class="classBinding(classObject, 'noTabsChild', 'flex-1')">
87
- <CommonComponentsMediaContainer
88
- :class="
89
- classBinding(
90
- classObject,
91
- 'classObject.components.mediaContainer.container',
92
- 'flex-1 aspect-video'
93
- )
94
- "
95
- :webcast-conference="conference"
96
- :class-object="classObject.components.mediaContainer"
97
- />
98
- </div>
99
- </div>
100
-
101
- <!-- TABS -->
102
- <div v-else :class="classBinding(classObject, 'withTabsContainer', '')">
103
- <CommonComponentsContentTabs
104
- :class="
105
- classBinding(
106
- classObject,
107
- 'classObject.components.contentTabs.container',
108
- 'hidden md:block'
109
- )
110
- "
111
- :webcast-conference="conference"
112
- :items="tabs"
113
- :class-object="classObject.components.contentTabs"
114
- />
115
- <div
116
- :class="
117
- classBinding(
118
- classObject,
119
- 'withTabsChild',
120
- 'flex-1 grid grid-cols-7 grid-rows-2 gap-y-4'
121
- )
122
- "
123
- >
124
- <div
125
- :class="
126
- classBinding(
127
- classObject,
128
- 'mediaTabsContainer',
129
- 'col-span-7 row-span-1 md:col-span-4 lg:col-span-5 aspect-video'
130
- )
131
- "
132
- >
133
- <CommonComponentsMediaContainer
134
- class="w-full"
135
- :webcast-conference="conference"
136
- :class-object="classObject.components.mediaContainer"
137
- />
138
- <CommonComponentsContentTabs
139
- class="block md:hidden"
140
- :webcast-conference="conference"
141
- :items="tabs"
142
- :class-object="classObject.components.contentTabs"
143
- />
144
- </div>
145
- <CommonComponentsContentArea
146
- class="col-span-7 row-span-1 md:col-span-3 lg:col-span-2 border ml-0 md:ml-6"
147
- :selected-content="selectedContent"
148
- :webcast-conference="conference"
149
- :presentation="presentation"
150
- :class-object="classObject.components.contentArea"
151
- />
152
- <!-- sponsor -->
153
- <figure
154
- class="col-span-7 md:col-start-5 md:col-span-3 lg:col-start-6 lg:col-span-6 row-span-1 flex flex-col p-6 text-center"
155
- >
156
- <template
157
- v-for="(affiliate, index) in getSponsors(conference.affiliates)"
158
- :key="index"
159
- >
160
- <h3
161
- v-if="index === 0"
162
- :class="classBinding(classObject, 'sponsoredByText', 'hidden')"
163
- >
164
- Sponsored by:
165
- </h3>
166
- <CommonComponentsSponsor
167
- :sponsor="affiliate"
168
- :class-object="{
169
- labelImageContainer: 'block',
170
- sponsorContainer: 'img-mx-auto',
171
- }"
172
- />
173
- </template>
174
- </figure>
175
- </div>
176
- </div>
177
- <CommonComponentsSessionReporting
178
- v-if="!isStreamTest"
179
- ref="sessionReporting"
180
- :loggable-id="presentation.id"
181
- />
182
- </div>
183
- </template>
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+ import { storeToRefs } from "pinia";
4
+ import { useRoute } from "vue-router";
5
+ import { useEvents } from "../../composables/useEvents";
6
+ import { useClassBinding } from "../../composables/useClassBinding";
7
+ import { Conference, Presentation } from "../../models/conference";
8
+ import { SelectedContent } from "../../enums/general";
9
+ import { usePresentationsStore } from "../../store/presentations";
10
+ import { useAuthStore } from "../../store/auth";
11
+ import {
12
+ PlayerAndContentClassObj,
13
+ PlayerAndContentCompObj,
14
+ ContentTabsClassObj,
15
+ ContentAreaClassObj,
16
+ MediaContainerClassObj,
17
+ } from "../../@types/components";
18
+
19
+ type Props = {
20
+ conference: Conference;
21
+ presentation: Presentation;
22
+ tabs?: Array<{ label: string; type: SelectedContent; content: string }>;
23
+ classObject?: PlayerAndContentClassObj;
24
+ };
25
+
26
+ const props = withDefaults(defineProps<Props>(), {
27
+ tabs: () => {
28
+ return [
29
+ { label: "Overview", type: SelectedContent.OVERVIEW, content: "string" },
30
+ ];
31
+ },
32
+ classObject: () => {
33
+ return {
34
+ container: "",
35
+ noTabsContainer: "",
36
+ noTabsChild: "",
37
+ withTabsContainer: "",
38
+ withTabsChild: "",
39
+ mediaTabsContainer: "",
40
+ components: ref<PlayerAndContentCompObj>({
41
+ contentTabs: ref<ContentTabsClassObj>({}),
42
+ contentArea: ref<ContentAreaClassObj>({}),
43
+ mediaContainer: ref<MediaContainerClassObj>({}),
44
+ }),
45
+ };
46
+ },
47
+ });
48
+
49
+ const { conference, presentation } = toRefs(props);
50
+
51
+ const route = useRoute();
52
+
53
+ const { classBinding } = useClassBinding();
54
+ const { getSponsors } = useEvents();
55
+
56
+ const { selectedContent } = storeToRefs(usePresentationsStore());
57
+ const { isLoggedIn } = storeToRefs(useAuthStore());
58
+
59
+ // computed
60
+
61
+ const isStreamTest = computed((): boolean => {
62
+ return (
63
+ route.params.channelid === "stream-test" ||
64
+ String(route.name) === "stream-test"
65
+ );
66
+ });
67
+
68
+ const hasAccess = computed((): boolean => {
69
+ return isLoggedIn.value && conference.value.access;
70
+ });
71
+ </script>
72
+
73
+ <template>
74
+ <div :class="classBinding(classObject, 'container', 'flex flex-col w-full')">
75
+ <!-- NO TABS -->
76
+ <div
77
+ v-if="isStreamTest || (hasAccess && !tabs.length)"
78
+ :class="
79
+ classBinding(
80
+ classObject,
81
+ 'noTabsContainer',
82
+ 'container mx-auto flex flex-col text-center pt-6'
83
+ )
84
+ "
85
+ >
86
+ <div :class="classBinding(classObject, 'noTabsChild', 'flex-1')">
87
+ <CommonComponentsMediaContainer
88
+ :class="
89
+ classBinding(
90
+ classObject,
91
+ 'classObject.components.mediaContainer.container',
92
+ 'flex-1 aspect-video'
93
+ )
94
+ "
95
+ :webcast-conference="conference"
96
+ :class-object="classObject.components.mediaContainer"
97
+ />
98
+ </div>
99
+ </div>
100
+
101
+ <!-- TABS -->
102
+ <div v-else :class="classBinding(classObject, 'withTabsContainer', '')">
103
+ <CommonComponentsContentTabs
104
+ :class="
105
+ classBinding(
106
+ classObject,
107
+ 'classObject.components.contentTabs.container',
108
+ 'hidden md:block'
109
+ )
110
+ "
111
+ :webcast-conference="conference"
112
+ :items="tabs"
113
+ :class-object="classObject.components.contentTabs"
114
+ />
115
+ <div
116
+ :class="
117
+ classBinding(
118
+ classObject,
119
+ 'withTabsChild',
120
+ 'flex-1 grid grid-cols-7 grid-rows-2 gap-y-4'
121
+ )
122
+ "
123
+ >
124
+ <div
125
+ :class="
126
+ classBinding(
127
+ classObject,
128
+ 'mediaTabsContainer',
129
+ 'col-span-7 row-span-1 md:col-span-4 lg:col-span-5 aspect-video'
130
+ )
131
+ "
132
+ >
133
+ <CommonComponentsMediaContainer
134
+ class="w-full"
135
+ :webcast-conference="conference"
136
+ :class-object="classObject.components.mediaContainer"
137
+ />
138
+ <CommonComponentsContentTabs
139
+ class="block md:hidden"
140
+ :webcast-conference="conference"
141
+ :items="tabs"
142
+ :class-object="classObject.components.contentTabs"
143
+ />
144
+ </div>
145
+ <CommonComponentsContentArea
146
+ class="col-span-7 row-span-1 md:col-span-3 lg:col-span-2 border ml-0 md:ml-6"
147
+ :selected-content="selectedContent"
148
+ :webcast-conference="conference"
149
+ :presentation="presentation"
150
+ :class-object="classObject.components.contentArea"
151
+ />
152
+ <!-- sponsor -->
153
+ <figure
154
+ class="col-span-7 md:col-start-5 md:col-span-3 lg:col-start-6 lg:col-span-6 row-span-1 flex flex-col p-6 text-center"
155
+ >
156
+ <template
157
+ v-for="(affiliate, index) in getSponsors(conference.affiliates)"
158
+ :key="index"
159
+ >
160
+ <h3
161
+ v-if="index === 0"
162
+ :class="classBinding(classObject, 'sponsoredByText', 'hidden')"
163
+ >
164
+ Sponsored by:
165
+ </h3>
166
+ <CommonComponentsSponsor
167
+ :sponsor="affiliate"
168
+ :class-object="{
169
+ labelImageContainer: 'block',
170
+ sponsorContainer: 'img-mx-auto',
171
+ }"
172
+ />
173
+ </template>
174
+ </figure>
175
+ </div>
176
+ </div>
177
+ <CommonComponentsSessionReporting
178
+ v-if="!isStreamTest"
179
+ ref="sessionReporting"
180
+ :loggable-id="presentation.id"
181
+ />
182
+ </div>
183
+ </template>
@@ -1,140 +1,140 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs, computed, watch, onMounted, nextTick } from "vue";
3
- import { get } from "lodash-es";
4
- import { Presentation, Stream, PlayerObj } from "../../models/conference";
5
- import { WebcastPlayerClassObj } from "../../@types/components";
6
- import { useScripts } from "../../composables/useScripts";
7
- import { useClassBinding } from "../../composables/useClassBinding";
8
-
9
- type Props = {
10
- stream: Stream;
11
- presentation: Presentation;
12
- classObject?: WebcastPlayerClassObj;
13
- };
14
-
15
- const props = withDefaults(defineProps<Props>(), {
16
- classObject: () => {
17
- return {
18
- container: "",
19
- playerElement: "",
20
- embedElement: "",
21
- };
22
- },
23
- });
24
-
25
- const { stream, presentation } = toRefs(props);
26
-
27
- const { loadScripts } = useScripts();
28
- const { classBinding } = useClassBinding();
29
-
30
- // data
31
- let icvPlayerObj: PlayerObj = {
32
- autostart: false,
33
- format: "hls",
34
- playerDiv: "mediaPlayer",
35
- loadCustomStream: () => {},
36
- };
37
-
38
- // computed
39
- const isHtml = computed(() => {
40
- return stream.value.type === "embed";
41
- });
42
-
43
- const isHls = computed(() => {
44
- return stream.value.type === "hls";
45
- });
46
-
47
- // methods
48
- const setupMediaPlayer = () => {
49
- if (icvPlayerObj) {
50
- icvPlayerObj = <PlayerObj>{};
51
- }
52
- if (isHls.value) {
53
- nextTick(() => {
54
- icvPlayerObj = new window.ICVDMStreamPlayer();
55
- icvPlayerObj.format = stream.value.type;
56
- icvPlayerObj.playerDiv = "mediaPlayer";
57
- icvPlayerObj.autostart = true;
58
- playStream();
59
- });
60
- }
61
- };
62
-
63
- const playStream = () => {
64
- if (isHls.value) {
65
- icvPlayerObj.format = ["audio", "audio_slide"].includes(stream.value.type)
66
- ? "audio"
67
- : "video";
68
- icvPlayerObj.loadCustomStream({
69
- file: stream.value.hls_url,
70
- });
71
- }
72
- };
73
-
74
- // watchers
75
- watch(
76
- presentation,
77
- (_oldPresentation: Presentation, _newPresentation: Presentation) => {
78
- if (_oldPresentation.type !== _newPresentation.type) {
79
- setupMediaPlayer();
80
- }
81
- }
82
- );
83
-
84
- watch(stream, (_oldStream, _newStream) => {
85
- if (_oldStream !== _newStream) {
86
- setupMediaPlayer();
87
- }
88
- });
89
-
90
- // on mount
91
- // @todo figure out why ICVDMStreamPlayer doesn't load when loadScripts is run asynchroniously
92
- onMounted(() => {
93
- const _script = document.createElement("script");
94
- _script.setAttribute(
95
- "src",
96
- "https://cdn.v3mediaportal.com/streaming-player/js/icvdm.player.min.js?_id=75"
97
- );
98
- document.head.appendChild(_script);
99
- _script.onload = () => {
100
- if (get(window, "ICVDMStreamPlayer", false)) {
101
- setupMediaPlayer();
102
- }
103
- };
104
- });
105
- </script>
106
-
107
- <template>
108
- <div
109
- id="webcast-player-container"
110
- :class="classBinding(classObject, 'container', 'text-center')"
111
- >
112
- <div
113
- v-if="isHls"
114
- id="mediaPlayer"
115
- ref="mediaPlayer"
116
- :class="classBinding(classObject, 'playerElement', '')"
117
- ></div>
118
- <span
119
- v-if="isHtml"
120
- :v-html="stream.embed_html"
121
- :class="classBinding(classObject, 'embedElement', '')"
122
- ></span>
123
- </div>
124
- </template>
125
-
126
- <style>
127
- #webcast-player-container > span {
128
- padding-bottom: 56.25%;
129
- height: 0;
130
- position: relative;
131
- display: block;
132
- }
133
- #webcast-player-container > span > iframe {
134
- position: absolute;
135
- top: 0;
136
- left: 0;
137
- height: 100%;
138
- width: 100%;
139
- }
140
- </style>
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed, watch, onMounted, nextTick } from "vue";
3
+ import { get } from "lodash-es";
4
+ import { Presentation, Stream, PlayerObj } from "../../models/conference";
5
+ import { WebcastPlayerClassObj } from "../../@types/components";
6
+ import { useScripts } from "../../composables/useScripts";
7
+ import { useClassBinding } from "../../composables/useClassBinding";
8
+
9
+ type Props = {
10
+ stream: Stream;
11
+ presentation: Presentation;
12
+ classObject?: WebcastPlayerClassObj;
13
+ };
14
+
15
+ const props = withDefaults(defineProps<Props>(), {
16
+ classObject: () => {
17
+ return {
18
+ container: "",
19
+ playerElement: "",
20
+ embedElement: "",
21
+ };
22
+ },
23
+ });
24
+
25
+ const { stream, presentation } = toRefs(props);
26
+
27
+ const { loadScripts } = useScripts();
28
+ const { classBinding } = useClassBinding();
29
+
30
+ // data
31
+ let icvPlayerObj: PlayerObj = {
32
+ autostart: false,
33
+ format: "hls",
34
+ playerDiv: "mediaPlayer",
35
+ loadCustomStream: () => {},
36
+ };
37
+
38
+ // computed
39
+ const isHtml = computed(() => {
40
+ return stream.value.type === "embed";
41
+ });
42
+
43
+ const isHls = computed(() => {
44
+ return stream.value.type === "hls";
45
+ });
46
+
47
+ // methods
48
+ const setupMediaPlayer = () => {
49
+ if (icvPlayerObj) {
50
+ icvPlayerObj = <PlayerObj>{};
51
+ }
52
+ if (isHls.value) {
53
+ nextTick(() => {
54
+ icvPlayerObj = new window.ICVDMStreamPlayer();
55
+ icvPlayerObj.format = stream.value.type;
56
+ icvPlayerObj.playerDiv = "mediaPlayer";
57
+ icvPlayerObj.autostart = true;
58
+ playStream();
59
+ });
60
+ }
61
+ };
62
+
63
+ const playStream = () => {
64
+ if (isHls.value) {
65
+ icvPlayerObj.format = ["audio", "audio_slide"].includes(stream.value.type)
66
+ ? "audio"
67
+ : "video";
68
+ icvPlayerObj.loadCustomStream({
69
+ file: stream.value.hls_url,
70
+ });
71
+ }
72
+ };
73
+
74
+ // watchers
75
+ watch(
76
+ presentation,
77
+ (_oldPresentation: Presentation, _newPresentation: Presentation) => {
78
+ if (_oldPresentation.type !== _newPresentation.type) {
79
+ setupMediaPlayer();
80
+ }
81
+ }
82
+ );
83
+
84
+ watch(stream, (_oldStream, _newStream) => {
85
+ if (_oldStream !== _newStream) {
86
+ setupMediaPlayer();
87
+ }
88
+ });
89
+
90
+ // on mount
91
+ // @todo figure out why ICVDMStreamPlayer doesn't load when loadScripts is run asynchroniously
92
+ onMounted(() => {
93
+ const _script = document.createElement("script");
94
+ _script.setAttribute(
95
+ "src",
96
+ "https://cdn.v3mediaportal.com/streaming-player/js/icvdm.player.min.js?_id=75"
97
+ );
98
+ document.head.appendChild(_script);
99
+ _script.onload = () => {
100
+ if (get(window, "ICVDMStreamPlayer", false)) {
101
+ setupMediaPlayer();
102
+ }
103
+ };
104
+ });
105
+ </script>
106
+
107
+ <template>
108
+ <div
109
+ id="webcast-player-container"
110
+ :class="classBinding(classObject, 'container', 'text-center')"
111
+ >
112
+ <div
113
+ v-if="isHls"
114
+ id="mediaPlayer"
115
+ ref="mediaPlayer"
116
+ :class="classBinding(classObject, 'playerElement', '')"
117
+ ></div>
118
+ <span
119
+ v-if="isHtml"
120
+ :v-html="stream.embed_html"
121
+ :class="classBinding(classObject, 'embedElement', '')"
122
+ ></span>
123
+ </div>
124
+ </template>
125
+
126
+ <style>
127
+ #webcast-player-container > span {
128
+ padding-bottom: 56.25%;
129
+ height: 0;
130
+ position: relative;
131
+ display: block;
132
+ }
133
+ #webcast-player-container > span > iframe {
134
+ position: absolute;
135
+ top: 0;
136
+ left: 0;
137
+ height: 100%;
138
+ width: 100%;
139
+ }
140
+ </style>