@flowplayer/player 3.15.0 → 3.16.0-rc

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.
Files changed (58) hide show
  1. package/core/events.d.ts +22 -2
  2. package/core/events.js +50 -50
  3. package/core.js +1 -1
  4. package/default.js +1 -1
  5. package/embed.js +2 -2
  6. package/flowplayer.css +1 -1
  7. package/index.d.ts +78 -35
  8. package/package.json +1 -1
  9. package/plugins/ads.d.ts +76 -33
  10. package/plugins/ads.js +1 -1
  11. package/plugins/airplay.d.ts +77 -52
  12. package/plugins/analytics.d.ts +76 -33
  13. package/plugins/analytics.js +1 -1
  14. package/plugins/asel.d.ts +221 -36
  15. package/plugins/asel.js +1 -1
  16. package/plugins/audio.d.ts +76 -33
  17. package/plugins/chapters.d.ts +76 -33
  18. package/plugins/chromecast.d.ts +76 -33
  19. package/plugins/chromecast.js +1 -1
  20. package/plugins/comscore.d.ts +76 -33
  21. package/plugins/consent.d.ts +76 -33
  22. package/plugins/context-menu.d.ts +76 -33
  23. package/plugins/cuepoints.d.ts +76 -33
  24. package/plugins/dash.d.ts +77 -45
  25. package/plugins/dash.js +1 -1
  26. package/plugins/drm.d.ts +76 -33
  27. package/plugins/endscreen.d.ts +76 -33
  28. package/plugins/fas.d.ts +76 -33
  29. package/plugins/float-on-scroll.d.ts +76 -33
  30. package/plugins/ga4.d.ts +76 -33
  31. package/plugins/gemius.d.ts +76 -33
  32. package/plugins/google-analytics.d.ts +76 -33
  33. package/plugins/health.d.ts +76 -33
  34. package/plugins/health.js +1 -1
  35. package/plugins/hls.d.ts +76 -33
  36. package/plugins/hls.js +1 -1
  37. package/plugins/id3.d.ts +76 -33
  38. package/plugins/iframe.d.ts +76 -33
  39. package/plugins/keyboard.d.ts +76 -33
  40. package/plugins/media-session.d.ts +76 -33
  41. package/plugins/message.d.ts +76 -33
  42. package/plugins/ovp.d.ts +76 -33
  43. package/plugins/playlist.d.ts +107 -33
  44. package/plugins/playlist.js +1 -1
  45. package/plugins/preview.d.ts +76 -33
  46. package/plugins/qsel.d.ts +76 -33
  47. package/plugins/qul.d.ts +76 -33
  48. package/plugins/rts.d.ts +76 -33
  49. package/plugins/share.d.ts +76 -33
  50. package/plugins/speed.d.ts +76 -33
  51. package/plugins/ssai.d.ts +76 -33
  52. package/plugins/ssai.js +1 -1
  53. package/plugins/subtitles.d.ts +76 -33
  54. package/plugins/thumbnails.d.ts +76 -33
  55. package/plugins/tizen.d.ts +76 -33
  56. package/plugins/vtsel.d.ts +76 -33
  57. package/plugins/webos.d.ts +76 -33
  58. package/util/loader.d.ts +76 -33
