@saooti/octopus-sdk 34.0.3 → 34.0.4
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/package.json +3 -3
- package/src/components/mixins/player/playerDisplay.ts +4 -4
- package/src/components/mixins/player/playerLive.ts +1 -4
- package/src/components/pages/Home.vue +9 -0
- package/src/store/class/general/classicSelectType.ts +5 -0
- package/src/store/class/general/listReturn.ts +16 -0
- package/src/store/class/general/player.ts +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "34.0.
|
|
3
|
+
"version": "34.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"sonarqube-scanner": "^2.9.1",
|
|
33
33
|
"swiper": "^8.4.5",
|
|
34
34
|
"v-calendar": "^3.0.0-alpha.8",
|
|
35
|
-
"vite": "^
|
|
35
|
+
"vite": "^3.2.5",
|
|
36
36
|
"vue": "^3.2.45",
|
|
37
37
|
"vue-i18n": "^9.2.2",
|
|
38
38
|
"vue-multiselect": "^3.0.0-alpha.2",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/jquery": "^3.5.14",
|
|
47
47
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
|
48
48
|
"@typescript-eslint/parser": "^5.46.1",
|
|
49
|
-
"@vitejs/plugin-vue": "^
|
|
49
|
+
"@vitejs/plugin-vue": "^3.2.0",
|
|
50
50
|
"@vue/compiler-sfc": "^3.2.45",
|
|
51
51
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
52
52
|
"eslint": "^8.29.0",
|
|
@@ -3,7 +3,7 @@ import DurationHelper from '../../../helper/duration';
|
|
|
3
3
|
import { state } from '../../../store/paramStore';
|
|
4
4
|
import { defineComponent } from 'vue';
|
|
5
5
|
import { RouteLocationRaw } from 'vue-router';
|
|
6
|
-
import { Radio } from '@/store/class/general/player';
|
|
6
|
+
import { MediaRadio, Radio } from '@/store/class/general/player';
|
|
7
7
|
import octopusApi from '@saooti/octopus-api';
|
|
8
8
|
export const playerDisplay = defineComponent({
|
|
9
9
|
props: {
|
|
@@ -59,7 +59,7 @@ export const playerDisplay = defineComponent({
|
|
|
59
59
|
},
|
|
60
60
|
podcastTitle(): string {
|
|
61
61
|
if(this.$store.state.player.radio){
|
|
62
|
-
return this.$store.state.player.radio.metadata;
|
|
62
|
+
return this.$store.state.player.radio.metadata.title + " - " + this.$store.state.player.radio.metadata.artist;
|
|
63
63
|
}
|
|
64
64
|
if (this.$store.state.player.podcast) {
|
|
65
65
|
if (this.isEmissionName)
|
|
@@ -82,7 +82,7 @@ export const playerDisplay = defineComponent({
|
|
|
82
82
|
return this.$store.state.player.transcript?.actualText ?? "";
|
|
83
83
|
},
|
|
84
84
|
radio(): Radio{
|
|
85
|
-
return this.$store.state.player.radio;
|
|
85
|
+
return this.$store.state.player.radio?.url;
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
watch:{
|
|
@@ -109,7 +109,7 @@ export const playerDisplay = defineComponent({
|
|
|
109
109
|
},
|
|
110
110
|
methods: {
|
|
111
111
|
async fetchRadioMetadata(): Promise<void>{
|
|
112
|
-
const metadata = await octopusApi.fetchData<
|
|
112
|
+
const metadata = await octopusApi.fetchData<MediaRadio>(14, 'player/playing/'+this.$store.state.player.radio.canalId);
|
|
113
113
|
this.$store.commit('player/radioMetadata', metadata);
|
|
114
114
|
},
|
|
115
115
|
addKeyboardControl(event: KeyboardEvent): void{
|
|
@@ -77,10 +77,7 @@ export const playerLive = defineComponent({
|
|
|
77
77
|
async initHls(hlsStreamUrl: string): Promise<void> {
|
|
78
78
|
return new Promise<void>(async(resolve, reject) => {
|
|
79
79
|
if(null === Hls){
|
|
80
|
-
await import('hls.js
|
|
81
|
-
Hls = hlsLibrary.default;
|
|
82
|
-
})
|
|
83
|
-
await import('hls.js').then((hlsLibrary) => {
|
|
80
|
+
await import('hls.js').then((hlsLibrary) => {
|
|
84
81
|
Hls = hlsLibrary.default;
|
|
85
82
|
})
|
|
86
83
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page-box">
|
|
3
|
+
<button @click="playRadio">Radio</button>
|
|
3
4
|
<template v-if="0 === rubriquageFilter.length">
|
|
4
5
|
<PodcastInlineList
|
|
5
6
|
v-for="c in categories"
|
|
@@ -88,6 +89,14 @@ export default defineComponent({
|
|
|
88
89
|
}
|
|
89
90
|
this.rubriqueId = rubriqueId;
|
|
90
91
|
},
|
|
92
|
+
playRadio(){
|
|
93
|
+
this.$store.commit('player/playPodcast', {
|
|
94
|
+
canalId: 3,
|
|
95
|
+
url: "https://c6884219-e191-45ec-a931-6f34683c6ac7.stream.dev2.saooti.org/live.m3u8",
|
|
96
|
+
metadata : ""
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
}
|
|
91
100
|
}
|
|
92
101
|
})
|
|
93
102
|
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Pageable } from "./pageable";
|
|
2
|
+
import { SortPageable } from "./sortPageable";
|
|
3
|
+
|
|
4
|
+
export interface ListReturn<T> {
|
|
5
|
+
content: T;
|
|
6
|
+
empty: boolean;
|
|
7
|
+
first: boolean;
|
|
8
|
+
last: boolean;
|
|
9
|
+
number: number;
|
|
10
|
+
numberOfElements: number;
|
|
11
|
+
pageable: Pageable;
|
|
12
|
+
size: number;
|
|
13
|
+
sort: SortPageable;
|
|
14
|
+
totalElements: number;
|
|
15
|
+
totalPages: number;
|
|
16
|
+
}
|
|
@@ -4,7 +4,18 @@ import { Podcast } from "./podcast";
|
|
|
4
4
|
export interface Radio{
|
|
5
5
|
canalId: number;
|
|
6
6
|
url: string;
|
|
7
|
-
metadata:
|
|
7
|
+
metadata: MediaRadio;
|
|
8
|
+
}
|
|
9
|
+
export interface MediaRadio{
|
|
10
|
+
artist:string;
|
|
11
|
+
duration:number;
|
|
12
|
+
kind:string;
|
|
13
|
+
mediaId:number;
|
|
14
|
+
mediaType:string|null;
|
|
15
|
+
playlistId:number;
|
|
16
|
+
startDate:string;
|
|
17
|
+
title:string;
|
|
18
|
+
uri:string;
|
|
8
19
|
}
|
|
9
20
|
|
|
10
21
|
|