@pie-framework/pie-fixed-player-static 1.0.0-152280c.3 → 1.0.0-152280c.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pie-framework/pie-fixed-player-static
2
2
 
3
- Version: 1.0.0-152280c.3
3
+ Version: 1.0.0-152280c.5
4
4
 
5
5
  Pre-bundled PIE fixed player with static element versions for production use.
6
6
 
@@ -18,7 +18,7 @@ in Pieoneer, use `pie-inline-player` instead.
18
18
  ## Installation
19
19
 
20
20
  ```bash
21
- npm install @pie-framework/pie-fixed-player-static@1.0.0-152280c.3
21
+ npm install @pie-framework/pie-fixed-player-static@1.0.0-152280c.5
22
22
  ```
23
23
 
24
24
  ## Usage
package/dist/index.js CHANGED
@@ -141,6 +141,13 @@
141
141
  duration,
142
142
  errorMessage
143
143
  });
144
+
145
+ // Dispatch the event failed load event
146
+ document.dispatchEvent(new CustomEvent('PiePlayerLoadEvent', {
147
+ detail: 'PIE-Fixed-Player-Load-Failed',
148
+ bubbles: true,
149
+ cancelable: true
150
+ }));
144
151
  } catch {
145
152
  // Tracking failed, continue anyway
146
153
  }
@@ -234,6 +241,16 @@
234
241
  try {
235
242
  if (typeof window !== 'undefined' && typeof window.performance !== 'undefined') {
236
243
  window.performance.mark('PIE-Fixed-Player-Load-Complete');
244
+
245
+ // Dispatch the event load complete event
246
+ document.dispatchEvent(new CustomEvent('PiePlayerLoadEvent', {
247
+ detail: 'PIE-Fixed-Player-Load-Complete',
248
+ bubbles: true,
249
+ cancelable: true
250
+ }));
251
+
252
+ // Set global flag so Star knows PIE has loaded if PIE loads before Star and the dispatch isn't captured
253
+ window.pieFixedPlayerLoaded = true;
237
254
  }
238
255
  } catch {
239
256
  // Performance marking failed, continue anyway