From 68c7d8fdcccd76bd55ccb76772c41e45c2dbefc8 Mon Sep 17 00:00:00 2001 From: Andrew Noblet Date: Thu, 27 Oct 2022 11:48:54 -0400 Subject: [PATCH] feat(cxl-ui): [cxl-jw-player] set up api endpoint --- .../src/components/jw-player/mixins/SavePositionMixin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cxl-ui/src/components/jw-player/mixins/SavePositionMixin.js b/packages/cxl-ui/src/components/jw-player/mixins/SavePositionMixin.js index 6ae10b0b6..793ea00d9 100644 --- a/packages/cxl-ui/src/components/jw-player/mixins/SavePositionMixin.js +++ b/packages/cxl-ui/src/components/jw-player/mixins/SavePositionMixin.js @@ -1,6 +1,6 @@ export function SavePositionMixin(BaseClass) { class Mixin extends BaseClass { - __endpoint = ''; + __endpoint; __nonce; @@ -9,6 +9,9 @@ export function SavePositionMixin(BaseClass) { async __setup() { await super.__setup(); + this.__endpoint = `${window.ajaxurl}?action=jwplayer_save_position`; + this.__nonce = window.cxl_pum_vars.nonce; + this.__loadPosition(); }