@flowplayer/player 3.32.1-rc → 3.32.1-rc.2

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 (56) hide show
  1. package/core.js +1 -1
  2. package/default.js +1 -1
  3. package/embed.js +2 -2
  4. package/index.d.ts +126 -1
  5. package/package.json +2 -2
  6. package/plugins/ads.d.ts +126 -1
  7. package/plugins/ads.js +2 -2
  8. package/plugins/airplay.d.ts +126 -1
  9. package/plugins/analytics.d.ts +126 -1
  10. package/plugins/analytics.js +1 -1
  11. package/plugins/asel.d.ts +126 -1
  12. package/plugins/asel.js +1 -1
  13. package/plugins/audio.d.ts +126 -1
  14. package/plugins/chapters.d.ts +126 -1
  15. package/plugins/chromecast.d.ts +126 -1
  16. package/plugins/comscore.d.ts +126 -1
  17. package/plugins/consent.d.ts +126 -1
  18. package/plugins/context-menu.d.ts +126 -1
  19. package/plugins/cuepoints.d.ts +126 -1
  20. package/plugins/dash.d.ts +126 -1
  21. package/plugins/drm.d.ts +126 -1
  22. package/plugins/endscreen.d.ts +126 -1
  23. package/plugins/fas.d.ts +126 -1
  24. package/plugins/float-on-scroll.d.ts +126 -1
  25. package/plugins/ga4.d.ts +126 -1
  26. package/plugins/gemius.d.ts +126 -1
  27. package/plugins/google-analytics.d.ts +126 -1
  28. package/plugins/hls.d.ts +126 -1
  29. package/plugins/id3.d.ts +126 -1
  30. package/plugins/iframe.d.ts +126 -1
  31. package/plugins/keyboard.d.ts +126 -1
  32. package/plugins/media-session.d.ts +126 -1
  33. package/plugins/message.d.ts +126 -1
  34. package/plugins/message.js +1 -1
  35. package/plugins/ovp.d.ts +126 -1
  36. package/plugins/playlist.d.ts +126 -1
  37. package/plugins/preview.d.ts +126 -1
  38. package/plugins/qsel.d.ts +126 -1
  39. package/plugins/qsel.js +1 -1
  40. package/plugins/qul.d.ts +126 -1
  41. package/plugins/rts.d.ts +126 -1
  42. package/plugins/rts.js +1 -1
  43. package/plugins/share.d.ts +126 -1
  44. package/plugins/share.js +1 -1
  45. package/plugins/speed.d.ts +126 -1
  46. package/plugins/speed.js +1 -1
  47. package/plugins/ssai.d.ts +126 -1
  48. package/plugins/ssai.js +1 -1
  49. package/plugins/subtitles.d.ts +126 -1
  50. package/plugins/subtitles.js +1 -1
  51. package/plugins/thumbnails.d.ts +126 -1
  52. package/plugins/tizen.d.ts +126 -1
  53. package/plugins/vtsel.d.ts +126 -1
  54. package/plugins/vtsel.js +1 -1
  55. package/plugins/webos.d.ts +126 -1
  56. package/util/loader.d.ts +126 -1
package/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { Get } from 'type-fest';
2
2
  import type { Level } from 'hls.js';
3
+ import type { Paths } from 'type-fest';
3
4
  import type { Representation } from 'dashjs';
5
+ import type { Translation } from '@flowplayer/translations';
4
6
  import type { TupleToUnion } from 'type-fest';
5
7
 
6
8
  /* Excluded from this release type: AnyLoader */
@@ -792,6 +794,13 @@ declare interface FlowplayerUMDBase {
792
794
  /* Excluded from this release type: support */
793
795
  /* Excluded from this release type: jwt */
794
796
  /* Excluded from this release type: loaders */
797
+ /**
798
+ * @public
799
+ * Translations dictionaries to be used with `@flowplayer/translations` package
800
+ *
801
+ * See [official documentation](https://developer.wowza.com/docs/wowza-flowplayer/player/translations/)
802
+ */
803
+ i18n: typeof I18n;
795
804
  }
796
805
 