@@ -344,6 +344,7 @@ declare type ErrorEventDetail = {
344
344
  declare namespace events {
345
345
  export {
346
346
  MOUNT,
347
+ RETRY,
347
348
  ERROR,
348
349
  CONTEXT_MENU,
349
350
  CLICK,
@@ -395,7 +396,8 @@ declare namespace events {
395
396
  LANDSCAPE,
396
397
  PORTRAIT,
397
398
  DVR,
398
- LIVE_2 as LIVE
399
+ LIVE,
400
+ RECOVER
399
401
  }
400
402
  }
401
403
 
@@ -594,8 +596,6 @@ declare const /**
594
596
  */
595
597
  LANDSCAPE = "landscape";
596
598
 
597
- declare const LIVE = "is-live";
598
-
599
599
  /**
600
600
  * @public
601
601
  * when src is a livestream
@@ -607,7 +607,9 @@ declare const /**
607
607
  * @public
608
608
  * when src is a livestream
609
609
  */
610
- LIVE_2 = "live";
610
+ LIVE = "live";
611
+
612
+ declare const LIVE_2 = "is-live";
611
613
 
612
614
  declare const LIVE_SEEKED = "is-live-seeked";
613
615
 
@@ -907,33 +909,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
907
909
 
908
910
  declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
909
911
 
910
- declare type PlayerCustomEventsDetailMap = {
911
- [MOUNT]: MountEventDetail;
912
- [ERROR]: ErrorEventDetail;
913
- [CONTEXT_MENU]: ContextMenuEventDetail;
914
- /* Excluded from this release type: beforeplay */
915
- /* Excluded from this release type: beforepause */
916
- /* Excluded from this release type: state */
912
+ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
913
+ [REAP]: ReapEventDetail;
914
+ [SOURCE]: SourceEventDetail;
917
915
  [CUEPOINT_START]: CuePointStartEventDetail;
918
916
  [CUEPOINT_END]: CuePointEndEventDetail;
919
- [VIEW_ENTER]: ViewEnterEventDetail;
920
- [VIEW_LEAVE]: ViewLeaveEventDetail;
921
- [SOURCE]: SourceEventDetail;
922
- /* Excluded from this release type: recover */
923
- [REAP]: ReapEventDetail;
924
- /* Excluded from this release type: config */
925
- [QUALITIES]: QualitiesEventDetail;
926
- /* Excluded from this release type: "error:fatal" */
927
- [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
917
+ [MOUNT]: MountEventDetail;
918
+ [LIVE]: LiveEventDetail;
919
+ [DVR]: DvrEventDetail;
920
+ [RETRY]: RetryEventDetail;
921
+ [RECOVER]: RecoverEventDetail;
928
922
  /* Excluded from this release type: audioonlysource */
929
923
  /* Excluded from this release type: renderplugin */
930
- [DVR]: DvrEventDetail;
931
- [LIVE_2]: LiveEventDetail;
932
924
  /* Excluded from this release type: "seek:queued" */
933
925
  /* Excluded from this release type: "seek:cancel" */
934
926
  /* Excluded from this release type: "plugin:registered" */
935
927
  /* Excluded from this release type: intersectionchange */
936
- /* Excluded from this release type: retry */
928
+ /* Excluded from this release type: beforeplay */
929
+ /* Excluded from this release type: beforepause */
930
+ /* Excluded from this release type: state */
931
+ /* Excluded from this release type: config */
932
+ /* Excluded from this release type: "error:fatal" */
937
933
  };
938
934
 
939
935
  declare type PlayerCustomEventsOverloads = {
@@ -972,11 +968,18 @@ declare type PlayerCustomEventsOverloads = {
972
968
  * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
973
969
  */
974
970
  on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
975
- /* Excluded from this release type: on */
971
+ /**
972
+ * Emitted when an Error recovery is attempted
973
+ */
974
+ on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
976
975
  /**
977
976
  * Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
978
977
  */
979
978
  on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
979
+ /**
980
+ * Emitted when a player will retry to reload
981
+ */
982
+ on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
980
983
  /* Excluded from this release type: on */
981
984
  /**
982
985
  * Emitted when the set of underlying qualities has changed.
@@ -996,8 +999,7 @@ declare type PlayerCustomEventsOverloads = {
996
999
  /**
997
1000
  * when src is a livestream
998
1001
  */
999
- on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1000
- /* Excluded from this release type: on */
1002
+ on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
1001
1003
  /* Excluded from this release type: on */
1002
1004
  /* Excluded from this release type: on */
1003
1005
  /* Excluded from this release type: on */
@@ -1026,11 +1028,26 @@ declare type PlayerCustomEventsOverloads = {
1026
1028
  */
1027
1029
  off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1028
1030
  /* Excluded from this release type: poll */
1029
- emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1030
1031
  /* Excluded from this release type: emit */
1031
- emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1032
+ /* Excluded from this release type: emit */
1033
+ emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1034
+ /* Excluded from this release type: emit */
1035
+ };
1036
+
1037
+ declare type PlayerEmittableCustomEventsDetailMap = {
1038
+ [ERROR]: ErrorEventDetail;
1039
+ [CONTEXT_MENU]: ContextMenuEventDetail;
1040
+ [VIEW_ENTER]: ViewEnterEventDetail;
1041
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
1042
+ [QUALITIES]: QualitiesEventDetail;
1043
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
1032
1044
  };
1033
1045
 
1046
+ declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
1047
+
1048
+ /**
1049
+ * @public
1050
+ */
1034
1051
  declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1035
1052
 
1036
1053
  declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
@@ -1224,9 +1241,23 @@ declare type RecommendationsReadyEventDetail = {
1224
1241
  playlist: RecommendationItem[];
1225
1242
  };
1226
1243
 
1227
- /* Excluded from this release type: RECOVER */
1244
+ /**
1245
+ * @public
1246
+ * emitted when an Error recovery is attempted
1247
+ */
1248
+ declare const /**
1249
+ @public
1250
+ * when a new player is inserted into the HTML
1251
+ */ /**
1252
+ * @public
1253
+ * emitted when an Error recovery is attempted
1254
+ */
1255
+ RECOVER = "recover";
1228
1256
 
1229
- /* Excluded from this release type: RecoverEventDetail */
1257
+ /**
1258
+ * @public
1259
+ */
1260
+ declare type RecoverEventDetail = null;
1230
1261
 
1231
1262
  /* Excluded from this release type: REMOTE_SESSION_ENDED */
1232
1263
 
@@ -1250,9 +1281,21 @@ declare const /**
1250
1281
  */
1251
1282
  RESIZE = "resize";
1252
1283
 
1253
- /* Excluded from this release type: RETRY */
1284
+ /**
1285
+ * @public
1286
+ */
1287
+ declare const /**
1288
+ @public
1289
+ * when a new player is inserted into the HTML
1290
+ */ /**
1291
+ * @public
1292
+ */
1293
+ RETRY = "retry";
1254
1294
 
1255
- /* Excluded from this release type: RetryEventDetail */
1295
+ /**
1296
+ * @public
1297
+ */
1298
+ declare type RetryEventDetail = null;
1256
1299
 
1257
1300
  declare const RTL = "is-rtl";
1258
1301
 
@@ -1387,7 +1430,7 @@ declare namespace states {
1387
1430
  RTL,
1388
1431
  TV,
1389
1432
  ENDED,
1390
- LIVE,
1433
+ LIVE_2 as LIVE,
1391
1434
  ERRORED,
1392
1435
  WAITING,
1393
1436
  AUTOPLAY,
@@ -344,6 +344,7 @@ declare type ErrorEventDetail = {
344
344
  declare namespace events {
345
345
  export {
346
346
  MOUNT,
347
+ RETRY,
347
348
  ERROR,
348
349
  CONTEXT_MENU,
349
350
  CLICK,
@@ -395,7 +396,8 @@ declare namespace events {
395
396
  LANDSCAPE,
396
397
  PORTRAIT,
397
398
  DVR,
398
- LIVE_2 as LIVE
399
+ LIVE,
400
+ RECOVER
399
401
  }
400
402
  }
401
403
 
@@ -594,8 +596,6 @@ declare const /**
594
596
  */
595
597
  LANDSCAPE = "landscape";
596
598
 
597
- declare const LIVE = "is-live";
598
-
599
599
  /**
600
600
  * @public
601
601
  * when src is a livestream
@@ -607,7 +607,9 @@ declare const /**
607
607
  * @public
608
608
  * when src is a livestream
609
609
  */
610
- LIVE_2 = "live";
610
+ LIVE = "live";
611
+
612
+ declare const LIVE_2 = "is-live";
611
613
 
612
614
  declare const LIVE_SEEKED = "is-live-seeked";
613
615
 
@@ -907,33 +909,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
907
909
 
908
910
  declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
909
911
 
910
- declare type PlayerCustomEventsDetailMap = {
911
- [MOUNT]: MountEventDetail;
912
- [ERROR]: ErrorEventDetail;
913
- [CONTEXT_MENU]: ContextMenuEventDetail;
914
- /* Excluded from this release type: beforeplay */
915
- /* Excluded from this release type: beforepause */
916
- /* Excluded from this release type: state */
912
+ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
913
+ [REAP]: ReapEventDetail;
914
+ [SOURCE]: SourceEventDetail;
917
915
  [CUEPOINT_START]: CuePointStartEventDetail;
918
916
  [CUEPOINT_END]: CuePointEndEventDetail;
919
- [VIEW_ENTER]: ViewEnterEventDetail;
920
- [VIEW_LEAVE]: ViewLeaveEventDetail;
921
- [SOURCE]: SourceEventDetail;
922
- /* Excluded from this release type: recover */
923
- [REAP]: ReapEventDetail;
924
- /* Excluded from this release type: config */
925
- [QUALITIES]: QualitiesEventDetail;
926
- /* Excluded from this release type: "error:fatal" */
927
- [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
917
+ [MOUNT]: MountEventDetail;
918
+ [LIVE]: LiveEventDetail;
919
+ [DVR]: DvrEventDetail;
920
+ [RETRY]: RetryEventDetail;
921
+ [RECOVER]: RecoverEventDetail;
928
922
  /* Excluded from this release type: audioonlysource */
929
923
  /* Excluded from this release type: renderplugin */
930
- [DVR]: DvrEventDetail;
931
- [LIVE_2]: LiveEventDetail;
932
924
  /* Excluded from this release type: "seek:queued" */
933
925
  /* Excluded from this release type: "seek:cancel" */
934
926
  /* Excluded from this release type: "plugin:registered" */
935
927
  /* Excluded from this release type: intersectionchange */
936
- /* Excluded from this release type: retry */
928
+ /* Excluded from this release type: beforeplay */
929
+ /* Excluded from this release type: beforepause */
930
+ /* Excluded from this release type: state */
931
+ /* Excluded from this release type: config */
932
+ /* Excluded from this release type: "error:fatal" */
937
933
  };
938
934
 
939
935
  declare type PlayerCustomEventsOverloads = {
@@ -972,11 +968,18 @@ declare type PlayerCustomEventsOverloads = {
972
968
  * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
973
969
  */
974
970
  on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
975
- /* Excluded from this release type: on */
971
+ /**
972
+ * Emitted when an Error recovery is attempted
973
+ */
974
+ on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
976
975
  /**
977
976
  * Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
978
977
  */
979
978
  on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
979
+ /**
980
+ * Emitted when a player will retry to reload
981
+ */
982
+ on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
980
983
  /* Excluded from this release type: on */
981
984
  /**
982
985
  * Emitted when the set of underlying qualities has changed.
@@ -996,8 +999,7 @@ declare type PlayerCustomEventsOverloads = {
996
999
  /**
997
1000
  * when src is a livestream
998
1001
  */
999
- on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1000
- /* Excluded from this release type: on */
1002
+ on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
1001
1003
  /* Excluded from this release type: on */
1002
1004
  /* Excluded from this release type: on */
1003
1005
  /* Excluded from this release type: on */
@@ -1026,11 +1028,26 @@ declare type PlayerCustomEventsOverloads = {
1026
1028
  */
1027
1029
  off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1028
1030
  /* Excluded from this release type: poll */
1029
- emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1030
1031
  /* Excluded from this release type: emit */
1031
- emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1032
+ /* Excluded from this release type: emit */
1033
+ emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1034
+ /* Excluded from this release type: emit */
1035
+ };
1036
+
1037
+ declare type PlayerEmittableCustomEventsDetailMap = {
1038
+ [ERROR]: ErrorEventDetail;
1039
+ [CONTEXT_MENU]: ContextMenuEventDetail;
1040
+ [VIEW_ENTER]: ViewEnterEventDetail;
1041
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
1042
+ [QUALITIES]: QualitiesEventDetail;
1043
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
1032
1044
  };
1033
1045
 
1046
+ declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
1047
+
1048
+ /**
1049
+ * @public
1050
+ */
1034
1051
  declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1035
1052
 
1036
1053
  declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
@@ -1224,9 +1241,23 @@ declare type RecommendationsReadyEventDetail = {
1224
1241
  playlist: RecommendationItem[];
1225
1242
  };
1226
1243
 
1227
- /* Excluded from this release type: RECOVER */
1244
+ /**
1245
+ * @public
1246
+ * emitted when an Error recovery is attempted
1247
+ */
1248
+ declare const /**
1249
+ @public
1250
+ * when a new player is inserted into the HTML
1251
+ */ /**
1252
+ * @public
1253
+ * emitted when an Error recovery is attempted
1254
+ */
1255
+ RECOVER = "recover";
1228
1256
 
1229
- /* Excluded from this release type: RecoverEventDetail */
1257
+ /**
1258
+ * @public
1259
+ */
1260
+ declare type RecoverEventDetail = null;
1230
1261
 
1231
1262
  /* Excluded from this release type: REMOTE_SESSION_ENDED */
1232
1263
 
@@ -1250,9 +1281,21 @@ declare const /**
1250
1281
  */
1251
1282
  RESIZE = "resize";
1252
1283
 
1253
- /* Excluded from this release type: RETRY */
1284
+ /**
1285
+ * @public
1286
+ */
1287
+ declare const /**
1288
+ @public
1289
+ * when a new player is inserted into the HTML
1290
+ */ /**
1291
+ * @public
1292
+ */
1293
+ RETRY = "retry";
1254
1294
 
1255
- /* Excluded from this release type: RetryEventDetail */
1295
+ /**
1296
+ * @public
1297
+ */
1298
+ declare type RetryEventDetail = null;
1256
1299
 
1257
1300
  declare const RTL = "is-rtl";
1258
1301
 
@@ -1387,7 +1430,7 @@ declare namespace states {
1387
1430
  RTL,
1388
1431
  TV,
1389
1432
  ENDED,
1390
- LIVE,
1433
+ LIVE_2 as LIVE,
1391
1434
  ERRORED,
1392
1435
  WAITING,
1393
1436
  AUTOPLAY,
@@ -344,6 +344,7 @@ declare type ErrorEventDetail = {
344
344
  declare namespace events {
345
345
  export {
346
346
  MOUNT,
347
+ RETRY,
347
348
  ERROR,
348
349
  CONTEXT_MENU,
349
350
  CLICK,
@@ -395,7 +396,8 @@ declare namespace events {
395
396
  LANDSCAPE,
396
397
  PORTRAIT,
397
398
  DVR,
398
- LIVE_2 as LIVE
399
+ LIVE,
400
+ RECOVER
399
401
  }
400
402
  }
401
403
 
@@ -594,8 +596,6 @@ declare const /**
594
596
  */
595
597
  LANDSCAPE = "landscape";
596
598
 
597
- declare const LIVE = "is-live";
598
-
599
599
  /**
600
600
  * @public
601
601
  * when src is a livestream
@@ -607,7 +607,9 @@ declare const /**
607
607
  * @public
608
608
  * when src is a livestream
609
609
  */
610
- LIVE_2 = "live";
610
+ LIVE = "live";
611
+
612
+ declare const LIVE_2 = "is-live";
611
613
 
612
614
  declare const LIVE_SEEKED = "is-live-seeked";
613
615
 
@@ -907,33 +909,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
907
909
 
908
910
  declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
909
911
 
910
- declare type PlayerCustomEventsDetailMap = {
911
- [MOUNT]: MountEventDetail;
912
- [ERROR]: ErrorEventDetail;
913
- [CONTEXT_MENU]: ContextMenuEventDetail;
914
- /* Excluded from this release type: beforeplay */
915
- /* Excluded from this release type: beforepause */
916
- /* Excluded from this release type: state */
912
+ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
913
+ [REAP]: ReapEventDetail;
914
+ [SOURCE]: SourceEventDetail;
917
915
  [CUEPOINT_START]: CuePointStartEventDetail;
918
916
  [CUEPOINT_END]: CuePointEndEventDetail;
919
- [VIEW_ENTER]: ViewEnterEventDetail;
920
- [VIEW_LEAVE]: ViewLeaveEventDetail;
921
- [SOURCE]: SourceEventDetail;
922
- /* Excluded from this release type: recover */
923
- [REAP]: ReapEventDetail;
924
- /* Excluded from this release type: config */
925
- [QUALITIES]: QualitiesEventDetail;
926
- /* Excluded from this release type: "error:fatal" */
927
- [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
917
+ [MOUNT]: MountEventDetail;
918
+ [LIVE]: LiveEventDetail;
919
+ [DVR]: DvrEventDetail;
920
+ [RETRY]: RetryEventDetail;
921
+ [RECOVER]: RecoverEventDetail;
928
922
  /* Excluded from this release type: audioonlysource */
929
923
  /* Excluded from this release type: renderplugin */
930
- [DVR]: DvrEventDetail;
931
- [LIVE_2]: LiveEventDetail;
932
924
  /* Excluded from this release type: "seek:queued" */
933
925
  /* Excluded from this release type: "seek:cancel" */
934
926
  /* Excluded from this release type: "plugin:registered" */
935
927
  /* Excluded from this release type: intersectionchange */
936
- /* Excluded from this release type: retry */
928
+ /* Excluded from this release type: beforeplay */
929
+ /* Excluded from this release type: beforepause */
930
+ /* Excluded from this release type: state */
931
+ /* Excluded from this release type: config */
932
+ /* Excluded from this release type: "error:fatal" */
937
933
  };
938
934
 
939
935
  declare type PlayerCustomEventsOverloads = {
@@ -972,11 +968,18 @@ declare type PlayerCustomEventsOverloads = {
972
968
  * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
973
969
  */
974
970
  on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
975
- /* Excluded from this release type: on */
971
+ /**
972
+ * Emitted when an Error recovery is attempted
973
+ */
974
+ on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
976
975
  /**
977
976
  * Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
978
977
  */
979
978
  on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
979
+ /**
980
+ * Emitted when a player will retry to reload
981
+ */
982
+ on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
980
983
  /* Excluded from this release type: on */
981
984
  /**
982
985
  * Emitted when the set of underlying qualities has changed.
@@ -996,8 +999,7 @@ declare type PlayerCustomEventsOverloads = {
996
999
  /**
997
1000
  * when src is a livestream
998
1001
  */
999
- on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1000
- /* Excluded from this release type: on */
1002
+ on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
1001
1003
  /* Excluded from this release type: on */
1002
1004
  /* Excluded from this release type: on */
1003
1005
  /* Excluded from this release type: on */
@@ -1026,11 +1028,26 @@ declare type PlayerCustomEventsOverloads = {
1026
1028
  */
1027
1029
  off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1028
1030
  /* Excluded from this release type: poll */
1029
- emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1030
1031
  /* Excluded from this release type: emit */
1031
- emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1032
+ /* Excluded from this release type: emit */
1033
+ emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1034
+ /* Excluded from this release type: emit */
1035
+ };
1036
+
1037
+ declare type PlayerEmittableCustomEventsDetailMap = {
1038
+ [ERROR]: ErrorEventDetail;
1039
+ [CONTEXT_MENU]: ContextMenuEventDetail;
1040
+ [VIEW_ENTER]: ViewEnterEventDetail;
1041
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
1042
+ [QUALITIES]: QualitiesEventDetail;
1043
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
1032
1044
  };
1033
1045
 
1046
+ declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
1047
+
1048
+ /**
1049
+ * @public
1050
+ */
1034
1051
  declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1035
1052
 
1036
1053
  declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
@@ -1224,9 +1241,23 @@ declare type RecommendationsReadyEventDetail = {
1224
1241
  playlist: RecommendationItem[];
1225
1242
  };
1226
1243
 
1227
- /* Excluded from this release type: RECOVER */
1244
+ /**
1245
+ * @public
1246
+ * emitted when an Error recovery is attempted
1247
+ */
1248
+ declare const /**
1249
+ @public
1250
+ * when a new player is inserted into the HTML
1251
+ */ /**
1252
+ * @public
1253
+ * emitted when an Error recovery is attempted
1254
+ */
1255
+ RECOVER = "recover";
1228
1256
 
1229
- /* Excluded from this release type: RecoverEventDetail */
1257
+ /**
1258
+ * @public
1259
+ */
1260
+ declare type RecoverEventDetail = null;
1230
1261
 
1231
1262
  /* Excluded from this release type: REMOTE_SESSION_ENDED */
1232
1263
 
@@ -1250,9 +1281,21 @@ declare const /**
1250
1281
  */
1251
1282
  RESIZE = "resize";
1252
1283
 
1253
- /* Excluded from this release type: RETRY */
1284
+ /**
1285
+ * @public
1286
+ */
1287
+ declare const /**
1288
+ @public
1289
+ * when a new player is inserted into the HTML
1290
+ */ /**
1291
+ * @public
1292
+ */
1293
+ RETRY = "retry";
1254
1294
 
1255
- /* Excluded from this release type: RetryEventDetail */
1295
+ /**
1296
+ * @public
1297
+ */
1298
+ declare type RetryEventDetail = null;
1256
1299
 
1257
1300
  declare const RTL = "is-rtl";
1258
1301
 
@@ -1387,7 +1430,7 @@ declare namespace states {
1387
1430
  RTL,
1388
1431
  TV,
1389
1432
  ENDED,
1390
- LIVE,
1433
+ LIVE_2 as LIVE,
1391
1434
  ERRORED,
1392
1435
  WAITING,
1393
1436
  AUTOPLAY,