@saooti/octopus-sdk 37.0.11 → 37.0.13

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": "37.0.11",
3
+ "version": "37.0.13",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -64,7 +64,8 @@
64
64
  }
65
65
  .page-element{
66
66
  margin-top: 12rem;
67
- position: relative;
67
+ z-index: 1;
68
+ /* position: relative; */
68
69
  }
69
70
 
70
71
  .vue-swatches__trigger{
@@ -16,8 +16,6 @@
16
16
  target="popover-share-help"
17
17
  :title="$t('Help')"
18
18
  :content="$t('Share this page without edit and share blocks')"
19
- relative-class="page-element"
20
- :is-fixed="true"
21
19
  />
22
20
  </div>
23
21
  <ShareButtonsIntern
@@ -31,6 +31,8 @@ export default defineComponent({
31
31
  isFixed: { type: Boolean, default: false },
32
32
  relativeClass: { type: String, default: undefined },
33
33
  leftPos: { type: Boolean, default: false },
34
+ topPos: { type: Boolean, default: false },
35
+
34
36
  },
35
37
  data() {
36
38
  return {
@@ -123,12 +125,13 @@ export default defineComponent({
123
125
  parentRight -
124
126
  (this.$refs.popover as HTMLElement).clientWidth
125
127
  : rectElement.left - parentLeft;
126
- this.posY =
127
- rectElement.bottom +
128
+ const yPosParent = this.topPos ? rectElement.top:rectElement.bottom;
129
+ const yGap = this.topPos ? -5 - (this.$refs.popover as HTMLElement).clientHeight :5;
130
+ this.posY = yPosParent +
128
131
  parentScrollTop -
129
132
  parentTop +
130
133
  (this.isFixed ? 0 : window.scrollY) +
131
- 5;
134
+ yGap;
132
135
  },
133
136
  async clearDataBlur(e: FocusEvent) {
134
137
  if (!e.relatedTarget) {
@@ -5,6 +5,7 @@
5
5
  >
6
6
  <div
7
7
  class="octopus-progress-bar"
8
+ :class="isBack ? 'no-transition': ''"
8
9
  role="progressbar"
9
10
  aria-valuenow="0"
10
11
  aria-valuemin="0"
@@ -27,6 +28,7 @@ export default defineComponent({
27
28
  data() {
28
29
  return {
29
30
  percentInterval: undefined as ReturnType<typeof setTimeout> | undefined,
31
+ isBack: false as boolean,
30
32
  };
31
33
  },
32
34
 
@@ -45,6 +47,9 @@ export default defineComponent({
45
47
  mounted() {
46
48
  this.handlePercentInterval();
47
49
  },
50
+ unmounted() {
51
+ clearInterval(this.percentInterval as unknown as number);
52
+ },
48
53
  methods: {
49
54
  ...mapActions(usePlayerStore, ["playerUpdateElapsed"]),
50
55
  handlePercentInterval(/* clear: boolean */): void {
@@ -66,10 +71,11 @@ export default defineComponent({
66
71
  .diff(dayjs(this.playerRadio.metadata.startDate));
67
72
  const percentPlayed =
68
73
  actualMilliSecondsPlayed /
69
- (this.playerRadio?.metadata.mediaDuration * 1000);
74
+ (this.playerRadio?.metadata.playDuration * 1000);
75
+ this.isBack = percentPlayed < this.playerElapsed;
70
76
  this.playerUpdateElapsed(
71
77
  percentPlayed,
72
- this.playerRadio?.metadata.mediaDuration,
78
+ this.playerRadio?.metadata.playDuration,
73
79
  );
74
80
  },
75
81
  },
@@ -83,6 +89,9 @@ export default defineComponent({
83
89
  .octopus-progress-bar {
84
90
  background-color: #747474;
85
91
  }
92
+ .no-transition{
93
+ transition: none !important;
94
+ }
86
95
  }
87
96
  }
88
97
  </style>
@@ -83,8 +83,8 @@ export const usePlayerStore = defineStore("PlayerStore", {
83
83
  transcriptText(): string {
84
84
  return this.playerTranscript?.actualText ?? "";
85
85
  },
86
- radioUrl(): string {
87
- return this.playerRadio?.url ?? "";
86
+ radioUrl(): string|undefined {
87
+ return this.playerRadio?.url ?? undefined;
88
88
  },
89
89
  },
90
90
  actions: {