@saooti/octopus-sdk 37.0.15 → 37.0.16
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/index.html +9 -0
- package/package.json +1 -1
- package/src/assets/share.scss +2 -2
- package/src/components/display/podcasts/PodcastImage.vue +22 -4
- package/src/components/display/podcasts/PodcastModuleBox.vue +1 -5
- package/src/components/display/sharing/ShareButtons.vue +2 -0
- package/src/components/misc/player/PlayerComponent.vue +54 -39
- package/src/components/misc/player/PlayerVideo.vue +106 -0
- package/src/stores/PlayerStore.ts +7 -2
- package/src/stores/class/general/podcast.ts +3 -0
- package/src/stores/class/general/video.ts +8 -0
package/index.html
CHANGED
|
@@ -16,5 +16,14 @@
|
|
|
16
16
|
<div id="app"></div>
|
|
17
17
|
<!-- built files will be auto injected -->
|
|
18
18
|
</body>
|
|
19
|
+
<!-- Test digiteka video -->
|
|
20
|
+
<script type="text/javascript">
|
|
21
|
+
var _ultimedia_host = (window.location.protocol == 'https:' ? 'https' : 'http') + "://www.ultimedia.com";
|
|
22
|
+
var _ultimedia_script = document.createElement("script");
|
|
23
|
+
|
|
24
|
+
_ultimedia_script.setAttribute("type", "text/javascript");
|
|
25
|
+
_ultimedia_script.setAttribute("src", _ultimedia_host + '/js/common/visible_player.js');
|
|
26
|
+
document.getElementsByTagName('head')[0].appendChild(_ultimedia_script);
|
|
27
|
+
</script>
|
|
19
28
|
<script type="module" src="./src/main.ts"></script>
|
|
20
29
|
</html>
|
package/package.json
CHANGED
package/src/assets/share.scss
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
v-if="hidePlay || recordingLive"
|
|
33
33
|
class="image-play-button"
|
|
34
34
|
:class="classicPodcastPlay ? '' : 'transparent-background'"
|
|
35
|
-
@click="play"
|
|
35
|
+
@click="play(false)"
|
|
36
36
|
>
|
|
37
37
|
<div v-if="!isLiveToBeRecorded" class="icon-container">
|
|
38
38
|
<div v-if="!playingPodcast" :title="$t('Play')" class="saooti-play" />
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
{{ textVisible }}
|
|
62
62
|
</div>
|
|
63
63
|
</button>
|
|
64
|
+
<button
|
|
65
|
+
v-if="isVideoPodcast"
|
|
66
|
+
class="btn admin-button btn-play-video saooti-video"
|
|
67
|
+
@click="play(true)"
|
|
68
|
+
></button>
|
|
64
69
|
<div
|
|
65
70
|
v-if="displayDescription && isMobile"
|
|
66
71
|
class="background-icon bg-primary saooti-arrow-up"
|
|
@@ -102,7 +107,11 @@ export default defineComponent({
|
|
|
102
107
|
"playerPodcast",
|
|
103
108
|
"playerLive",
|
|
104
109
|
"playerStatus",
|
|
110
|
+
"playerVideo"
|
|
105
111
|
]),
|
|
112
|
+
isVideoPodcast(): boolean{
|
|
113
|
+
return undefined!==this.podcast.video?.videoId;
|
|
114
|
+
},
|
|
106
115
|
playingPodcast() {
|
|
107
116
|
return (
|
|
108
117
|
this.playerPodcast?.podcastId === this.podcast.podcastId ||
|
|
@@ -248,16 +257,16 @@ export default defineComponent({
|
|
|
248
257
|
|
|
249
258
|
methods: {
|
|
250
259
|
...mapActions(usePlayerStore, ["playerChangeStatus", "playerPlay"]),
|
|
251
|
-
play(): void {
|
|
260
|
+
play(isVideo: boolean): void {
|
|
252
261
|
if (this.isLiveToBeRecorded) {
|
|
253
262
|
return;
|
|
254
263
|
}
|
|
255
|
-
if (this.playingPodcast) {
|
|
264
|
+
if (this.playingPodcast && isVideo===this.playerVideo) {
|
|
256
265
|
this.playerChangeStatus("PLAYING" === this.playerStatus);
|
|
257
266
|
return;
|
|
258
267
|
}
|
|
259
268
|
if (!this.recordingLive) {
|
|
260
|
-
this.playerPlay(this.podcast);
|
|
269
|
+
this.playerPlay(this.podcast, isVideo);
|
|
261
270
|
} else {
|
|
262
271
|
this.playerPlay({
|
|
263
272
|
...this.podcast,
|
|
@@ -310,6 +319,15 @@ export default defineComponent({
|
|
|
310
319
|
background-color: rgba(255, 255, 255, 0.5);
|
|
311
320
|
}
|
|
312
321
|
|
|
322
|
+
.btn.btn-play-video{
|
|
323
|
+
position: absolute;
|
|
324
|
+
bottom: 0;
|
|
325
|
+
right: 0;
|
|
326
|
+
margin: 0.5rem;
|
|
327
|
+
background: $primaryColorLessTransparent !important;
|
|
328
|
+
color:white !important
|
|
329
|
+
}
|
|
330
|
+
|
|
313
331
|
.image-play-button .play-button-error-icon {
|
|
314
332
|
background: #0000009d !important;
|
|
315
333
|
cursor: default !important;
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
:playing-podcast="playingPodcast"
|
|
18
18
|
:fetch-conference="fetchConference"
|
|
19
19
|
:is-animator-live="isOctopusAndAnimator"
|
|
20
|
-
@play-podcast="playPodcast"
|
|
21
20
|
/>
|
|
22
21
|
<div class="d-flex justify-content-between flex-wrap mb-2">
|
|
23
22
|
<div v-if="0 !== date.length" :class="!isLiveReady ? 'me-5' : ''">
|
|
@@ -173,7 +172,7 @@ export default defineComponent({
|
|
|
173
172
|
fetchConference: { default: undefined, type: Object as () => Conference },
|
|
174
173
|
},
|
|
175
174
|
|
|
176
|
-
emits: ["
|
|
175
|
+
emits: ["updatePodcast"],
|
|
177
176
|
|
|
178
177
|
computed: {
|
|
179
178
|
errorMessage(): string {
|
|
@@ -261,9 +260,6 @@ export default defineComponent({
|
|
|
261
260
|
},
|
|
262
261
|
},
|
|
263
262
|
methods: {
|
|
264
|
-
playPodcast(podcast: Podcast): void {
|
|
265
|
-
this.$emit("playPodcast", podcast);
|
|
266
|
-
},
|
|
267
263
|
removeDeleted(): void {
|
|
268
264
|
if (window.history.length > 1) {
|
|
269
265
|
this.$router.go(-1);
|
|
@@ -1,48 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="player-container"
|
|
4
|
+
:class="playerVideo? 'player-video':''"
|
|
4
5
|
:style="{ height: playerHeight }"
|
|
5
6
|
@transitionend="onHidden"
|
|
6
7
|
>
|
|
7
8
|
<template v-if="display">
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
autoplay
|
|
12
|
-
@timeupdate="onTimeUpdate"
|
|
13
|
-
@ended="onFinished"
|
|
14
|
-
@playing="onPlay"
|
|
15
|
-
@durationChange="onTimeUpdate"
|
|
16
|
-
@error="onError"
|
|
17
|
-
@seeked="onSeeked"
|
|
18
|
-
@pause="onPause"
|
|
19
|
-
/>
|
|
20
|
-
<PlayerCompact
|
|
21
|
-
v-if="!playerLargeVersion"
|
|
22
|
-
v-model:notListenTime="notListenTime"
|
|
23
|
-
:player-error="playerError"
|
|
24
|
-
:comments="comments"
|
|
25
|
-
:display-alert-bar="displayAlertBar"
|
|
26
|
-
:percent-live-progress="percentLiveProgress"
|
|
27
|
-
:duration-live-position="durationLivePosition"
|
|
28
|
-
:listen-time="listenTime"
|
|
29
|
-
:hlsReady="hlsReady"
|
|
30
|
-
@stop-player="stopPlayer"
|
|
31
|
-
@change-player-large-version="playerUpdateLargeVersion(true)"
|
|
32
|
-
/>
|
|
33
|
-
<PlayerLarge
|
|
34
|
-
v-else
|
|
35
|
-
v-model:notListenTime="notListenTime"
|
|
36
|
-
:player-error="playerError"
|
|
37
|
-
:comments="comments"
|
|
38
|
-
:display-alert-bar="displayAlertBar"
|
|
39
|
-
:percent-live-progress="percentLiveProgress"
|
|
40
|
-
:duration-live-position="durationLivePosition"
|
|
41
|
-
:listen-time="listenTime"
|
|
42
|
-
:hlsReady="hlsReady"
|
|
43
|
-
@stop-player="stopPlayer"
|
|
44
|
-
@change-player-large-version="playerUpdateLargeVersion(false)"
|
|
9
|
+
<PlayerVideo
|
|
10
|
+
v-if="playerVideo"
|
|
11
|
+
@close="closePlayer"
|
|
45
12
|
/>
|
|
13
|
+
<template v-else>
|
|
14
|
+
<audio
|
|
15
|
+
id="audio-player"
|
|
16
|
+
:src="!playerLive && !playerRadio ? audioUrlToPlay : undefined"
|
|
17
|
+
autoplay
|
|
18
|
+
@timeupdate="onTimeUpdate"
|
|
19
|
+
@ended="onFinished"
|
|
20
|
+
@playing="onPlay"
|
|
21
|
+
@durationChange="onTimeUpdate"
|
|
22
|
+
@error="onError"
|
|
23
|
+
@seeked="onSeeked"
|
|
24
|
+
@pause="onPause"
|
|
25
|
+
/>
|
|
26
|
+
<PlayerCompact
|
|
27
|
+
v-if="!playerLargeVersion"
|
|
28
|
+
v-model:notListenTime="notListenTime"
|
|
29
|
+
:player-error="playerError"
|
|
30
|
+
:comments="comments"
|
|
31
|
+
:display-alert-bar="displayAlertBar"
|
|
32
|
+
:percent-live-progress="percentLiveProgress"
|
|
33
|
+
:duration-live-position="durationLivePosition"
|
|
34
|
+
:listen-time="listenTime"
|
|
35
|
+
:hlsReady="hlsReady"
|
|
36
|
+
@stop-player="stopPlayer"
|
|
37
|
+
@change-player-large-version="playerUpdateLargeVersion(true)"
|
|
38
|
+
/>
|
|
39
|
+
<PlayerLarge
|
|
40
|
+
v-else
|
|
41
|
+
v-model:notListenTime="notListenTime"
|
|
42
|
+
:player-error="playerError"
|
|
43
|
+
:comments="comments"
|
|
44
|
+
:display-alert-bar="displayAlertBar"
|
|
45
|
+
:percent-live-progress="percentLiveProgress"
|
|
46
|
+
:duration-live-position="durationLivePosition"
|
|
47
|
+
:listen-time="listenTime"
|
|
48
|
+
:hlsReady="hlsReady"
|
|
49
|
+
@stop-player="stopPlayer"
|
|
50
|
+
@change-player-large-version="playerUpdateLargeVersion(false)"
|
|
51
|
+
/>
|
|
52
|
+
</template>
|
|
46
53
|
</template>
|
|
47
54
|
</div>
|
|
48
55
|
</template>
|
|
@@ -53,13 +60,17 @@ import PlayerCompact from "../player/PlayerCompact.vue";
|
|
|
53
60
|
import PlayerLarge from "../player/PlayerLarge.vue";
|
|
54
61
|
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
55
62
|
import { mapState, mapActions } from "pinia";
|
|
56
|
-
import { defineComponent } from "vue";
|
|
63
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
64
|
+
const PlayerVideo = defineAsyncComponent(
|
|
65
|
+
() => import("../player/PlayerVideo.vue"),
|
|
66
|
+
);
|
|
57
67
|
export default defineComponent({
|
|
58
68
|
name: "PlayerComponent",
|
|
59
69
|
|
|
60
70
|
components: {
|
|
61
71
|
PlayerCompact,
|
|
62
72
|
PlayerLarge,
|
|
73
|
+
PlayerVideo
|
|
63
74
|
},
|
|
64
75
|
mixins: [playerLogic],
|
|
65
76
|
emits: ["hide"],
|
|
@@ -85,6 +96,7 @@ export default defineComponent({
|
|
|
85
96
|
"playerStatus",
|
|
86
97
|
"playerHeight",
|
|
87
98
|
"playerLargeVersion",
|
|
99
|
+
"playerVideo"
|
|
88
100
|
]),
|
|
89
101
|
display() {
|
|
90
102
|
return "STOPPED" !== this.playerStatus;
|
|
@@ -109,6 +121,9 @@ export default defineComponent({
|
|
|
109
121
|
this.forceHide = false;
|
|
110
122
|
}
|
|
111
123
|
},
|
|
124
|
+
closePlayer(){
|
|
125
|
+
this.playerPlay();
|
|
126
|
+
},
|
|
112
127
|
onPause() {
|
|
113
128
|
if ("PLAYING" === this.playerStatus) {
|
|
114
129
|
this.playerChangeStatus(true);
|
|
@@ -120,7 +135,7 @@ export default defineComponent({
|
|
|
120
135
|
|
|
121
136
|
<style lang="scss">
|
|
122
137
|
.octopus-app {
|
|
123
|
-
.player-container
|
|
138
|
+
.player-container{
|
|
124
139
|
max-height: 94%;
|
|
125
140
|
position: sticky;
|
|
126
141
|
overflow: hidden;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to=".octopus-app">
|
|
3
|
+
<template v-if="playerVideo">
|
|
4
|
+
<button
|
|
5
|
+
class="btn btn-transparent video-close saooti-remove"
|
|
6
|
+
@click="$emit('close')"
|
|
7
|
+
/>
|
|
8
|
+
<div class="video-wrapper">
|
|
9
|
+
<iframe
|
|
10
|
+
ref="iframeVideo"
|
|
11
|
+
:src="srcVideo"
|
|
12
|
+
width="500"
|
|
13
|
+
height="281"
|
|
14
|
+
style="z-index:1;"
|
|
15
|
+
allowfullscreen="true"
|
|
16
|
+
allow="autoplay"
|
|
17
|
+
referrerpolicy="no-referrer-when-downgrade"
|
|
18
|
+
></iframe>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
</teleport>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
26
|
+
import { mapState } from "pinia";
|
|
27
|
+
import { defineComponent } from "vue";
|
|
28
|
+
export default defineComponent({
|
|
29
|
+
name: "PlayerVideo",
|
|
30
|
+
components: {
|
|
31
|
+
},
|
|
32
|
+
emits:['close'],
|
|
33
|
+
|
|
34
|
+
computed:{
|
|
35
|
+
...mapState(usePlayerStore, [
|
|
36
|
+
"playerPodcast",
|
|
37
|
+
"playerVideo"
|
|
38
|
+
]),
|
|
39
|
+
srcVideo(): string{
|
|
40
|
+
if(this.playerVideo){
|
|
41
|
+
return "//www.ultimedia.com/deliver/generic/iframe/mdtk/01009833/zone/1/showtitle/1/src/"+ this.playerPodcast?.video?.videoId+"/autoplay/1";
|
|
42
|
+
}
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
watch:{
|
|
47
|
+
srcVideo() {
|
|
48
|
+
this.goFullScreen();
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
mounted(){
|
|
52
|
+
this.goFullScreen();
|
|
53
|
+
},
|
|
54
|
+
methods:{
|
|
55
|
+
goFullScreen(){
|
|
56
|
+
if(""===this.srcVideo){return;}
|
|
57
|
+
switch (screen.orientation.type) {
|
|
58
|
+
case "landscape-primary":
|
|
59
|
+
case "landscape-secondary":
|
|
60
|
+
(this.$refs.iframeVideo as Element).requestFullscreen();
|
|
61
|
+
break;
|
|
62
|
+
case "portrait-secondary":
|
|
63
|
+
case "portrait-primary":
|
|
64
|
+
console.log("Portrait mode");
|
|
65
|
+
break;
|
|
66
|
+
default:
|
|
67
|
+
console.log("The orientation API isn't supported in this browser :(");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
});
|
|
73
|
+
</script>
|
|
74
|
+
<style lang="scss">
|
|
75
|
+
.octopus-app {
|
|
76
|
+
.video-wrapper{
|
|
77
|
+
border-radius: 2rem;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
position: fixed;
|
|
80
|
+
bottom: 2.5rem;
|
|
81
|
+
right: 0;
|
|
82
|
+
z-index: 10;
|
|
83
|
+
}
|
|
84
|
+
.video-close{
|
|
85
|
+
position: fixed;
|
|
86
|
+
bottom: 16.5rem;
|
|
87
|
+
right: 1rem;
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
@media (max-width: 500px) {
|
|
91
|
+
.video-wrapper{
|
|
92
|
+
position:relative;
|
|
93
|
+
padding-bottom:56.25%;
|
|
94
|
+
height:0;
|
|
95
|
+
}
|
|
96
|
+
.video-wrapper iframe {
|
|
97
|
+
position:absolute;
|
|
98
|
+
top:0;
|
|
99
|
+
left:0;
|
|
100
|
+
width:100% !important;
|
|
101
|
+
height:100%;
|
|
102
|
+
margin:0 !important;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -21,6 +21,7 @@ interface PlayerState {
|
|
|
21
21
|
playerSeekTime?: number;
|
|
22
22
|
playerTranscript?: Transcript;
|
|
23
23
|
playerLargeVersion: boolean;
|
|
24
|
+
playerVideo: boolean;
|
|
24
25
|
}
|
|
25
26
|
export const usePlayerStore = defineStore("PlayerStore", {
|
|
26
27
|
state: (): PlayerState => ({
|
|
@@ -34,10 +35,12 @@ export const usePlayerStore = defineStore("PlayerStore", {
|
|
|
34
35
|
playerRadio: undefined,
|
|
35
36
|
playerSeekTime: 0,
|
|
36
37
|
playerLargeVersion: false,
|
|
38
|
+
playerVideo: false,
|
|
37
39
|
}),
|
|
38
40
|
getters: {
|
|
39
41
|
playerHeight() {
|
|
40
42
|
if ("STOPPED" === this.playerStatus) return 0;
|
|
43
|
+
if (this.playerVideo) return "0px"/* "281px" */;
|
|
41
44
|
if (this.playerLargeVersion) return "27rem";
|
|
42
45
|
if (window.innerWidth > 450) return "5rem";
|
|
43
46
|
return "3.5rem";
|
|
@@ -88,7 +91,7 @@ export const usePlayerStore = defineStore("PlayerStore", {
|
|
|
88
91
|
},
|
|
89
92
|
},
|
|
90
93
|
actions: {
|
|
91
|
-
playerPlay(param?: any) {
|
|
94
|
+
playerPlay(param?: any, isVideo = false) {
|
|
92
95
|
if (!param) {
|
|
93
96
|
this.playerStatus = "STOPPED";
|
|
94
97
|
this.playerPodcast = undefined;
|
|
@@ -96,11 +99,12 @@ export const usePlayerStore = defineStore("PlayerStore", {
|
|
|
96
99
|
this.playerLive = undefined;
|
|
97
100
|
this.playerRadio = undefined;
|
|
98
101
|
this.playerElapsed = 0;
|
|
102
|
+
this.playerVideo = false;
|
|
99
103
|
return;
|
|
100
104
|
}
|
|
101
105
|
if (
|
|
102
106
|
(this.playerPodcast &&
|
|
103
|
-
this.playerPodcast.podcastId === param.podcastId) ||
|
|
107
|
+
this.playerPodcast.podcastId === param.podcastId && isVideo === this.playerVideo) ||
|
|
104
108
|
(this.playerMedia && this.playerMedia.mediaId === param.mediaId) ||
|
|
105
109
|
(this.playerLive && this.playerLive.conferenceId === param.conferenceId)
|
|
106
110
|
) {
|
|
@@ -112,6 +116,7 @@ export const usePlayerStore = defineStore("PlayerStore", {
|
|
|
112
116
|
this.playerMedia = undefined;
|
|
113
117
|
this.playerLive = undefined;
|
|
114
118
|
this.playerRadio = undefined;
|
|
119
|
+
this.playerVideo = isVideo;
|
|
115
120
|
this.playerElapsed = 0;
|
|
116
121
|
if (
|
|
117
122
|
param.conferenceId &&
|
|
@@ -2,6 +2,7 @@ import { Emission, emptyEmissionData } from "./emission";
|
|
|
2
2
|
import { Organisation } from "./organisation";
|
|
3
3
|
import { Participant } from "./participant";
|
|
4
4
|
import { Person } from "../user/person";
|
|
5
|
+
import { Video } from "./video";
|
|
5
6
|
export interface Podcast {
|
|
6
7
|
imageUrl?: string;
|
|
7
8
|
animators?: Array<Participant>;
|
|
@@ -39,7 +40,9 @@ export interface Podcast {
|
|
|
39
40
|
title: string;
|
|
40
41
|
weekDownloadCount?: number;
|
|
41
42
|
order?: number;
|
|
43
|
+
video?: Video;
|
|
42
44
|
}
|
|
45
|
+
|
|
43
46
|
export function emptyPodcastData(): Podcast {
|
|
44
47
|
return {
|
|
45
48
|
podcastId: 0,
|