797
806
  /**
@@ -869,6 +878,112 @@ declare type HasSrcExtensions<PluginBareConfigs extends unknown[]> = TupleToUnio
869
878
 
870
879
  declare const HOVERED = "is-hovered";
871
880
 
881
+ declare class I18n implements Plugin_2 {
882
+ static pluginName: string;
883
+ static en: {
884
+ ads: {
885
+ ad: string;
886
+ ads: string;
887
+ advertisement: string;
888
+ indicator: string;
889
+ adchoices: string;
890
+ };
891
+ audio: {
892
+ button_txt: string;
893
+ menu_title: string;
894
+ };
895
+ cc: {
896
+ button: string;
897
+ menu_title: string;
898
+ options: string;
899
+ tracks: string;
900
+ reset: string;
901
+ colors: {
902
+ Black: string;
903
+ Blue: string;
904
+ Cyan: string;
905
+ Green: string;
906
+ Magenta: string;
907
+ Red: string;
908
+ White: string;
909
+ Yellow: string;
910
+ };
911
+ edgeStyle: {
912
+ None: string;
913
+ "Drop shadow": string;
914
+ Raised: string;
915
+ Depressed: string;
916
+ Outline: string;
917
+ };
918
+ fontFamily: {
919
+ "Monospaced Serif": string;
920
+ "Proportional Serif": string;
921
+ "Monospaced Sans-Serif": string;
922
+ "Proportional Sans-Serif": string;
923
+ Casual: string;
924
+ Cursive: string;
925
+ };
926
+ properties: {
927
+ fontFamily: string;
928
+ fontSize: string;
929
+ fontColor: string;
930
+ fontOpacity: string;
931
+ backgroundColor: string;
932
+ backgroundOpacity: string;
933
+ characterEdgeStyle: string;
934
+ };
935
+ };
936
+ chromecast: {
937
+ start: string;
938
+ stop: string;
939
+ };
940
+ core: {
941
+ exit_fullscreen: string;
942
+ fullscreen: string;
943
+ mute: string;
944
+ muted: string;
945
+ pause: string;
946
+ play: string;
947
+ seconds: string;
948
+ timeline_aria_label: string;
949
+ unmute: string;
950
+ volume: string;
951
+ close: string;
952
+ "skip-next": string;
953
+ "skip-prev": string;
954
+ };
955
+ ovp: {
956
+ starting_in: string;
957
+ };
958
+ playlist: {
959
+ cancel: string;
960
+ up_next: string;
961
+ autoplay: string;
962
+ now_playing: string;
963
+ turn_off_autoplay: string;
964
+ playlist: string;
965
+ };
966
+ qsel: {
967
+ menu_title: string;
968
+ };
969
+ share: {
970
+ clipboard_failure: string;
971
+ clipboard_success: string;
972
+ embed: string;
973
+ link: string;
974
+ menu_title: string;
975
+ };
976
+ speed: {
977
+ menu_title: string;
978
+ };
979
+ vtsel: {
980
+ button_txt: string;
981
+ menu_title: string;
982
+ };
983
+ };
984
+ init(config: Config, _root: never, video: Player): void;
985
+ }
986
+
872
987
  declare const IN_VIEWPORT = "is-in-viewport";
873
988
 
874
989
  /* Excluded from this release type: INTERSECTIONCHANGE */
