@playkit-js/hotspots 3.2.31-canary.0-ea3a7ac → 3.2.31
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/hotspots-plugin.tsx
CHANGED
|
@@ -39,7 +39,6 @@ export class HotspotsPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
39
39
|
|
|
40
40
|
private _player: KalturaPlayerTypes.Player;
|
|
41
41
|
private _hotspots: LayoutHotspot[] = [];
|
|
42
|
-
private _pendingRawHotspots: RawLayoutHotspot[] = [];
|
|
43
42
|
private _floatingItem: FloatingItem | null = null;
|
|
44
43
|
private _canvas: Canvas | null = null;
|
|
45
44
|
|
|
@@ -152,8 +151,8 @@ export class HotspotsPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
152
151
|
const hotspotCues = this._filterHotspotCues(payload.cues);
|
|
153
152
|
// update HotspotsContainer to add or remove visible hotspots
|
|
154
153
|
if (hotspotCues.length || this._hotspots.length) {
|
|
155
|
-
|
|
156
|
-
this._hotspots = this._recalculateCuepointLayout(
|
|
154
|
+
const rawLayoutHotspots = this._prepareHotspots(hotspotCues);
|
|
155
|
+
this._hotspots = this._recalculateCuepointLayout(rawLayoutHotspots);
|
|
157
156
|
this._updateHotspotsContainer();
|
|
158
157
|
}
|
|
159
158
|
};
|
|
@@ -204,8 +203,7 @@ export class HotspotsPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
204
203
|
|
|
205
204
|
private _renderRoot = (floatingItemProps: FloatingItemProps): ComponentChildren => {
|
|
206
205
|
if (this._checkIfResizeHappened(floatingItemProps.canvas)) {
|
|
207
|
-
|
|
208
|
-
this._hotspots = this._recalculateCuepointLayout(source);
|
|
206
|
+
this._hotspots = this._recalculateCuepointLayout(this._hotspots);
|
|
209
207
|
}
|
|
210
208
|
return (
|
|
211
209
|
<HotspotWrapper dispatcher={(eventType, payload) => this.dispatchEvent(eventType, payload)} key={'hotspotWrapper'} hotspots={this._hotspots} pauseVideo={this._pauseVideo} seekTo={this._seekTo} sendAnalytics={() => {}} />
|
|
@@ -215,7 +213,6 @@ export class HotspotsPlugin extends KalturaPlayer.core.BasePlugin {
|
|
|
215
213
|
reset(): void {
|
|
216
214
|
this.eventManager.removeAll();
|
|
217
215
|
this._hotspots = [];
|
|
218
|
-
this._pendingRawHotspots = [];
|
|
219
216
|
this._canvas = null;
|
|
220
217
|
if (this._floatingItem) {
|
|
221
218
|
this.floatingManager.remove(this._floatingItem);
|