@saooti/octopus-sdk 39.0.41 → 39.0.43

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "39.0.41",
3
+ "version": "39.0.43",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -40,8 +40,7 @@
40
40
  "sonarqube-scanner": "^3.3.0",
41
41
  "swiper": "^11.1.4",
42
42
  "video.js": "^8.12.0",
43
- "videojs-contrib-quality-levels": "^4.1.0",
44
- "videojs-hls-quality-selector": "^2.0.0",
43
+ "videojs-quality-selector-hls": "^1.1.1",
45
44
  "vite": "^5.3.1",
46
45
  "vue": "^3.4.30",
47
46
  "vue-i18n": "^9.13.1",
@@ -52,8 +51,6 @@
52
51
  "vue3-swatches": "^1.2.4"
53
52
  },
54
53
  "devDependencies": {
55
- "@types/videojs-contrib-quality-levels": "^2.0.4",
56
- "@types/videojs-hls-quality-selector": "^1.1.3",
57
54
  "@types/vue-select": "^3.16.8",
58
55
  "@typescript-eslint/eslint-plugin": "^7.14.1",
59
56
  "@typescript-eslint/parser": "^7.14.1",
@@ -2,6 +2,7 @@
2
2
  <div class="position-relative w-100">
3
3
  <template v-if="!isPhone">
4
4
  <swiper
5
+ :key="manualReload"
5
6
  :slides-per-view="numberItem"
6
7
  :space-between="0"
7
8
  :loop="isLoop"
@@ -50,6 +51,7 @@ export default defineComponent({
50
51
 
51
52
  data() {
52
53
  return {
54
+ manualReload: 0 as number,
53
55
  modules: [Navigation],
54
56
  numberItem: 5 as number,
55
57
  isPhone: false as boolean,
@@ -91,6 +93,12 @@ export default defineComponent({
91
93
  this.itemSizeWithoutRecalculed =
92
94
  (this.$el as HTMLElement).offsetWidth / this.numberItem;
93
95
  },
96
+ listObject: {
97
+ deep: true,
98
+ handler() {
99
+ this.manualReload+=1;
100
+ },
101
+ },
94
102
  },
95
103
 
96
104
  methods: {
@@ -137,10 +137,8 @@ export default defineComponent({
137
137
  },
138
138
  true,
139
139
  );
140
- this.reset();
141
- this.allPodcasts = this.allPodcasts.concat(
142
- data.result.filter((pod: Podcast | null) => null !== pod),
143
- );
140
+ this.loading = true;
141
+ this.allPodcasts = data.result.filter((pod: Podcast | null) => null !== pod);
144
142
  this.loading = false;
145
143
  },
146
144
  sortPopular(): void {
@@ -152,11 +150,7 @@ export default defineComponent({
152
150
  if (!this.popularSort) return;
153
151
  this.popularSort = false;
154
152
  this.fetchNext();
155
- },
156
- reset(): void {
157
- this.loading = true;
158
- this.allPodcasts.length = 0;
159
- },
153
+ }
160
154
  },
161
155
  });
162
156
  </script>
@@ -14,13 +14,9 @@ import { usePlayerStore } from "@/stores/PlayerStore";
14
14
  import { mapActions } from "pinia";
15
15
  import { playerLogicProgress } from "../../../mixins/player/playerLogicProgress";
16
16
  import videojs, { VideoJsPlayer } from "video.js";
17
- import qualitySelector from "videojs-hls-quality-selector";
18
- import qualityLevels from "videojs-contrib-quality-levels";
19
- if (!videojs.getPlugin("qualityLevels")) {
20
- videojs.registerPlugin("qualityLevels", qualityLevels);
21
- }
22
- if (!videojs.getPlugin("hlsQualitySelector")) {
23
- videojs.registerPlugin("hlsQualitySelector", qualitySelector);
17
+ import qualitySelectorHls from "videojs-quality-selector-hls";
18
+ if (undefined===videojs.getPlugin("qualitySelectorHls")) {
19
+ videojs.registerPlugin("qualitySelectorHls", qualitySelectorHls);
24
20
  }
25
21
  import { defineComponent } from "vue";
26
22
  export default defineComponent({
@@ -68,11 +64,6 @@ export default defineComponent({
68
64
  nativeAudioTracks: false,
69
65
  nativeVideoTracks: false,
70
66
  },
71
- plugins: {
72
- hlsQualitySelector: {
73
- displayCurrentQuality: true,
74
- },
75
- },
76
67
  };
77
68
  },
78
69
  },
@@ -99,7 +90,7 @@ export default defineComponent({
99
90
  }
100
91
  this.videoClean();
101
92
  this.playLive();
102
- }, 5000);
93
+ }, 15000);
103
94
  },
