@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
package/src/assets/share.scss
CHANGED
|
@@ -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.
|
|
127
|
-
|
|
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
|
-
|
|
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.
|
|
74
|
+
(this.playerRadio?.metadata.playDuration * 1000);
|
|
75
|
+
this.isBack = percentPlayed < this.playerElapsed;
|
|
70
76
|
this.playerUpdateElapsed(
|
|
71
77
|
percentPlayed,
|
|
72
|
-
this.playerRadio?.metadata.
|
|
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: {
|