@saooti/octopus-sdk 33.0.9 → 33.1.0
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/README.md +1 -0
- package/package.json +1 -1
- package/src/App.vue +4 -3
- package/src/api/classicCrud.ts +1 -1
- package/src/assets/transition.scss +0 -3
- package/src/components/display/comments/AddCommentModal.vue +1 -1
- package/src/components/display/comments/CommentInput.vue +1 -1
- package/src/components/display/emission/EmissionList.vue +1 -2
- package/src/components/display/emission/EmissionPlayerItem.vue +4 -4
- package/src/components/display/live/LiveHorizontalList.vue +1 -2
- package/src/components/display/organisation/OrganisationChooser.vue +1 -1
- package/src/components/display/participant/ParticipantList.vue +1 -2
- package/src/components/display/playlist/PlaylistList.vue +1 -2
- package/src/components/display/podcasts/PodcastImage.vue +4 -4
- package/src/components/display/podcasts/PodcastList.vue +2 -3
- package/src/components/display/sharing/QrCode.vue +2 -2
- package/src/components/display/sharing/SharePlayer.vue +2 -2
- package/src/components/misc/HomeDropdown.vue +2 -2
- package/src/components/misc/LeftMenu.vue +2 -4
- package/src/components/misc/TopBar.vue +1 -1
- package/src/components/misc/modal/ClipboardModal.vue +2 -1
- package/src/components/misc/modal/NewsletterModal.vue +2 -2
- package/src/components/misc/player/Player.vue +43 -48
- package/src/components/misc/player/PlayerCompact.vue +2 -2
- package/src/components/mixins/handle403.ts +1 -1
- package/src/components/mixins/player/playerComment.ts +1 -1
- package/src/components/mixins/player/playerDisplay.ts +2 -2
- package/src/components/mixins/player/playerLive.ts +5 -5
- package/src/components/mixins/player/playerLogic.ts +27 -24
- package/src/components/pages/Lives.vue +1 -1
- package/src/store/AppStore.ts +33 -88
- package/src/store/PlayerStore.ts +77 -0
- package/src/store/class/general/emission.ts +17 -0
- package/src/store/class/general/participant.ts +7 -0
- package/src/store/class/general/playlist.ts +13 -0
- package/src/store/class/general/podcast.ts +30 -1
- package/src/store/classStore/typeAppStore.ts +79 -0
- package/src/store/classStore/typeAuthStore.ts +44 -0
- package/src/store/classStore/typePlayerStore.ts +14 -0
- package/src/store/typeAppStore.ts +0 -339
package/README.md
CHANGED
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
:is-education="false"
|
|
11
11
|
/>
|
|
12
12
|
<LeftMenu
|
|
13
|
-
v-
|
|
13
|
+
v-if="displayMenu"
|
|
14
|
+
@close="displayMenu=false"
|
|
14
15
|
:is-education="false"
|
|
15
16
|
/>
|
|
16
17
|
<CategoryFilter />
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
|
|
22
23
|
<script lang="ts">
|
|
23
24
|
import TopBar from '@/components/misc/TopBar.vue';
|
|
24
|
-
import LeftMenu from '@/components/misc/LeftMenu.vue';
|
|
25
25
|
import Footer from '@/components/misc/Footer.vue';
|
|
26
26
|
import CategoryFilter from '@/components/display/categories/CategoryFilter.vue';
|
|
27
27
|
import { state } from './store/paramStore';
|
|
@@ -29,8 +29,9 @@ import { Rubriquage } from './store/class/rubrique/rubriquage';
|
|
|
29
29
|
import { RubriquageFilter } from './store/class/rubrique/rubriquageFilter';
|
|
30
30
|
import { Rubrique } from './store/class/rubrique/rubrique';
|
|
31
31
|
import { initSDK } from './components/mixins/init';
|
|
32
|
-
import { defineComponent } from 'vue'
|
|
32
|
+
import { defineAsyncComponent, defineComponent } from 'vue'
|
|
33
33
|
import { Category } from './store/class/general/category';
|
|
34
|
+
const LeftMenu = defineAsyncComponent(() => import('@/components/misc/LeftMenu.vue'));
|
|
34
35
|
export default defineComponent({
|
|
35
36
|
name: 'App',
|
|
36
37
|
|
package/src/api/classicCrud.ts
CHANGED
|
@@ -117,7 +117,7 @@ export default defineComponent({
|
|
|
117
117
|
methods: {
|
|
118
118
|
initAuthenticatedName():void{
|
|
119
119
|
if (!state.generalParameters.authenticated) { return; }
|
|
120
|
-
this.name = (`${this.$store.state.profile.firstname||''} ${this.$store.state.profile.lastname||''}`).trim();
|
|
120
|
+
this.name = (`${this.$store.state.auth?.profile.firstname||''} ${this.$store.state.auth?.profile.lastname||''}`).trim();
|
|
121
121
|
this.isVerify = true;
|
|
122
122
|
},
|
|
123
123
|
async handleSuccess(token: string) {
|
|
@@ -163,7 +163,7 @@ export default defineComponent({
|
|
|
163
163
|
true === state.generalParameters.isAdmin;
|
|
164
164
|
},
|
|
165
165
|
userId(): string|undefined {
|
|
166
|
-
return state.generalParameters.authenticated ? this.$store.state.profile.userId : undefined;
|
|
166
|
+
return state.generalParameters.authenticated ? this.$store.state.auth?.profile.userId : undefined;
|
|
167
167
|
},
|
|
168
168
|
phase(): string|undefined {
|
|
169
169
|
if(undefined === this.podcast){
|
|
@@ -52,12 +52,11 @@ import ListPaginate from '../list/ListPaginate.vue';
|
|
|
52
52
|
import octopusApi from '@saooti/octopus-api';
|
|
53
53
|
import { handle403 } from '../../mixins/handle403';
|
|
54
54
|
import { state } from '../../../store/paramStore';
|
|
55
|
-
import { Emission } from '@/store/class/general/emission';
|
|
55
|
+
import { Emission, emptyEmissionData } from '@/store/class/general/emission';
|
|
56
56
|
import { Rubrique } from '@/store/class/rubrique/rubrique';
|
|
57
57
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
58
58
|
import { FetchParam } from '@/store/class/general/fetchParam';
|
|
59
59
|
import { AxiosError } from 'axios';
|
|
60
|
-
import { emptyEmissionData } from '@/store/typeAppStore';
|
|
61
60
|
import { Rubriquage } from '@/store/class/rubrique/rubriquage';
|
|
62
61
|
const EmissionItem = defineAsyncComponent(() => import('./EmissionItem.vue'));
|
|
63
62
|
const EmissionPlayerItem = defineAsyncComponent(() => import('./EmissionPlayerItem.vue'));
|
|
@@ -176,7 +176,7 @@ export default defineComponent({
|
|
|
176
176
|
return (state.emissionsPage.titleInImage as boolean);
|
|
177
177
|
},
|
|
178
178
|
authenticated(): boolean {
|
|
179
|
-
return
|
|
179
|
+
return state.generalParameters.authenticated??false;
|
|
180
180
|
},
|
|
181
181
|
organisationId(): string|undefined {
|
|
182
182
|
return state.generalParameters.organisationId;
|
|
@@ -226,13 +226,13 @@ export default defineComponent({
|
|
|
226
226
|
},
|
|
227
227
|
play(podcast: Podcast): void {
|
|
228
228
|
if (podcast === this.$store.state.player.podcast) {
|
|
229
|
-
this.$store.commit('
|
|
229
|
+
this.$store.commit('player/pause', false);
|
|
230
230
|
} else {
|
|
231
|
-
this.$store.commit('
|
|
231
|
+
this.$store.commit('player/playPodcast', podcast);
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
234
|
pause(): void {
|
|
235
|
-
this.$store.commit('
|
|
235
|
+
this.$store.commit('player/pause', true);
|
|
236
236
|
},
|
|
237
237
|
},
|
|
238
238
|
})
|
|
@@ -37,9 +37,8 @@
|
|
|
37
37
|
import ListPaginate from '../list/ListPaginate.vue';
|
|
38
38
|
import octopusApi from '@saooti/octopus-api';
|
|
39
39
|
import PodcastItem from '../podcasts/PodcastItem.vue';
|
|
40
|
-
import { Podcast } from '@/store/class/general/podcast';
|
|
40
|
+
import { Podcast, emptyPodcastData } from '@/store/class/general/podcast';
|
|
41
41
|
import { defineComponent } from 'vue'
|
|
42
|
-
import { emptyPodcastData } from '@/store/typeAppStore';
|
|
43
42
|
export default defineComponent({
|
|
44
43
|
name: 'LiveHorizontalList',
|
|
45
44
|
|
|
@@ -183,7 +183,7 @@ export default defineComponent({
|
|
|
183
183
|
async created() {
|
|
184
184
|
if (
|
|
185
185
|
this.authenticated &&
|
|
186
|
-
undefined === this.$store.state.organisation.imageUrl
|
|
186
|
+
undefined === this.$store.state.auth?.organisation.imageUrl
|
|
187
187
|
) {
|
|
188
188
|
const data = await octopusApi.fetchData<Organisation>(0,`organisation/${this.myOrganisationId ?this.myOrganisationId:""}`);
|
|
189
189
|
this.myImage = data.imageUrl;
|
|
@@ -32,8 +32,7 @@ import ListPaginate from '../list/ListPaginate.vue';
|
|
|
32
32
|
import { handle403 } from '../../mixins/handle403';
|
|
33
33
|
import octopusApi from '@saooti/octopus-api';
|
|
34
34
|
import ParticipantItem from './ParticipantItem.vue';
|
|
35
|
-
import { Participant } from '@/store/class/general/participant';
|
|
36
|
-
import { emptyParticipantData } from '@/store/typeAppStore';
|
|
35
|
+
import { Participant, emptyParticipantData } from '@/store/class/general/participant';
|
|
37
36
|
import { defineComponent } from 'vue'
|
|
38
37
|
import { AxiosError } from 'axios';
|
|
39
38
|
export default defineComponent({
|
|
@@ -32,8 +32,7 @@ import ListPaginate from '../list/ListPaginate.vue';
|
|
|
32
32
|
import { handle403 } from '../../mixins/handle403';
|
|
33
33
|
import octopusApi from '@saooti/octopus-api';
|
|
34
34
|
import PlaylistItem from './PlaylistItem.vue';
|
|
35
|
-
import { emptyPlaylistData } from '@/store/
|
|
36
|
-
import { Playlist } from '@/store/class/general/playlist';
|
|
35
|
+
import { Playlist, emptyPlaylistData } from '@/store/class/general/playlist';
|
|
37
36
|
import { defineComponent } from 'vue'
|
|
38
37
|
import { AxiosError } from 'axios';
|
|
39
38
|
export default defineComponent({
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<script lang="ts">
|
|
89
89
|
import { mapState } from 'vuex';
|
|
90
90
|
import { state } from '../../../store/paramStore';
|
|
91
|
-
import {StoreState} from '@/store/typeAppStore';
|
|
91
|
+
import {StoreState} from '@/store/classStore/typeAppStore';
|
|
92
92
|
import { Podcast } from '@/store/class/general/podcast';
|
|
93
93
|
import { Conference } from '@/store/class/conference/conference';
|
|
94
94
|
import { imageProxy } from '../../mixins/functions';
|
|
@@ -251,13 +251,13 @@ export default defineComponent({
|
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
if(this.playingPodcast){
|
|
254
|
-
this.$store.commit('
|
|
254
|
+
this.$store.commit('player/pause', "PLAYING"===this.$store.state.player.status);
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
if (!this.recordingLive) {
|
|
258
|
-
this.$store.commit('
|
|
258
|
+
this.$store.commit('player/playPodcast', this.podcast);
|
|
259
259
|
}else{
|
|
260
|
-
this.$store.commit('
|
|
260
|
+
this.$store.commit('player/playPodcast', {
|
|
261
261
|
title: this.podcast.title,
|
|
262
262
|
audioUrl: this.podcast.audioUrl,
|
|
263
263
|
duration: this.podcast.duration,
|
|
@@ -35,11 +35,10 @@ import { handle403 } from '../../mixins/handle403';
|
|
|
35
35
|
import octopusApi from '@saooti/octopus-api';
|
|
36
36
|
import PodcastItem from './PodcastItem.vue';
|
|
37
37
|
import { state } from '../../../store/paramStore';
|
|
38
|
-
import { Podcast } from '@/store/class/general/podcast';
|
|
38
|
+
import { Podcast, emptyPodcastData } from '@/store/class/general/podcast';
|
|
39
39
|
import { defineComponent } from 'vue'
|
|
40
40
|
import { FetchParam } from '@/store/class/general/fetchParam';
|
|
41
41
|
import { AxiosError } from 'axios';
|
|
42
|
-
import { emptyPodcastData } from '@/store/typeAppStore';
|
|
43
42
|
export default defineComponent({
|
|
44
43
|
name: 'PodcastList',
|
|
45
44
|
|
|
@@ -155,7 +154,7 @@ export default defineComponent({
|
|
|
155
154
|
rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
|
|
156
155
|
includeHidden: this.includeHidden,
|
|
157
156
|
validity: undefined !== this.notValid?!this.notValid: undefined,
|
|
158
|
-
publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.profile.userId:undefined
|
|
157
|
+
publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined
|
|
159
158
|
};
|
|
160
159
|
try {
|
|
161
160
|
const data =await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',param, true);
|
|
@@ -81,8 +81,8 @@ export default defineComponent({
|
|
|
81
81
|
}
|
|
82
82
|
if (!state.generalParameters.authenticated) return;
|
|
83
83
|
let data;
|
|
84
|
-
if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
|
|
85
|
-
data = this.$store.state.organisation.attributes;
|
|
84
|
+
if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
|
|
85
|
+
data = this.$store.state.auth?.organisation.attributes;
|
|
86
86
|
}else{
|
|
87
87
|
data= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
|
|
88
88
|
}
|
|
@@ -299,8 +299,8 @@ export default defineComponent({
|
|
|
299
299
|
return url;
|
|
300
300
|
},
|
|
301
301
|
async fetchOrgaAttributes(): Promise<void>{
|
|
302
|
-
if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
|
|
303
|
-
this.orgaAttributes = this.$store.state.organisation.attributes;
|
|
302
|
+
if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
|
|
303
|
+
this.orgaAttributes = this.$store.state.auth?.organisation.attributes;
|
|
304
304
|
}else{
|
|
305
305
|
this.orgaAttributes= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
|
|
306
306
|
}
|
|
@@ -94,7 +94,7 @@ export default defineComponent({
|
|
|
94
94
|
},
|
|
95
95
|
computed: {
|
|
96
96
|
organisationsAvailable(): Array<Organisation>{
|
|
97
|
-
return this.$store.state.profile.organisations?? [];
|
|
97
|
+
return this.$store.state.auth?.profile.organisations?? [];
|
|
98
98
|
},
|
|
99
99
|
helpLinks(){
|
|
100
100
|
return [
|
|
@@ -113,7 +113,7 @@ export default defineComponent({
|
|
|
113
113
|
return (state.generalParameters.podcastmaker as boolean);
|
|
114
114
|
},
|
|
115
115
|
authenticated(): boolean {
|
|
116
|
-
return
|
|
116
|
+
return state.generalParameters.authenticated??false;
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-show="displayMenu"
|
|
4
3
|
class="left-menu-container"
|
|
5
4
|
@mouseleave="onMenuClick"
|
|
6
5
|
>
|
|
@@ -61,10 +60,9 @@ export default defineComponent({
|
|
|
61
60
|
},
|
|
62
61
|
mixins:[orgaFilter],
|
|
63
62
|
props: {
|
|
64
|
-
displayMenu: { default: false, type: Boolean},
|
|
65
63
|
isEducation: { default: false, type: Boolean},
|
|
66
64
|
},
|
|
67
|
-
emits: ['
|
|
65
|
+
emits: ['close'],
|
|
68
66
|
data() {
|
|
69
67
|
return {
|
|
70
68
|
organisationId: undefined as string|undefined,
|
|
@@ -127,7 +125,7 @@ export default defineComponent({
|
|
|
127
125
|
rubriquesId: this.rubriqueQueryParam}
|
|
128
126
|
},
|
|
129
127
|
onMenuClick() {
|
|
130
|
-
this.$emit('
|
|
128
|
+
this.$emit('close');
|
|
131
129
|
},
|
|
132
130
|
async onOrganisationSelected(organisation: Organisation|undefined) {
|
|
133
131
|
if (organisation?.id) {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/>
|
|
54
54
|
<div class="d-flex flex-column">
|
|
55
55
|
<div class="hosted-by">
|
|
56
|
-
|
|
56
|
+
{{ $t('Hosted by') }}<span class="ms-1 me-1 primary-darker">Saooti</span>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="d-flex justify-content-end flex-nowrap">
|
|
59
59
|
<HomeDropdown :is-education="isEducation" />
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
import { Emission } from '@/store/class/general/emission';
|
|
42
42
|
import { displayMethods } from '../../mixins/functions';
|
|
43
43
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
44
|
+
import { state } from '@/store/paramStore';
|
|
44
45
|
const RssSection = defineAsyncComponent(() => import('@/components/display/aggregator/RssSection.vue'));
|
|
45
46
|
export default defineComponent({
|
|
46
47
|
name: 'ClipboardModal',
|
|
@@ -56,7 +57,7 @@ export default defineComponent({
|
|
|
56
57
|
emits: ['close', 'copy'],
|
|
57
58
|
computed: {
|
|
58
59
|
authenticated(): boolean {
|
|
59
|
-
return
|
|
60
|
+
return state.generalParameters.authenticated??false;
|
|
60
61
|
},
|
|
61
62
|
},
|
|
62
63
|
mounted(){
|
|
@@ -302,8 +302,8 @@ export default defineComponent({
|
|
|
302
302
|
},
|
|
303
303
|
async initData(): Promise<void> {
|
|
304
304
|
let attributes;
|
|
305
|
-
if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
|
|
306
|
-
attributes = this.$store.state.organisation.attributes;
|
|
305
|
+
if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
|
|
306
|
+
attributes = this.$store.state.auth?.organisation.attributes;
|
|
307
307
|
}else{
|
|
308
308
|
attributes = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
|
|
309
309
|
}
|
|
@@ -1,60 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="
|
|
3
|
+
class="player-container"
|
|
4
4
|
:style="{ height: playerHeight }"
|
|
5
|
+
@transitionend="onHidden"
|
|
5
6
|
>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:listen-time="listenTime"
|
|
46
|
-
@stopPlayer="stopPlayer"
|
|
47
|
-
@changePlayerLargeVersion="largeVersion = false"
|
|
48
|
-
/>
|
|
49
|
-
</template>
|
|
50
|
-
</div>
|
|
7
|
+
<template v-if="display">
|
|
8
|
+
<audio
|
|
9
|
+
id="audio-player"
|
|
10
|
+
:src="!live? audioUrlToPlay: undefined"
|
|
11
|
+
autoplay
|
|
12
|
+
@timeupdate="onTimeUpdate"
|
|
13
|
+
@ended="onFinished"
|
|
14
|
+
@playing="onPlay"
|
|
15
|
+
@durationChange="onTimeUpdate"
|
|
16
|
+
@error="onError"
|
|
17
|
+
@seeked="onSeeked"
|
|
18
|
+
/>
|
|
19
|
+
<PlayerCompact
|
|
20
|
+
v-if="!largeVersion"
|
|
21
|
+
v-model:notListenTime="notListenTime"
|
|
22
|
+
:player-error="playerError"
|
|
23
|
+
:hls-ready="hlsReady"
|
|
24
|
+
:comments="comments"
|
|
25
|
+
:display-alert-bar="displayAlertBar"
|
|
26
|
+
:percent-live-progress="percentLiveProgress"
|
|
27
|
+
:duration-live-position="durationLivePosition"
|
|
28
|
+
:listen-time="listenTime"
|
|
29
|
+
@stopPlayer="stopPlayer"
|
|
30
|
+
@changePlayerLargeVersion="largeVersion = true"
|
|
31
|
+
/>
|
|
32
|
+
<PlayerLarge
|
|
33
|
+
v-else
|
|
34
|
+
v-model:notListenTime="notListenTime"
|
|
35
|
+
:player-error="playerError"
|
|
36
|
+
:hls-ready="hlsReady"
|
|
37
|
+
:comments="comments"
|
|
38
|
+
:display-alert-bar="displayAlertBar"
|
|
39
|
+
:percent-live-progress="percentLiveProgress"
|
|
40
|
+
:duration-live-position="durationLivePosition"
|
|
41
|
+
:listen-time="listenTime"
|
|
42
|
+
@stopPlayer="stopPlayer"
|
|
43
|
+
@changePlayerLargeVersion="largeVersion = false"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
51
46
|
</div>
|
|
52
47
|
</template>
|
|
53
48
|
<script lang="ts">
|
|
54
49
|
import { mapState } from 'vuex';
|
|
55
50
|
import { CommentPodcast } from '@/store/class/general/comment';
|
|
56
51
|
import { playerLogic } from '../../mixins/player/playerLogic';
|
|
57
|
-
import { StoreState } from '@/store/typeAppStore';
|
|
52
|
+
import { StoreState } from '@/store/classStore/typeAppStore';
|
|
58
53
|
import PlayerCompact from '../player/PlayerCompact.vue';
|
|
59
54
|
import PlayerLarge from '../player/PlayerLarge.vue';
|
|
60
55
|
import { defineComponent } from 'vue';
|
|
@@ -108,7 +103,7 @@ export default defineComponent({
|
|
|
108
103
|
methods: {
|
|
109
104
|
onHidden(): void {
|
|
110
105
|
if (this.forceHide) {
|
|
111
|
-
this.$store.commit('
|
|
106
|
+
this.$store.commit('player/playPodcast');
|
|
112
107
|
this.forceHide = false;
|
|
113
108
|
}
|
|
114
109
|
},
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
<button
|
|
62
62
|
:title="$t('Enlarge')"
|
|
63
|
-
class="btn play-button-box saooti-up"
|
|
63
|
+
class="btn play-button-box btn-transparent text-light saooti-up"
|
|
64
64
|
@click="changePlayerLargeVersion"
|
|
65
65
|
/>
|
|
66
66
|
<button
|
|
67
67
|
:title="$t('Close')"
|
|
68
|
-
class="btn play-button-box saooti-remove"
|
|
68
|
+
class="btn play-button-box btn-transparent text-light saooti-remove"
|
|
69
69
|
@click="stopPlayer"
|
|
70
70
|
/>
|
|
71
71
|
<PlayerTimeline
|
|
@@ -4,7 +4,7 @@ export const handle403 = defineComponent({
|
|
|
4
4
|
methods: {
|
|
5
5
|
handle403(error: AxiosError): void {
|
|
6
6
|
if (403 === error.response?.status) {
|
|
7
|
-
if(
|
|
7
|
+
if(undefined===this.$store.state.auth){
|
|
8
8
|
window.location.href = window.location.origin + "/sso/login";
|
|
9
9
|
}else{
|
|
10
10
|
this.$router.push({
|
|
@@ -3,7 +3,7 @@ import { mapState } from 'vuex';
|
|
|
3
3
|
import { state } from '../../../store/paramStore';
|
|
4
4
|
import octopusApi from '@saooti/octopus-api';
|
|
5
5
|
import { CommentPodcast } from '@/store/class/general/comment';
|
|
6
|
-
import { StoreState } from '@/store/typeAppStore';
|
|
6
|
+
import { StoreState } from '@/store/classStore/typeAppStore';
|
|
7
7
|
import { defineComponent } from 'vue';
|
|
8
8
|
import { FetchParam } from '@/store/class/general/fetchParam';
|
|
9
9
|
import { InterfacePageable } from '@/store/class/general/interfacePageable';
|
|
@@ -107,10 +107,10 @@ export const playerDisplay = defineComponent({
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
onPlay(): void {
|
|
110
|
-
this.$store.commit('
|
|
110
|
+
this.$store.commit('player/pause', false);
|
|
111
111
|
},
|
|
112
112
|
onPause(): void {
|
|
113
|
-
this.$store.commit('
|
|
113
|
+
this.$store.commit('player/pause', true);
|
|
114
114
|
},
|
|
115
115
|
}
|
|
116
116
|
});
|
|
@@ -4,8 +4,8 @@ import octopusApi from '@saooti/octopus-api';
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
let Hls:any = null;
|
|
6
6
|
/* eslint-enable */
|
|
7
|
-
import { StoreState } from '@/store/typeAppStore';
|
|
8
7
|
import { defineComponent } from 'vue';
|
|
8
|
+
import { Player } from '@/store/class/general/player';
|
|
9
9
|
export const playerLive = defineComponent({
|
|
10
10
|
data() {
|
|
11
11
|
return {
|
|
@@ -18,13 +18,13 @@ export const playerLive = defineComponent({
|
|
|
18
18
|
};
|
|
19
19
|
},
|
|
20
20
|
computed: {
|
|
21
|
-
...mapState({
|
|
22
|
-
live(state:
|
|
21
|
+
...mapState('player',{
|
|
22
|
+
live(state: Player) { return state.live}
|
|
23
23
|
}),
|
|
24
24
|
},
|
|
25
25
|
methods: {
|
|
26
26
|
onPlay(): void {
|
|
27
|
-
this.$store.commit('
|
|
27
|
+
this.$store.commit('player/pause', false);
|
|
28
28
|
},
|
|
29
29
|
async playLive(): Promise<void> {
|
|
30
30
|
if (!this.live) return;
|
|
@@ -63,7 +63,7 @@ export const playerLive = defineComponent({
|
|
|
63
63
|
await octopusApi.fetchDataPublicWithParams<string | null>(0,'podcast/download/live/' + this.live.livePodcastId+".m3u8",{
|
|
64
64
|
'downloadId': null!==downloadId ? downloadId : undefined,
|
|
65
65
|
'origin':'octopus',
|
|
66
|
-
'distributorId':this.$store.state.
|
|
66
|
+
'distributorId':this.$store.state.auth?.organisationId
|
|
67
67
|
});
|
|
68
68
|
this.setDownloadId(downloadId);
|
|
69
69
|
} catch (error) {
|