104
95
  async playLive(): Promise<void> {
105
96
  clearTimeout(this.stalledTimout);
@@ -113,6 +104,8 @@ export default defineComponent({
113
104
  document.getElementById("video-element-hls") as Element,
114
105
  this.videoOptions,
115
106
  () => {
107
+ this.player.qualitySelectorHls( {displayCurrentQuality: true} );
108
+ /*console.log(this.player.tech(true).vhs.playlistController_); */
116
109
  this.errorPlay = "";
117
110
  this.playing = true;
118
111
  },
@@ -79,6 +79,9 @@ export const playerLive = defineComponent({
79
79
  await this.initHls(hlsStreamUrl);
80
80
  }
81
81
  } catch (error) {
82
+ if("STOPPED"===this.playerStatus){
83
+ return;
84
+ }
82
85
  setTimeout(() => {
83
86
  this.playHls(hlsStreamUrl);
84
87
  }, 1000);
@@ -103,8 +106,8 @@ export const playerLive = defineComponent({
103
106
  this.onPlay();
104
107
  resolve();
105
108
  });
106
- this.hls.on(Hls.Events.ERROR, async () => {
107
- reject(new Error("There is an error while reading media content"));
109
+ this.hls.on(Hls.Events.ERROR, async (event, data) => {
110
+ reject(new Error("There is an error while reading media content"+data.details));
108
111
  });
109
112
  this.hls.loadSource(hlsStreamUrl);
110
113
  });
@@ -72,6 +72,7 @@ export const playerLogicProgress = defineComponent({
72
72
  "podcast/prepare/live/" + this.playerLive.podcastId+"?mediaType="+mediaType,
73
73
  undefined,
74
74
  );
75
+ //TODO check if we can do otherwise
75
76
  await octopusApi.fetchDataPublicWithParams<string | null>(
76
77
  0,
77
78
  "podcast/download/live/" + this.playerLive.podcastId + ".m3u8",
@@ -5,15 +5,15 @@ const state: ParamStore = {
5
5
  generalParameters: {
6
6
  organisationId: "ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c",
7
7
  authenticated: false,
8
- isAdmin: true,
9
- isRoleLive: true,
10
- isCommments: true,
11
- isOrganisation:true,
12
- isPlaylist: true,
13
- isProduction: true,
14
- isContribution: true,
15
- isRadio: true,
16
- ApiUri: "https://api.staging.saooti.org/",
8
+ isAdmin: false,
9
+ isRoleLive: false,
10
+ isCommments: false,
11
+ isOrganisation:false,
12
+ isPlaylist: false,
13
+ isProduction: false,
14
+ isContribution: false,
15
+ isRadio: false,
16
+ ApiUri: "https://api.dev2.saooti.org/",
17
17
  podcastmaker: false,
18
18
  buttonPlus: true,
19
19
  allCategories: [],
@@ -27,8 +27,8 @@ const state: ParamStore = {
27
27
  SharePlayer: true,
28
28
  ShareButtons: true,
29
29
  ShareDistribution: true,
30
- MiniplayerUri: "https://playerbeta.staging.saooti.org/",
31
- hlsUri: "https://hls.live.staging.saooti.org/",
30
+ MiniplayerUri: "https://playerbeta.dev2.saooti.org/",
31
+ hlsUri: "https://hls.live.dev2.saooti.org/",
32
32
  mainRubrique: 0,
33
33
  resourceUrl: undefined,
34
34
  podcastItemShowEmission: false,
@@ -81,14 +81,14 @@ const state: ParamStore = {
81
81
  userName: "",
82
82
  },
83
83
  octopusApi: {
84
- url: "https://api.staging.saooti.org/",
85
- commentsUrl: "https://comments.staging.saooti.org/",
86
- imageUrl: "https://imageproxy.staging.saooti.org/",
87
- studioUrl: "https://studio.staging.saooti.org/",
88
- playerUrl: "https://playerbeta.staging.saooti.org/",
89
- speechToTextUrl: "https://speech2text.staging.saooti.org/",
90
- radioUrl:"https://radio.staging.saooti.org/",
91
- recoUrl: "https://reco.staging.saooti.org/",
84
+ url: "https://api.dev2.saooti.org/",
85
+ commentsUrl: "https://comments.dev2.saooti.org/",
86
+ imageUrl: "https://imageproxy.dev2.saooti.org/",
87
+ studioUrl: "https://studio.dev2.saooti.org/",
88
+ playerUrl: "https://playerbeta.dev2.saooti.org/",
89
+ speechToTextUrl: "https://speech2text.dev2.saooti.org/",
90
+ radioUrl:"https://radio.dev2.saooti.org/",
91
+ recoUrl: "https://reco.dev2.saooti.org/",
92
92
  organisationId: undefined,
93
93
  rubriqueIdFilter: undefined,
94
94
  },