@@ -1264,7 +1379,8 @@ export declare type Player = HTMLVideoElement & PlayerEventOverloads & {
1264
1379
  /**
1265
1380
  * Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
1266
1381
  */
1267
- i18n(k: string, fallback?: string): string;
1382
+ i18n(k: TranslationKey): string;
1383
+ i18n(k: string, fallback: string): string;
1268
1384
  /* Excluded from this release type: deviceId */
1269
1385
  /* Excluded from this release type: live_state */
1270
1386
  /**
@@ -1999,6 +2115,15 @@ export declare type TouchMoveEventDetail = TouchEvent;
1999
2115
  */
2000
2116
  export declare type TouchStartEventDetail = TouchEvent;
2001
2117
 
2118
+ /**
2119
+ * @public
2120
+ * All possible full paths to each translation, i.e. "core.mute"| "core.play" | "ads.ad" etc.
2121
+ * This type is useful for developers using translation querying based on path, like in lodash's get()
2122
+ */
2123
+ export declare type TranslationKey = Paths<Translation, {
2124
+ leavesOnly: true;
2125
+ }>;
2126
+
2002
2127
  declare type TSampleRate = typeof SampleRate;
2003
2128
 
2004
2129
  declare const TV = "is-tv";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowplayer/player",
3
- "version": "3.32.1-rc",
3
+ "version": "3.32.1-rc.2",
4
4
  "description": "video player for the future",
5
5
  "keywords": [
6
6
  "flowplayer",
@@ -18,7 +18,7 @@
18
18
  "types": "index.d.ts",
19
19
  "dependencies": {
20
20
  "hls.js": "1.6.12",
21
- "type-fest": "^4.32.0",
21
+ "type-fest": "^5.1.0",
22
22
  "dashjs": "5.0.3"
23
23
  },
24
24
  "exports": {
package/plugins/ads.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { Get } from 'type-fest';
2
2
  import type { Level } from 'hls.js';
3
+ import type { Paths } from 'type-fest';
3
4
  import type { Representation } from 'dashjs';
5
+ import type { Translation } from '@flowplayer/translations';
4
6
  import type { TupleToUnion } from 'type-fest';
5
7
 
6
8
  declare const AD_ATTRIBUTION: number;
@@ -1410,6 +1412,13 @@ declare interface FlowplayerUMDBase {
1410
1412
  /* Excluded from this release type: support */
1411
1413
  /* Excluded from this release type: jwt */
1412
1414
  /* Excluded from this release type: loaders */
1415
+ /**
1416
+ * @public
1417
+ * Translations dictionaries to be used with `@flowplayer/translations` package
1418
+ *
1419
+ * See [official documentation](https://developer.wowza.com/docs/wowza-flowplayer/player/translations/)
1420
+ */
1421
+ i18n: typeof I18n;
1413
1422
  }
1414
1423
 
1415
1424
  /**
@@ -2789,6 +2798,112 @@ declare type HasSrcExtensions<PluginBareConfigs extends unknown[]> = TupleToUnio
2789
2798
 
2790
2799
  declare const HOVERED = "is-hovered";
2791
2800
 
2801
+ declare class I18n implements Plugin_2 {
2802
+ static pluginName: string;
2803
+ static en: {
2804
+ ads: {
2805
+ ad: string;
2806
+ ads: string;
2807
+ advertisement: string;
2808
+ indicator: string;
2809
+ adchoices: string;
2810
+ };
2811
+ audio: {
2812
+ button_txt: string;
2813
+ menu_title: string;
2814
+ };
2815
+ cc: {
2816
+ button: string;
2817
+ menu_title: string;
2818
+ options: string;
2819
+ tracks: string;
2820
+ reset: string;
2821
+ colors: {
2822
+ Black: string;
2823
+ Blue: string;
2824
+ Cyan: string;
2825
+ Green: string;
2826
+ Magenta: string;
2827
+ Red: string;
2828
+ White: string;
2829
+ Yellow: string;
2830
+ };
2831
+ edgeStyle: {
2832
+ None: string;
2833
+ "Drop shadow": string;
2834
+ Raised: string;
2835
+ Depressed: string;
2836
+ Outline: string;
2837
+ };
2838
+ fontFamily: {
2839
+ "Monospaced Serif": string;
2840
+ "Proportional Serif": string;
2841
+ "Monospaced Sans-Serif": string;
2842
+ "Proportional Sans-Serif": string;
2843
+ Casual: string;
2844
+ Cursive: string;
2845
+ };
2846
+ properties: {
2847
+ fontFamily: string;
2848
+ fontSize: string;
2849
+ fontColor: string;
2850
+ fontOpacity: string;
2851
+ backgroundColor: string;
2852
+ backgroundOpacity: string;
2853
+ characterEdgeStyle: string;
2854
+ };
2855
+ };
2856
+ chromecast: {
2857
+ start: string;
2858
+ stop: string;
2859
+ };
2860
+ core: {
2861
+ exit_fullscreen: string;
2862
+ fullscreen: string;
2863
+ mute: string;
2864
+ muted: string;
2865
+ pause: string;
2866
+ play: string;
2867
+ seconds: string;
2868
+ timeline_aria_label: string;
2869
+ unmute: string;
2870
+ volume: string;
2871
+ close: string;
2872
+ "skip-next": string;
2873
+ "skip-prev": string;
2874
+ };
2875
+ ovp: {
2876
+ starting_in: string;
2877
+ };
2878
+ playlist: {
2879
+ cancel: string;
2880
+ up_next: string;
2881
+ autoplay: string;
2882
+ now_playing: string;
2883
+ turn_off_autoplay: string;
2884
+ playlist: string;
2885
+ };
2886
+ qsel: {
2887
+ menu_title: string;
2888
+ };
2889
+ share: {
2890
+ clipboard_failure: string;
2891
+ clipboard_success: string;
2892
+ embed: string;
2893
+ link: string;
2894
+ menu_title: string;
2895
+ };
2896
+ speed: {
2897
+ menu_title: string;
2898
+ };
2899
+ vtsel: {
2900
+ button_txt: string;
2901
+ menu_title: string;
2902
+ };
2903
+ };
2904
+ init(config: Config, _root: never, video: Player): void;
2905
+ }
2906
+
2792
2907
  declare class IMA implements Adapter {
2793
2908
  readonly eventHandler: AdsController;
2794
2909
  readonly log: Logger;
@@ -3372,7 +3487,8 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
3372
3487
  /**
3373
3488
  * Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
3374
3489
  */
3375
- i18n(k: string, fallback?: string): string;
3490
+ i18n(k: TranslationKey): string;
3491
+ i18n(k: string, fallback: string): string;
3376
3492
  /* Excluded from this release type: deviceId */
3377
3493
  /* Excluded from this release type: live_state */
3378
3494
  /**
@@ -4223,6 +4339,15 @@ TOUCH_START = "touchstart";
4223
4339
 
4224
4340
  declare const TOUCHED = "is-touched";
4225
4341
 
4342
+ /**
4343
+ * @public
4344
+ * All possible full paths to each translation, i.e. "core.mute"| "core.play" | "ads.ad" etc.
4345
+ * This type is useful for developers using translation querying based on path, like in lodash's get()
4346
+ */
4347
+ declare type TranslationKey = Paths<Translation, {
4348
+ leavesOnly: true;
4349
+ }>;
4350
+
4226
4351
  declare type TSampleRate = typeof SampleRate;
4227
4352
 
4228
4353
  declare const TV = "is-tv";