@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
 
@@ -612,8 +614,6 @@ declare const /**
612
614
  */
613
615
  LANDSCAPE = "landscape";
614
616
 
615
- declare const LIVE = "is-live";
616
-
617
617
  /**
618
618
  * @public
619
619
  * when src is a livestream
@@ -625,7 +625,9 @@ declare const /**
625
625
  * @public
626
626
  * when src is a livestream
627
627
  */
628
- LIVE_2 = "live";
628
+ LIVE = "live";
629
+
630
+ declare const LIVE_2 = "is-live";
629
631
 
630
632
  declare const LIVE_SEEKED = "is-live-seeked";
631
633
 
@@ -925,33 +927,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
925
927
 
926
928
  declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
927
929
 
928
- declare type PlayerCustomEventsDetailMap = {
929
- [MOUNT]: MountEventDetail;
930
- [ERROR]: ErrorEventDetail;
931
- [CONTEXT_MENU]: ContextMenuEventDetail;
932
- /* Excluded from this release type: beforeplay */
933
- /* Excluded from this release type: beforepause */
934
- /* Excluded from this release type: state */
930
+ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
931
+ [REAP]: ReapEventDetail;
932
+ [SOURCE]: SourceEventDetail;
935
933
  [CUEPOINT_START]: CuePointStartEventDetail;
936
934
  [CUEPOINT_END]: CuePointEndEventDetail;
937
- [VIEW_ENTER]: ViewEnterEventDetail;
938
- [VIEW_LEAVE]: ViewLeaveEventDetail;
939
- [SOURCE]: SourceEventDetail;
940
- /* Excluded from this release type: recover */
941
- [REAP]: ReapEventDetail;
942
- /* Excluded from this release type: config */
943
- [QUALITIES]: QualitiesEventDetail;
944
- /* Excluded from this release type: "error:fatal" */
945
- [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
935
+ [MOUNT]: MountEventDetail;
936
+ [LIVE]: LiveEventDetail;
937
+ [DVR]: DvrEventDetail;
938
+ [RETRY]: RetryEventDetail;
939
+ [RECOVER]: RecoverEventDetail;
946
940
  /* Excluded from this release type: audioonlysource */
947
941
  /* Excluded from this release type: renderplugin */
948
- [DVR]: DvrEventDetail;
949
- [LIVE_2]: LiveEventDetail;
950
942
  /* Excluded from this release type: "seek:queued" */
951
943
  /* Excluded from this release type: "seek:cancel" */
952
944
  /* Excluded from this release type: "plugin:registered" */
953
945
  /* Excluded from this release type: intersectionchange */
954
- /* Excluded from this release type: retry */
946
+ /* Excluded from this release type: beforeplay */
947
+ /* Excluded from this release type: beforepause */
948
+ /* Excluded from this release type: state */
949
+ /* Excluded from this release type: config */
950
+ /* Excluded from this release type: "error:fatal" */
955
951
  };
956
952
 
957
953
  declare type PlayerCustomEventsOverloads = {
@@ -990,11 +986,18 @@ declare type PlayerCustomEventsOverloads = {
990
986
  * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
991
987
  */
992
988
  on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
993
- /* Excluded from this release type: on */
989
+ /**
990
+ * Emitted when an Error recovery is attempted
991
+ */
992
+ on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
994
993
  /**
995
994
  * 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.
996
995
  */
997
996
  on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
997
+ /**
998
+ * Emitted when a player will retry to reload
999
+ */
1000
+ on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
998
1001
  /* Excluded from this release type: on */
999
1002
  /**
1000
1003
  * Emitted when the set of underlying qualities has changed.
@@ -1014,8 +1017,7 @@ declare type PlayerCustomEventsOverloads = {
1014
1017
  /**
1015
1018
  * when src is a livestream
1016
1019
  */
1017
- on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1018
- /* Excluded from this release type: on */
1020
+ on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
1019
1021
  /* Excluded from this release type: on */
1020
1022
  /* Excluded from this release type: on */
1021
1023
  /* Excluded from this release type: on */
@@ -1044,11 +1046,26 @@ declare type PlayerCustomEventsOverloads = {
1044
1046
  */
1045
1047
  off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1046
1048
  /* Excluded from this release type: poll */
1047
- emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1048
1049
  /* Excluded from this release type: emit */
1049
- emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1050
+ /* Excluded from this release type: emit */
1051
+ emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1052
+ /* Excluded from this release type: emit */
1053
+ };
1054
+
1055
+ declare type PlayerEmittableCustomEventsDetailMap = {
1056
+ [ERROR]: ErrorEventDetail;
1057
+ [CONTEXT_MENU]: ContextMenuEventDetail;
1058
+ [VIEW_ENTER]: ViewEnterEventDetail;
1059
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
1060
+ [QUALITIES]: QualitiesEventDetail;
1061
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
1050
1062
  };
1051
1063
 
1064
+ declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
1065
+
1066
+ /**
1067
+ * @public
1068
+ */
1052
1069
  declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1053
1070
 
1054
1071
  declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
@@ -1242,9 +1259,23 @@ declare type RecommendationsReadyEventDetail = {
1242
1259
  playlist: RecommendationItem[];
1243
1260
  };
1244
1261
 
1245
- /* Excluded from this release type: RECOVER */
1262
+ /**
1263
+ * @public
1264
+ * emitted when an Error recovery is attempted
1265
+ */
1266
+ declare const /**
1267
+ @public
1268
+ * when a new player is inserted into the HTML
1269
+ */ /**
1270
+ * @public
1271
+ * emitted when an Error recovery is attempted
1272
+ */
1273
+ RECOVER = "recover";
1246
1274
 
1247
- /* Excluded from this release type: RecoverEventDetail */
1275
+ /**
1276
+ * @public
1277
+ */
1278
+ declare type RecoverEventDetail = null;
1248
1279
 
1249
1280
  /* Excluded from this release type: REMOTE_SESSION_ENDED */
1250
1281
 
@@ -1268,9 +1299,21 @@ declare const /**
1268
1299
  */
1269
1300
  RESIZE = "resize";
1270
1301
 
1271
- /* Excluded from this release type: RETRY */
1302
+ /**
1303
+ * @public
1304
+ */
1305
+ declare const /**
1306
+ @public
1307
+ * when a new player is inserted into the HTML
1308
+ */ /**
1309
+ * @public
1310
+ */
1311
+ RETRY = "retry";
1272
1312
 
1273
- /* Excluded from this release type: RetryEventDetail */
1313
+ /**
1314
+ * @public
1315
+ */
1316
+ declare type RetryEventDetail = null;
1274
1317
 
1275
1318
  declare const RTL = "is-rtl";
1276
1319
 
@@ -1405,7 +1448,7 @@ declare namespace states {
1405
1448
  RTL,
1406
1449
  TV,
1407
1450
  ENDED,
1408
- LIVE,
1451
+ LIVE_2 as LIVE,
1409
1452
  ERRORED,
1410
1453
  WAITING,
1411
1454
  AUTOPLAY,
package/plugins/ga4.d.ts CHANGED
@@ -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
 
@@ -600,8 +602,6 @@ declare const /**
600
602
  */
601
603
  LANDSCAPE = "landscape";
602
604
 
603
- declare const LIVE = "is-live";
604
-
605
605
  /**
606
606
  * @public
607
607
  * when src is a livestream
@@ -613,7 +613,9 @@ declare const /**
613
613
  * @public
614
614
  * when src is a livestream
615
615
  */
616
- LIVE_2 = "live";
616
+ LIVE = "live";
617
+
618
+ declare const LIVE_2 = "is-live";
617
619
 
618
620
  declare const LIVE_SEEKED = "is-live-seeked";
619
621
 
@@ -913,33 +915,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
913
915
 
914
916
  declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
915
917
 
916
- declare type PlayerCustomEventsDetailMap = {
917
- [MOUNT]: MountEventDetail;
918
- [ERROR]: ErrorEventDetail;
919
- [CONTEXT_MENU]: ContextMenuEventDetail;
920
- /* Excluded from this release type: beforeplay */
921
- /* Excluded from this release type: beforepause */
922
- /* Excluded from this release type: state */
918
+ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
919
+ [REAP]: ReapEventDetail;
920
+ [SOURCE]: SourceEventDetail;
923
921
  [CUEPOINT_START]: CuePointStartEventDetail;
924
922
  [CUEPOINT_END]: CuePointEndEventDetail;
925
- [VIEW_ENTER]: ViewEnterEventDetail;
926
- [VIEW_LEAVE]: ViewLeaveEventDetail;
927
- [SOURCE]: SourceEventDetail;
928
- /* Excluded from this release type: recover */
929
- [REAP]: ReapEventDetail;
930
- /* Excluded from this release type: config */
931
- [QUALITIES]: QualitiesEventDetail;
932
- /* Excluded from this release type: "error:fatal" */
933
- [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
923
+ [MOUNT]: MountEventDetail;
924
+ [LIVE]: LiveEventDetail;
925
+ [DVR]: DvrEventDetail;
926
+ [RETRY]: RetryEventDetail;
927
+ [RECOVER]: RecoverEventDetail;
934
928
  /* Excluded from this release type: audioonlysource */
935
929
  /* Excluded from this release type: renderplugin */
936
- [DVR]: DvrEventDetail;
937
- [LIVE_2]: LiveEventDetail;
938
930
  /* Excluded from this release type: "seek:queued" */
939
931
  /* Excluded from this release type: "seek:cancel" */
940
932
  /* Excluded from this release type: "plugin:registered" */
941
933
  /* Excluded from this release type: intersectionchange */
942
- /* Excluded from this release type: retry */
934
+ /* Excluded from this release type: beforeplay */
935
+ /* Excluded from this release type: beforepause */
936
+ /* Excluded from this release type: state */
937
+ /* Excluded from this release type: config */
938
+ /* Excluded from this release type: "error:fatal" */
943
939
  };
944
940
 
945
941
  declare type PlayerCustomEventsOverloads = {
@@ -978,11 +974,18 @@ declare type PlayerCustomEventsOverloads = {
978
974
  * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
979
975
  */
980
976
  on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
981
- /* Excluded from this release type: on */
977
+ /**
978
+ * Emitted when an Error recovery is attempted
979
+ */
980
+ on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
982
981
  /**
983
982
  * 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.
984
983
  */
985
984
  on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
985
+ /**
986
+ * Emitted when a player will retry to reload
987
+ */
988
+ on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
986
989
  /* Excluded from this release type: on */
987
990
  /**
988
991
  * Emitted when the set of underlying qualities has changed.
@@ -1002,8 +1005,7 @@ declare type PlayerCustomEventsOverloads = {
1002
1005
  /**
1003
1006
  * when src is a livestream
1004
1007
  */
1005
- on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1006
- /* Excluded from this release type: on */
1008
+ on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
1007
1009
  /* Excluded from this release type: on */
1008
1010
  /* Excluded from this release type: on */
1009
1011
  /* Excluded from this release type: on */
@@ -1032,11 +1034,26 @@ declare type PlayerCustomEventsOverloads = {
1032
1034
  */
1033
1035
  off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1034
1036
  /* Excluded from this release type: poll */
1035
- emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1036
1037
  /* Excluded from this release type: emit */
1037
- emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1038
+ /* Excluded from this release type: emit */
1039
+ emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1040
+ /* Excluded from this release type: emit */
1041
+ };
1042
+
1043
+ declare type PlayerEmittableCustomEventsDetailMap = {
1044
+ [ERROR]: ErrorEventDetail;
1045
+ [CONTEXT_MENU]: ContextMenuEventDetail;
1046
+ [VIEW_ENTER]: ViewEnterEventDetail;
1047
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
1048
+ [QUALITIES]: QualitiesEventDetail;
1049
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
1038
1050
  };
1039
1051
 
1052
+ declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
1053
+
1054
+ /**
1055
+ * @public
1056
+ */
1040
1057
  declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1041
1058
 
1042
1059
  declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
@@ -1230,9 +1247,23 @@ declare type RecommendationsReadyEventDetail = {
1230
1247
  playlist: RecommendationItem[];
1231
1248
  };
1232
1249
 
1233
- /* Excluded from this release type: RECOVER */
1250
+ /**
1251
+ * @public
1252
+ * emitted when an Error recovery is attempted
1253
+ */
1254
+ declare const /**
1255
+ @public
1256
+ * when a new player is inserted into the HTML
1257
+ */ /**
1258
+ * @public
1259
+ * emitted when an Error recovery is attempted
1260
+ */
1261
+ RECOVER = "recover";
1234
1262
 
1235
- /* Excluded from this release type: RecoverEventDetail */
1263
+ /**
1264
+ * @public
1265
+ */
1266
+ declare type RecoverEventDetail = null;
1236
1267
 
1237
1268
  /* Excluded from this release type: REMOTE_SESSION_ENDED */
1238
1269
 
@@ -1256,9 +1287,21 @@ declare const /**
1256
1287
  */
1257
1288
  RESIZE = "resize";
1258
1289
 
1259
- /* Excluded from this release type: RETRY */
1290
+ /**
1291
+ * @public
1292
+ */
1293
+ declare const /**
1294
+ @public
1295
+ * when a new player is inserted into the HTML
1296
+ */ /**
1297
+ * @public
1298
+ */
1299
+ RETRY = "retry";
1260
1300
 
1261
- /* Excluded from this release type: RetryEventDetail */
1301
+ /**
1302
+ * @public
1303
+ */
1304
+ declare type RetryEventDetail = null;
1262
1305
 
1263
1306
  declare const RTL = "is-rtl";
1264
1307
 
@@ -1393,7 +1436,7 @@ declare namespace states {
1393
1436
  RTL,
1394
1437
  TV,
1395
1438
  ENDED,
1396
- LIVE,
1439
+ LIVE_2 as LIVE,
1397
1440
  ERRORED,
1398
1441
  WAITING,
1399
1442
  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
 
@@ -625,8 +627,6 @@ declare const /**
625
627
  */
626
628
  LANDSCAPE = "landscape";
627
629
 
628
- declare const LIVE = "is-live";
629
-
630
630
  /**
631
631
  * @public
632
632
  * when src is a livestream
@@ -638,7 +638,9 @@ declare const /**
638
638
  * @public
639
639
  * when src is a livestream
640
640
  */
641
- LIVE_2 = "live";
641
+ LIVE = "live";
642
+
643
+ declare const LIVE_2 = "is-live";
642
644
 
643
645
  declare const LIVE_SEEKED = "is-live-seeked";
644
646
 
@@ -938,33 +940,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
938
940
 
939
941
  declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
940
942
 
941
- declare type PlayerCustomEventsDetailMap = {
942
- [MOUNT]: MountEventDetail;
943
- [ERROR]: ErrorEventDetail;
944
- [CONTEXT_MENU]: ContextMenuEventDetail;
945
- /* Excluded from this release type: beforeplay */
946
- /* Excluded from this release type: beforepause */
947
- /* Excluded from this release type: state */
943
+ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
944
+ [REAP]: ReapEventDetail;
945
+ [SOURCE]: SourceEventDetail;
948
946
  [CUEPOINT_START]: CuePointStartEventDetail;
949
947
  [CUEPOINT_END]: CuePointEndEventDetail;
950
- [VIEW_ENTER]: ViewEnterEventDetail;
951
- [VIEW_LEAVE]: ViewLeaveEventDetail;
952
- [SOURCE]: SourceEventDetail;
953
- /* Excluded from this release type: recover */
954
- [REAP]: ReapEventDetail;
955
- /* Excluded from this release type: config */
956
- [QUALITIES]: QualitiesEventDetail;
957
- /* Excluded from this release type: "error:fatal" */
958
- [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
948
+ [MOUNT]: MountEventDetail;
949
+ [LIVE]: LiveEventDetail;
950
+ [DVR]: DvrEventDetail;
951
+ [RETRY]: RetryEventDetail;
952
+ [RECOVER]: RecoverEventDetail;
959
953
  /* Excluded from this release type: audioonlysource */
960
954
  /* Excluded from this release type: renderplugin */
961
- [DVR]: DvrEventDetail;
962
- [LIVE_2]: LiveEventDetail;
963
955
  /* Excluded from this release type: "seek:queued" */
964
956
  /* Excluded from this release type: "seek:cancel" */
965
957
  /* Excluded from this release type: "plugin:registered" */
966
958
  /* Excluded from this release type: intersectionchange */
967
- /* Excluded from this release type: retry */
959
+ /* Excluded from this release type: beforeplay */
960
+ /* Excluded from this release type: beforepause */
961
+ /* Excluded from this release type: state */
962
+ /* Excluded from this release type: config */
963
+ /* Excluded from this release type: "error:fatal" */
968
964
  };
969
965
 
970
966
  declare type PlayerCustomEventsOverloads = {
@@ -1003,11 +999,18 @@ declare type PlayerCustomEventsOverloads = {
1003
999
  * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
1004
1000
  */
1005
1001
  on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
1006
- /* Excluded from this release type: on */
1002
+ /**
1003
+ * Emitted when an Error recovery is attempted
1004
+ */
1005
+ on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
1007
1006
  /**
1008
1007
  * 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.
1009
1008
  */
1010
1009
  on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
1010
+ /**
1011
+ * Emitted when a player will retry to reload
1012
+ */
1013
+ on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
1011
1014
  /* Excluded from this release type: on */
1012
1015
  /**
1013
1016
  * Emitted when the set of underlying qualities has changed.
@@ -1027,8 +1030,7 @@ declare type PlayerCustomEventsOverloads = {
1027
1030
  /**
1028
1031
  * when src is a livestream
1029
1032
  */
1030
- on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1031
- /* Excluded from this release type: on */
1033
+ on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
1032
1034
  /* Excluded from this release type: on */
1033
1035
  /* Excluded from this release type: on */
1034
1036
  /* Excluded from this release type: on */
@@ -1057,11 +1059,26 @@ declare type PlayerCustomEventsOverloads = {
1057
1059
  */
1058
1060
  off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1059
1061
  /* Excluded from this release type: poll */
1060
- emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1061
1062
  /* Excluded from this release type: emit */
1062
- emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1063
+ /* Excluded from this release type: emit */
1064
+ emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1065
+ /* Excluded from this release type: emit */
1066
+ };
1067
+
1068
+ declare type PlayerEmittableCustomEventsDetailMap = {
1069
+ [ERROR]: ErrorEventDetail;
1070
+ [CONTEXT_MENU]: ContextMenuEventDetail;
1071
+ [VIEW_ENTER]: ViewEnterEventDetail;
1072
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
1073
+ [QUALITIES]: QualitiesEventDetail;
1074
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
1063
1075
  };
1064
1076
 
1077
+ declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
1078
+
1079
+ /**
1080
+ * @public
1081
+ */
1065
1082
  declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1066
1083
 
1067
1084
  declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
@@ -1255,9 +1272,23 @@ declare type RecommendationsReadyEventDetail = {
1255
1272
  playlist: RecommendationItem[];
1256
1273
  };
1257
1274
 
1258
- /* Excluded from this release type: RECOVER */
1275
+ /**
1276
+ * @public
1277
+ * emitted when an Error recovery is attempted
1278
+ */
1279
+ declare const /**
1280
+ @public
1281
+ * when a new player is inserted into the HTML
1282
+ */ /**
1283
+ * @public
1284
+ * emitted when an Error recovery is attempted
1285
+ */
1286
+ RECOVER = "recover";
1259
1287
 
1260
- /* Excluded from this release type: RecoverEventDetail */
1288
+ /**
1289
+ * @public
1290
+ */
1291
+ declare type RecoverEventDetail = null;
1261
1292
 
1262
1293
  /* Excluded from this release type: REMOTE_SESSION_ENDED */
1263
1294
 
@@ -1281,9 +1312,21 @@ declare const /**
1281
1312
  */
1282
1313
  RESIZE = "resize";
1283
1314
 
1284
- /* Excluded from this release type: RETRY */
1315
+ /**
1316
+ * @public
1317
+ */
1318
+ declare const /**
1319
+ @public
1320
+ * when a new player is inserted into the HTML
1321
+ */ /**
1322
+ * @public
1323
+ */
1324
+ RETRY = "retry";
1285
1325
 
1286
- /* Excluded from this release type: RetryEventDetail */
1326
+ /**
1327
+ * @public
1328
+ */
1329
+ declare type RetryEventDetail = null;
1287
1330
 
1288
1331
  declare const RTL = "is-rtl";
1289
1332
 
@@ -1418,7 +1461,7 @@ declare namespace states {
1418
1461
  RTL,
1419
1462
  TV,
1420
1463
  ENDED,
1421
- LIVE,
1464
+ LIVE_2 as LIVE,
1422
1465
  ERRORED,
1423
1466
  WAITING,
1424
1467
  AUTOPLAY,