@saooti/octopus-sdk 33.0.0 → 33.0.2

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 (79) hide show
  1. package/README.md +2 -1
  2. package/docker-compose.sonar.yml +8 -0
  3. package/package.json +13 -3
  4. package/public/css/fonts/icomoon.eot +0 -0
  5. package/public/css/fonts/icomoon.svg +1 -0
  6. package/public/css/fonts/icomoon.ttf +0 -0
  7. package/public/css/fonts/icomoon.woff +0 -0
  8. package/public/css/fonts/style.css +35 -32
  9. package/public/img/ACPM.png +0 -0
  10. package/sonarqube-scanner.js +18 -0
  11. package/src/assets/bootstrap-diff.scss +0 -1
  12. package/src/assets/general.scss +2 -3
  13. package/src/assets/multiselect.scss +0 -4
  14. package/src/assets/share.scss +0 -13
  15. package/src/components/display/categories/CategoryList.vue +2 -3
  16. package/src/components/display/comments/AddCommentModal.vue +4 -1
  17. package/src/components/display/comments/CommentBasicView.vue +4 -4
  18. package/src/components/display/comments/CommentInput.vue +2 -2
  19. package/src/components/display/comments/CommentItem.vue +32 -25
  20. package/src/components/display/comments/CommentList.vue +34 -21
  21. package/src/components/display/comments/CommentSection.vue +2 -3
  22. package/src/components/display/edit/EditBox.vue +0 -1
  23. package/src/components/display/emission/EmissionChooser.vue +1 -1
  24. package/src/components/display/emission/EmissionItem.vue +10 -10
  25. package/src/components/display/emission/EmissionList.vue +4 -4
  26. package/src/components/display/filter/AdvancedSearch.vue +1 -1
  27. package/src/components/display/filter/DateFilter.vue +2 -2
  28. package/src/components/display/filter/SearchOrder.vue +1 -1
  29. package/src/components/display/list/ListPaginate.vue +6 -3
  30. package/src/components/display/list/Paginate.vue +32 -28
  31. package/src/components/display/live/LiveHorizontalList.vue +4 -4
  32. package/src/components/display/live/LiveList.vue +41 -33
  33. package/src/components/display/participant/ParticipantItem.vue +9 -9
  34. package/src/components/display/participant/ParticipantList.vue +4 -9
  35. package/src/components/display/playlist/PlaylistItem.vue +9 -9
  36. package/src/components/display/playlist/PlaylistList.vue +4 -4
  37. package/src/components/display/playlist/PodcastList.vue +2 -2
  38. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +1 -1
  39. package/src/components/display/podcasts/ParticipantDescription.vue +1 -1
  40. package/src/components/display/podcasts/PodcastImage.vue +4 -3
  41. package/src/components/display/podcasts/PodcastInlineList.vue +2 -0
  42. package/src/components/display/podcasts/PodcastInlineListClassic.vue +22 -1
  43. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +7 -4
  44. package/src/components/display/podcasts/PodcastItem.vue +2 -2
  45. package/src/components/display/podcasts/PodcastList.vue +4 -4
  46. package/src/components/display/podcasts/PodcastSwiperList.vue +1 -1
  47. package/src/components/display/rubriques/RubriqueChooser.vue +1 -1
  48. package/src/components/display/rubriques/RubriqueList.vue +2 -2
  49. package/src/components/display/sharing/PlayerParameters.vue +1 -1
  50. package/src/components/display/sharing/QrCode.vue +1 -2
  51. package/src/components/display/sharing/ShareButtonsIntern.vue +1 -2
  52. package/src/components/display/sharing/ShareDistribution.vue +1 -2
  53. package/src/components/display/sharing/SharePlayer.vue +47 -33
  54. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  55. package/src/components/form/ClassicSelect.vue +0 -1
  56. package/src/components/misc/ErrorMessage.vue +3 -5
  57. package/src/components/misc/Footer.vue +1 -1
  58. package/src/components/misc/TopBar.vue +1 -1
  59. package/src/components/misc/modal/NewsletterModal.vue +2 -3
  60. package/src/components/misc/modal/ShareModalPlayer.vue +1 -2
  61. package/src/components/misc/player/PlayerCompact.vue +1 -1
  62. package/src/components/misc/player/PlayerLarge.vue +1 -1
  63. package/src/components/mixins/functions.ts +6 -16
  64. package/src/components/mixins/player/playerComment.ts +34 -27
  65. package/src/components/mixins/player/playerLive.ts +1 -10
  66. package/src/components/mixins/player/playerLogic.ts +40 -29
  67. package/src/components/pages/Podcast.vue +4 -0
  68. package/src/helper/duration.ts +7 -36
  69. package/src/i18n.ts +1 -1
  70. package/src/locale/it.ts +0 -1
  71. package/src/main.ts +3 -10
  72. package/src/sass/_variables.scss +1 -1
  73. package/src/store/class/adserver/adserverConfig.ts +1 -1
  74. package/src/store/class/general/emission.ts +1 -1
  75. package/src/store/class/general/organisation.ts +1 -1
  76. package/src/store/class/general/podcast.ts +1 -1
  77. package/src/store/paramStore.ts +15 -13
  78. package/public/img/caution.png +0 -0
  79. package/public/img/play-podcast.png +0 -0
@@ -172,24 +172,7 @@ export const playerLogic = defineComponent({
172
172
  this.playerError = true;
173
173
  }
174
174
  },
175
- onTimeUpdate(event: Event): void {
176
- const mediaTarget = (event.currentTarget as HTMLMediaElement);
177
- if (this.podcast || this.live) {
178
- if (!this.downloadId) {
179
- return;
180
- }
181
- if (
182
- this.live &&
183
- 0 === this.listenTime &&
184
- 0 !== mediaTarget.currentTime
185
- ) {
186
- this.notListenTime = mediaTarget.currentTime;
187
- this.listenTime = 1;
188
- } else {
189
- this.listenTime =
190
- mediaTarget.currentTime - this.notListenTime;
191
- }
192
- }
175
+ streamDurationForSafari(mediaTarget:HTMLMediaElement){
193
176
  let streamDuration = mediaTarget.duration;
194
177
  if(Infinity===streamDuration){
195
178
  const seekable = mediaTarget.seekable;
@@ -199,15 +182,16 @@ export const playerLogic = defineComponent({
199
182
  streamDuration = mediaTarget.currentTime;
200
183
  }
201
184
  }
202
- if (!streamDuration) return;
203
- if (!mediaTarget.currentTime) return;
204
- if (!this.live) {
205
- this.displayAlertBar = false;
206
- this.percentLiveProgress = 100;
207
- this.$store.commit('playerTotalTime', streamDuration);
208
- this.$store.commit('playerElapsed', mediaTarget.currentTime / streamDuration);
209
- return;
210
- }
185
+ return streamDuration;
186
+ },
187
+ onTimeUpdatePodcast(streamDuration:number, currentTime:number){
188
+ this.displayAlertBar = false;
189
+ this.percentLiveProgress = 100;
190
+ this.$store.commit('playerTotalTime', streamDuration);
191
+ this.$store.commit('playerElapsed', currentTime / streamDuration);
192
+ },
193
+ onTimeUpdateLive(streamDuration: number, currentTime:number){
194
+ if(!this.live){return;}
211
195
  const scheduledDuration = this.live.duration / 1000;
212
196
  if (scheduledDuration > streamDuration) {
213
197
  this.displayAlertBar = false;
@@ -215,15 +199,42 @@ export const playerLogic = defineComponent({
215
199
  this.$store.commit('playerTotalTime', scheduledDuration);
216
200
  this.$store.commit(
217
201
  'playerElapsed',
218
- mediaTarget.currentTime / scheduledDuration
202
+ currentTime / scheduledDuration
219
203
  );
220
204
  } else {
221
205
  this.percentLiveProgress = 100;
222
206
  this.displayAlertBar = true;
223
207
  this.durationLivePosition = (scheduledDuration / streamDuration) * 100;
224
208
  this.$store.commit('playerTotalTime', streamDuration);
225
- this.$store.commit('playerElapsed', mediaTarget.currentTime / streamDuration);
209
+ this.$store.commit('playerElapsed', currentTime / streamDuration);
210
+ }
211
+ },
212
+ onTimeUpdate(event: Event): void {
213
+ const mediaTarget = (event.currentTarget as HTMLMediaElement);
214
+ if (this.podcast || this.live) {
215
+ if (!this.downloadId) {
216
+ return;
217
+ }
218
+ if (
219
+ this.live &&
220
+ 0 === this.listenTime &&
221
+ 0 !== mediaTarget.currentTime
222
+ ) {
223
+ this.notListenTime = mediaTarget.currentTime;
224
+ this.listenTime = 1;
225
+ } else {
226
+ this.listenTime =
227
+ mediaTarget.currentTime - this.notListenTime;
228
+ }
229
+ }
230
+ let streamDuration = this.streamDurationForSafari(mediaTarget);
231
+ if (!streamDuration) return;
232
+ if (!mediaTarget.currentTime) return;
233
+ if (!this.live) {
234
+ this.onTimeUpdatePodcast(streamDuration,mediaTarget.currentTime);
235
+ return;
226
236
  }
237
+ this.onTimeUpdateLive(streamDuration,mediaTarget.currentTime);
227
238
  },
228
239
  onFinished(): void {
229
240
  this.setDownloadId(null);
@@ -71,6 +71,10 @@
71
71
  :title="$t('More episodes of this emission')"
72
72
  :button-text="$t('All podcast emission button')"
73
73
  />
74
+ <PodcastInlineList
75
+ :podcastId="podcastId"
76
+ title="Les recommendations de Vincent !"
77
+ />
74
78
  <PodcastInlineList
75
79
  v-for="c in categories"
76
80
  :key="c.id"
@@ -1,43 +1,14 @@
1
1
  export default {
2
+ formatToString(value: number){
3
+ if (value < 10) {
4
+ return '0' + value;
5
+ }
6
+ return value.toString();
7
+ },
2
8
  formatDuration(totalSeconds: number): string {
3
9
  const hours = Math.floor(totalSeconds / 3600);
4
10
  const minutes = Math.floor((totalSeconds - hours * 3600) / 60);
5
11
  const seconds = totalSeconds - hours * 3600 - minutes * 60;
6
- let hoursString = "";
7
- let minutesString = "";
8
- let secondsString = "";
9
-
10
- if (hours > 0) {
11
- if (hours < 10) {
12
- hoursString = '0' + hours;
13
- }else{
14
- hoursString = hours.toString();
15
- }
16
- if (minutes < 10) {
17
- minutesString = '0' + minutes;
18
- }else{
19
- minutesString = minutes.toString();
20
- }
21
- if (seconds < 10) {
22
- secondsString = '0' + seconds;
23
- }else{
24
- secondsString = seconds.toString();
25
- }
26
-
27
- return hoursString + "'" + minutesString + "'" + secondsString + "'";
28
- } else {
29
- if (minutes < 10) {
30
- minutesString = '0' + minutes;
31
- }else{
32
- minutesString = minutes.toString();
33
- }
34
- if (seconds < 10) {
35
- secondsString = '0' + seconds;
36
- }else{
37
- secondsString = seconds.toString();
38
- }
39
-
40
- return minutesString + "'" + secondsString + "'";
41
- }
12
+ return (hours > 0? this.formatToString(hours)+"'":"") + this.formatToString(minutes) +"'"+ this.formatToString(seconds)+"'";
42
13
  },
43
14
  };
package/src/i18n.ts CHANGED
@@ -8,7 +8,7 @@ import 'moment/dist/locale/fr.js';
8
8
  import 'moment/dist/locale/it.js';
9
9
  import 'moment/dist/locale/sl.js';
10
10
 
11
- export function setupI18n(options = { locale: 'en' }, isEducation: boolean) {
11
+ export function setupI18n(options: { locale: string }, isEducation: boolean) {
12
12
  const i18n = createI18n(options)
13
13
  loadLocaleMessages(i18n.global, options.locale, isEducation);
14
14
  return i18n;
package/src/locale/it.ts CHANGED
@@ -67,7 +67,6 @@ export default{
67
67
  Episode: 'Episodio',
68
68
  'Episode name image': "Immagine dell'episodio {name}",
69
69
  'More episodes of this emission': "Altri episodi di questa serie",
70
- 'More episodes of this category : {name}': "Altri episodi della categoria: {name}",
71
70
  'All podcast emission button': "Seleziona tutte le serie",
72
71
  Duration: 'Durata: {duration}',
73
72
  Animator: 'Host',
package/src/main.ts CHANGED
@@ -6,19 +6,12 @@ import {setupI18n} from './i18n';
6
6
  import router from '@/router/router';
7
7
  import store from '@/store/AppStore';
8
8
  import paramStore from '@/store/paramStore';
9
- /* import 'popper.js/dist/popper.min.js'; */
10
- /* import 'jquery/src/jquery.js'; */
11
- /* import 'jquery';
12
- import 'bootstrap/dist/js/bootstrap.bundle.min.js';
13
- */
14
9
 
15
-
16
- //TODO
17
10
  const nameEQ = 'octopus-language=';
18
11
  const ca = document.cookie.split(';');
19
12
  let language = "";
20
- for (let i = 0; i < ca.length; i++) {
21
- let c = ca[i];
13
+ for (let valueCookie of ca) {
14
+ let c = valueCookie;
22
15
  while (c.charAt(0) == ' ') c = c.substring(1, c.length);
23
16
  if (0 === c.indexOf(nameEQ)){
24
17
  language = c.substring(nameEQ.length, c.length);
@@ -26,7 +19,7 @@ for (let i = 0; i < ca.length; i++) {
26
19
  }
27
20
  }
28
21
  if(0===language.length){
29
- const navigatorLang = navigator.language /* || navigator.userLanguage */;
22
+ const navigatorLang = navigator.language;
30
23
  language = 'fr';
31
24
  if(navigatorLang.includes('en')){
32
25
  language = 'en';
@@ -2,7 +2,7 @@
2
2
  $body-bg: #f8fafc;
3
3
 
4
4
  // Typography
5
- $font-family-sans-serif: 'Roboto', sans-serif;
5
+ $font-family-sans-serif: sans-serif;
6
6
  $font-size-base: 0.9rem;
7
7
  $line-height-base: 1.6;
8
8
  $primary: #32815C;
@@ -1,7 +1,7 @@
1
1
  import { AdserverTiming } from "./adserverTiming";
2
2
 
3
3
  export interface AdserverConfig {
4
- activeServer?: string | undefined; // SOUNDCAST, ADSWIZZ, TARGETSPOT
4
+ activeServer?: string; // SOUNDCAST, ADSWIZZ, TARGETSPOT
5
5
  config: {[key:string]: Array<AdserverTiming>};
6
6
  minIntervalDuration?: number;
7
7
  minTailDuration?: number;
@@ -4,7 +4,7 @@ import { Person } from '../user/person';
4
4
 
5
5
  export interface Emission {
6
6
  imageUrl?: string;
7
- annotations?: {[key: string]:string|number|boolean|undefined}|undefined;
7
+ annotations?: {[key: string]:string|number|boolean|undefined};
8
8
  description: string;
9
9
  emissionId: number;
10
10
  iabIds?: Array<number>;
@@ -4,7 +4,7 @@ export interface Organisation{
4
4
  imageUrl: string;
5
5
  admin?: Person;
6
6
  comments?: string;
7
- attributes?: {[key: string]:string|number|boolean|undefined}|undefined;
7
+ attributes?: {[key: string]:string|number|boolean|undefined};
8
8
  description?: string;
9
9
  id: string;
10
10
  location?: {
@@ -5,7 +5,7 @@ import { Person } from '../user/person';
5
5
  export interface Podcast {
6
6
  imageUrl?: string;
7
7
  animators?: Array<Participant>;
8
- annotations?:{[key: string]:string|number|boolean|undefined}|undefined;
8
+ annotations?:{[key: string]:string|number|boolean|undefined};
9
9
  audioStorageUrl: string;
10
10
  audioUrl: string;
11
11
  article?: string;
@@ -1,7 +1,7 @@
1
1
  import octopusApi from '@saooti/octopus-api';
2
2
  import { Category } from './class/general/category';
3
3
 
4
- const state:paramStore = {
4
+ const state:ParamStore = {
5
5
  generalParameters: {
6
6
  organisationId:'ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c',
7
7
  authenticated: true,
@@ -89,12 +89,13 @@ const state:paramStore = {
89
89
  studioUrl: 'http://studio.dev2.saooti.org/',
90
90
  playerUrl: 'https://playerbeta.dev2.saooti.org/',
91
91
  speechToTextUrl:'https://speech2text.dev2.saooti.org/',
92
+ recoUrl: 'https://reco.dev2.saooti.org/',
92
93
  organisationId: undefined,
93
94
  rubriqueIdFilter: undefined,
94
95
  },
95
96
  };
96
97
  export interface GeneralParameters{
97
- organisationId?: string|undefined,
98
+ organisationId?: string,
98
99
  authenticated?: boolean,
99
100
  isAdmin?: boolean,
100
101
  isRoleLive?: boolean,
@@ -122,7 +123,7 @@ export interface PodcastPage{
122
123
  downloadButton?: boolean,
123
124
  hlsUri?: string,
124
125
  mainRubrique?: number,
125
- resourceUrl?: string |undefined,
126
+ resourceUrl?: string,
126
127
  podcastItemShowEmission?: boolean,
127
128
  clickPlayGoPage?:boolean,
128
129
  listTypeClassic?:boolean,
@@ -133,16 +134,16 @@ export interface PodcastsPage{
133
134
  MonetizableFilter?: boolean,
134
135
  podcastShadow?: boolean,
135
136
  podcastBorderBottom?: boolean,
136
- titlePage?: string|undefined,
137
+ titlePage?: string,
137
138
  emissionChooser?: boolean,
138
139
  }
139
140
  export interface EmissionsPage{
140
141
  smallItems?: boolean,
141
142
  lightItems?: boolean,
142
- titlePage?: string|undefined,
143
+ titlePage?: string,
143
144
  itemPlayer?: boolean,
144
- rubriquage?: number|undefined,
145
- mainRubrique?: number|undefined,
145
+ rubriquage?: number,
146
+ mainRubrique?: number,
146
147
  buttonMore?: boolean,
147
148
  overflowScroll?: boolean,
148
149
  titleInImage?: boolean,
@@ -154,10 +155,10 @@ export interface EmissionPage{
154
155
  }
155
156
  export interface IntervenantPage{
156
157
  lightStyle?: boolean,
157
- titlePage?: string|undefined
158
+ titlePage?: string
158
159
  }
159
160
  export interface IntervenantsPage{
160
- titlePage?: string|undefined
161
+ titlePage?: string
161
162
  }
162
163
  export interface SearchPage{
163
164
  hideBar?: boolean
@@ -167,7 +168,7 @@ export interface Player{
167
168
  emissionName?: boolean
168
169
  }
169
170
  export interface Footer{
170
- contactLink?: string|undefined
171
+ contactLink?: string
171
172
  }
172
173
  export interface Organisation{
173
174
  imageUrl?: string,
@@ -181,7 +182,8 @@ export interface OctopusApi{
181
182
  studioUrl?: string,
182
183
  playerUrl?: string,
183
184
  speechToTextUrl?:string,
184
- organisationId?: string | undefined,
185
+ recoUrl?:string,
186
+ organisationId?: string,
185
187
  oAuthParam?: {
186
188
  accessToken: string,
187
189
  refreshToken: string,
@@ -189,7 +191,7 @@ export interface OctopusApi{
189
191
  },
190
192
  rubriqueIdFilter?: Array<number>,
191
193
  }
192
- export interface paramStore{
194
+ export interface ParamStore{
193
195
  generalParameters:GeneralParameters,
194
196
  podcastPage: PodcastPage,
195
197
  podcastsPage: PodcastsPage,
@@ -206,7 +208,7 @@ export interface paramStore{
206
208
  const definedProps = (obj: GeneralParameters|PodcastPage|PodcastsPage|EmissionsPage|EmissionPage|IntervenantPage|IntervenantsPage|SearchPage|Player|Footer|Organisation|OctopusApi) => Object.fromEntries(
207
209
  Object.entries(obj).filter(([, v]) => v !== undefined)
208
210
  );
209
- const initialize = function initialize(initObject: paramStore): Promise<void> {
211
+ const initialize = function initialize(initObject: ParamStore): Promise<void> {
210
212
  return new Promise<void>((resolve, reject) => {
211
213
  state.generalParameters = Object.assign(state.generalParameters, definedProps(initObject.generalParameters));
212
214
  if(!state.generalParameters.authenticated){
Binary file
Binary file