@npo/player 1.9.0

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 (233) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/LICENSE +15 -0
  3. package/README.md +281 -0
  4. package/lib/js/ads/ster.d.ts +4 -0
  5. package/lib/js/ads/ster.js +159 -0
  6. package/lib/js/ads/ster.js.map +1 -0
  7. package/lib/js/ads/ster.test.d.ts +1 -0
  8. package/lib/js/ads/ster.test.js +91 -0
  9. package/lib/js/ads/ster.test.js.map +1 -0
  10. package/lib/js/api/getstreamobject.d.ts +3 -0
  11. package/lib/js/api/getstreamobject.js +19 -0
  12. package/lib/js/api/getstreamobject.js.map +1 -0
  13. package/lib/js/cdnproviders.d.ts +1 -0
  14. package/lib/js/cdnproviders.js +13 -0
  15. package/lib/js/cdnproviders.js.map +1 -0
  16. package/lib/js/checks/safari.d.ts +1 -0
  17. package/lib/js/checks/safari.js +10 -0
  18. package/lib/js/checks/safari.js.map +1 -0
  19. package/lib/js/checks/safari.test.d.ts +1 -0
  20. package/lib/js/checks/safari.test.js +21 -0
  21. package/lib/js/checks/safari.test.js.map +1 -0
  22. package/lib/js/drm/verifydrm.d.ts +4 -0
  23. package/lib/js/drm/verifydrm.js +38 -0
  24. package/lib/js/drm/verifydrm.js.map +1 -0
  25. package/lib/js/drm/verifydrm.test.d.ts +1 -0
  26. package/lib/js/drm/verifydrm.test.js +18 -0
  27. package/lib/js/drm/verifydrm.test.js.map +1 -0
  28. package/lib/js/fragments/setfragments.d.ts +3 -0
  29. package/lib/js/fragments/setfragments.js +68 -0
  30. package/lib/js/fragments/setfragments.js.map +1 -0
  31. package/lib/js/playeractions/customerrors.test.d.ts +1 -0
  32. package/lib/js/playeractions/customerrors.test.js +52 -0
  33. package/lib/js/playeractions/customerrors.test.js.map +1 -0
  34. package/lib/js/playeractions/handlers/customerrors.d.ts +50 -0
  35. package/lib/js/playeractions/handlers/customerrors.js +154 -0
  36. package/lib/js/playeractions/handlers/customerrors.js.map +1 -0
  37. package/lib/js/playeractions/handlers/error.d.ts +3 -0
  38. package/lib/js/playeractions/handlers/error.js +23 -0
  39. package/lib/js/playeractions/handlers/error.js.map +1 -0
  40. package/lib/js/playeractions/handlers/error.test.d.ts +1 -0
  41. package/lib/js/playeractions/handlers/error.test.js +45 -0
  42. package/lib/js/playeractions/handlers/error.test.js.map +1 -0
  43. package/lib/js/playeractions/handlers/handleoffsets.d.ts +6 -0
  44. package/lib/js/playeractions/handlers/handleoffsets.js +71 -0
  45. package/lib/js/playeractions/handlers/handleoffsets.js.map +1 -0
  46. package/lib/js/playeractions/handlers/handleoffsets.test.d.ts +1 -0
  47. package/lib/js/playeractions/handlers/handleoffsets.test.js +50 -0
  48. package/lib/js/playeractions/handlers/handleoffsets.test.js.map +1 -0
  49. package/lib/js/playeractions/handlers/resolvekeypress.d.ts +3 -0
  50. package/lib/js/playeractions/handlers/resolvekeypress.js +55 -0
  51. package/lib/js/playeractions/handlers/resolvekeypress.js.map +1 -0
  52. package/lib/js/playeractions/playeractions.d.ts +3 -0
  53. package/lib/js/playeractions/playeractions.js +4 -0
  54. package/lib/js/playeractions/playeractions.js.map +1 -0
  55. package/lib/js/tracking/handlers/eventbinding.d.ts +10 -0
  56. package/lib/js/tracking/handlers/eventbinding.js +86 -0
  57. package/lib/js/tracking/handlers/eventbinding.js.map +1 -0
  58. package/lib/js/tracking/handlers/eventlogging.d.ts +11 -0
  59. package/lib/js/tracking/handlers/eventlogging.js +42 -0
  60. package/lib/js/tracking/handlers/eventlogging.js.map +1 -0
  61. package/lib/js/tracking/handlers/playertrackerinit.d.ts +13 -0
  62. package/lib/js/tracking/handlers/playertrackerinit.js +29 -0
  63. package/lib/js/tracking/handlers/playertrackerinit.js.map +1 -0
  64. package/lib/js/tracking/handlers/playertrackerstart.d.ts +8 -0
  65. package/lib/js/tracking/handlers/playertrackerstart.js +29 -0
  66. package/lib/js/tracking/handlers/playertrackerstart.js.map +1 -0
  67. package/lib/js/tracking/playertracker.d.ts +4 -0
  68. package/lib/js/tracking/playertracker.js +10 -0
  69. package/lib/js/tracking/playertracker.js.map +1 -0
  70. package/lib/js/ui/components/adbutton.d.ts +7 -0
  71. package/lib/js/ui/components/adbutton.js +21 -0
  72. package/lib/js/ui/components/adbutton.js.map +1 -0
  73. package/lib/js/ui/components/adlabel.d.ts +7 -0
  74. package/lib/js/ui/components/adlabel.js +17 -0
  75. package/lib/js/ui/components/adlabel.js.map +1 -0
  76. package/lib/js/ui/components/buttons.d.ts +30 -0
  77. package/lib/js/ui/components/buttons.js +89 -0
  78. package/lib/js/ui/components/buttons.js.map +1 -0
  79. package/lib/js/ui/components/controlbar.d.ts +3 -0
  80. package/lib/js/ui/components/controlbar.js +47 -0
  81. package/lib/js/ui/components/controlbar.js.map +1 -0
  82. package/lib/js/ui/components/ctabar.d.ts +9 -0
  83. package/lib/js/ui/components/ctabar.js +41 -0
  84. package/lib/js/ui/components/ctabar.js.map +1 -0
  85. package/lib/js/ui/components/nativemobile/buttons.d.ts +13 -0
  86. package/lib/js/ui/components/nativemobile/buttons.js +43 -0
  87. package/lib/js/ui/components/nativemobile/buttons.js.map +1 -0
  88. package/lib/js/ui/components/nativemobile/controlbar.d.ts +2 -0
  89. package/lib/js/ui/components/nativemobile/controlbar.js +23 -0
  90. package/lib/js/ui/components/nativemobile/controlbar.js.map +1 -0
  91. package/lib/js/ui/components/nativemobile/ctabar.d.ts +10 -0
  92. package/lib/js/ui/components/nativemobile/ctabar.js +12 -0
  93. package/lib/js/ui/components/nativemobile/ctabar.js.map +1 -0
  94. package/lib/js/ui/components/nativemobile/playnext.d.ts +10 -0
  95. package/lib/js/ui/components/nativemobile/playnext.js +16 -0
  96. package/lib/js/ui/components/nativemobile/playnext.js.map +1 -0
  97. package/lib/js/ui/components/nativemobile/topbar.d.ts +3 -0
  98. package/lib/js/ui/components/nativemobile/topbar.js +21 -0
  99. package/lib/js/ui/components/nativemobile/topbar.js.map +1 -0
  100. package/lib/js/ui/components/playnext.d.ts +11 -0
  101. package/lib/js/ui/components/playnext.js +11 -0
  102. package/lib/js/ui/components/playnext.js.map +1 -0
  103. package/lib/js/ui/components/settingspanel.d.ts +4 -0
  104. package/lib/js/ui/components/settingspanel.js +130 -0
  105. package/lib/js/ui/components/settingspanel.js.map +1 -0
  106. package/lib/js/ui/components/shared/playnextscreen.d.ts +2 -0
  107. package/lib/js/ui/components/shared/playnextscreen.js +18 -0
  108. package/lib/js/ui/components/shared/playnextscreen.js.map +1 -0
  109. package/lib/js/ui/components/titlebar.d.ts +3 -0
  110. package/lib/js/ui/components/titlebar.js +9 -0
  111. package/lib/js/ui/components/titlebar.js.map +1 -0
  112. package/lib/js/ui/components/topbar.d.ts +2 -0
  113. package/lib/js/ui/components/topbar.js +19 -0
  114. package/lib/js/ui/components/topbar.js.map +1 -0
  115. package/lib/js/ui/handlers/listboxhandlers.d.ts +5 -0
  116. package/lib/js/ui/handlers/listboxhandlers.js +41 -0
  117. package/lib/js/ui/handlers/listboxhandlers.js.map +1 -0
  118. package/lib/js/ui/handlers/nicamhandler.d.ts +2 -0
  119. package/lib/js/ui/handlers/nicamhandler.js +32 -0
  120. package/lib/js/ui/handlers/nicamhandler.js.map +1 -0
  121. package/lib/js/ui/handlers/nicamhandler.test.d.ts +1 -0
  122. package/lib/js/ui/handlers/nicamhandler.test.js +34 -0
  123. package/lib/js/ui/handlers/nicamhandler.test.js.map +1 -0
  124. package/lib/js/ui/handlers/playnexthandlers.d.ts +0 -0
  125. package/lib/js/ui/handlers/playnexthandlers.js +2 -0
  126. package/lib/js/ui/handlers/playnexthandlers.js.map +1 -0
  127. package/lib/js/ui/handlers/timecontrolhandlers.d.ts +3 -0
  128. package/lib/js/ui/handlers/timecontrolhandlers.js +23 -0
  129. package/lib/js/ui/handlers/timecontrolhandlers.js.map +1 -0
  130. package/lib/js/ui/nativemobileui.d.ts +6 -0
  131. package/lib/js/ui/nativemobileui.js +49 -0
  132. package/lib/js/ui/nativemobileui.js.map +1 -0
  133. package/lib/js/ui/uicontainer.d.ts +3 -0
  134. package/lib/js/ui/uicontainer.js +61 -0
  135. package/lib/js/ui/uicontainer.js.map +1 -0
  136. package/lib/js/utilities/localizationconfig.d.ts +6 -0
  137. package/lib/js/utilities/localizationconfig.js +8 -0
  138. package/lib/js/utilities/localizationconfig.js.map +1 -0
  139. package/lib/js/utilities/printversion.d.ts +1 -0
  140. package/lib/js/utilities/printversion.js +28 -0
  141. package/lib/js/utilities/printversion.js.map +1 -0
  142. package/lib/js/utilities/utilities.d.ts +60 -0
  143. package/lib/js/utilities/utilities.js +110 -0
  144. package/lib/js/utilities/utilities.js.map +1 -0
  145. package/lib/lang/nl.json +72 -0
  146. package/lib/npoplayer.d.ts +45 -0
  147. package/lib/npoplayer.js +518 -0
  148. package/lib/npoplayer.js.map +1 -0
  149. package/lib/npoplayer.test.d.ts +1 -0
  150. package/lib/npoplayer.test.js +12 -0
  151. package/lib/npoplayer.test.js.map +1 -0
  152. package/lib/package.json +88 -0
  153. package/lib/src/js/ads/ster.d.ts +4 -0
  154. package/lib/src/js/ads/ster.test.d.ts +1 -0
  155. package/lib/src/js/api/getstreamobject.d.ts +3 -0
  156. package/lib/src/js/cdnproviders.d.ts +1 -0
  157. package/lib/src/js/checks/safari.d.ts +1 -0
  158. package/lib/src/js/checks/safari.test.d.ts +1 -0
  159. package/lib/src/js/drm/verifydrm.d.ts +4 -0
  160. package/lib/src/js/drm/verifydrm.test.d.ts +1 -0
  161. package/lib/src/js/fragments/setfragments.d.ts +3 -0
  162. package/lib/src/js/playeractions/customerrors.test.d.ts +1 -0
  163. package/lib/src/js/playeractions/handlers/customerrors.d.ts +50 -0
  164. package/lib/src/js/playeractions/handlers/error.d.ts +3 -0
  165. package/lib/src/js/playeractions/handlers/error.test.d.ts +1 -0
  166. package/lib/src/js/playeractions/handlers/handleoffsets.d.ts +6 -0
  167. package/lib/src/js/playeractions/handlers/handleoffsets.test.d.ts +1 -0
  168. package/lib/src/js/playeractions/handlers/resolvekeypress.d.ts +3 -0
  169. package/lib/src/js/playeractions/playeractions.d.ts +3 -0
  170. package/lib/src/js/tracking/handlers/eventbinding.d.ts +10 -0
  171. package/lib/src/js/tracking/handlers/eventlogging.d.ts +11 -0
  172. package/lib/src/js/tracking/handlers/playertrackerinit.d.ts +13 -0
  173. package/lib/src/js/tracking/handlers/playertrackerstart.d.ts +8 -0
  174. package/lib/src/js/tracking/playertracker.d.ts +4 -0
  175. package/lib/src/js/ui/components/adbutton.d.ts +7 -0
  176. package/lib/src/js/ui/components/adlabel.d.ts +7 -0
  177. package/lib/src/js/ui/components/buttons.d.ts +30 -0
  178. package/lib/src/js/ui/components/controlbar.d.ts +3 -0
  179. package/lib/src/js/ui/components/ctabar.d.ts +9 -0
  180. package/lib/src/js/ui/components/nativemobile/buttons.d.ts +13 -0
  181. package/lib/src/js/ui/components/nativemobile/controlbar.d.ts +2 -0
  182. package/lib/src/js/ui/components/nativemobile/ctabar.d.ts +10 -0
  183. package/lib/src/js/ui/components/nativemobile/playnext.d.ts +10 -0
  184. package/lib/src/js/ui/components/nativemobile/topbar.d.ts +3 -0
  185. package/lib/src/js/ui/components/playnext.d.ts +11 -0
  186. package/lib/src/js/ui/components/settingspanel.d.ts +4 -0
  187. package/lib/src/js/ui/components/shared/playnextscreen.d.ts +2 -0
  188. package/lib/src/js/ui/components/titlebar.d.ts +3 -0
  189. package/lib/src/js/ui/components/topbar.d.ts +2 -0
  190. package/lib/src/js/ui/handlers/listboxhandlers.d.ts +5 -0
  191. package/lib/src/js/ui/handlers/nicamhandler.d.ts +2 -0
  192. package/lib/src/js/ui/handlers/nicamhandler.test.d.ts +1 -0
  193. package/lib/src/js/ui/handlers/playnexthandlers.d.ts +0 -0
  194. package/lib/src/js/ui/handlers/timecontrolhandlers.d.ts +3 -0
  195. package/lib/src/js/ui/nativemobileui.d.ts +6 -0
  196. package/lib/src/js/ui/uicontainer.d.ts +3 -0
  197. package/lib/src/js/utilities/localizationconfig.d.ts +6 -0
  198. package/lib/src/js/utilities/printversion.d.ts +1 -0
  199. package/lib/src/js/utilities/utilities.d.ts +60 -0
  200. package/lib/src/npoplayer.d.ts +45 -0
  201. package/lib/src/npoplayer.test.d.ts +1 -0
  202. package/lib/src/types/classes.d.ts +4 -0
  203. package/lib/src/types/interfaces.d.ts +105 -0
  204. package/lib/types/classes.d.ts +4 -0
  205. package/lib/types/classes.js +4 -0
  206. package/lib/types/classes.js.map +1 -0
  207. package/lib/types/interfaces.d.ts +105 -0
  208. package/lib/types/interfaces.js +6 -0
  209. package/lib/types/interfaces.js.map +1 -0
  210. package/package.json +88 -0
  211. package/src/scss/components/_advert.scss +74 -0
  212. package/src/scss/components/_buffering.scss +6 -0
  213. package/src/scss/components/_container.scss +8 -0
  214. package/src/scss/components/_controlbars.scss +36 -0
  215. package/src/scss/components/_error.scss +26 -0
  216. package/src/scss/components/_fonts.scss +19 -0
  217. package/src/scss/components/_icons.scss +241 -0
  218. package/src/scss/components/_nicam.scss +61 -0
  219. package/src/scss/components/_playnext.scss +52 -0
  220. package/src/scss/components/_seekbar.scss +116 -0
  221. package/src/scss/components/_settingspanel.scss +196 -0
  222. package/src/scss/components/_subtitles.scss +32 -0
  223. package/src/scss/components/_textbuttons.scss +42 -0
  224. package/src/scss/components/_volumeslider.scss +23 -0
  225. package/src/scss/npoplayer.css +1238 -0
  226. package/src/scss/npoplayer.scss +37 -0
  227. package/src/scss/variants/_player-base.scss +64 -0
  228. package/src/scss/variants/_player-large.scss +56 -0
  229. package/src/scss/variants/_player-medium.scss +57 -0
  230. package/src/scss/variants/_player-small.scss +234 -0
  231. package/src/scss/vars/_colors.scss +24 -0
  232. package/src/scss/vars/_fonts.scss +20 -0
  233. package/src/scss/vars/_icons.scss +37 -0
@@ -0,0 +1,105 @@
1
+ import { type SourceConfig } from 'bitmovin-player';
2
+ import { type ErrorMessageOverlay, type Label, ControlBar, SettingsPanelItem, Button, SeekBar } from 'bitmovin-player-ui';
3
+ import { type NPOTag, type PageTracker } from '@npotag/tag';
4
+ import { ButtonConfig } from 'bitmovin-player-ui/dist/js/framework/components/button';
5
+ export interface Profile {
6
+ tech: string;
7
+ drm: string;
8
+ }
9
+ export interface StreamObject {
10
+ stream: StreamObject_Stream;
11
+ metadata: StreamObject_Metadata;
12
+ assets: StreamObject_Assets;
13
+ }
14
+ export interface ApiPayload {
15
+ baseURL: string;
16
+ jwt: string;
17
+ data: Record<string, unknown>;
18
+ }
19
+ export interface NPOTagObject {
20
+ npoTagInstance: NPOTag | undefined;
21
+ heartbeatInterval: number | undefined;
22
+ pageTracker: PageTracker | null;
23
+ }
24
+ interface StreamObject_Stream {
25
+ drmToken?: string;
26
+ drmType: string;
27
+ streamProfile: string;
28
+ streamURL: string;
29
+ isLiveStream?: boolean;
30
+ }
31
+ interface Subtitle {
32
+ iso: string;
33
+ location: string;
34
+ name: string;
35
+ }
36
+ interface StreamObject_Assets {
37
+ scrubbingThumbnail: string;
38
+ subtitles: Subtitle[] | null;
39
+ preroll?: string;
40
+ }
41
+ interface StreamObject_Metadata {
42
+ broadcaster?: string;
43
+ broadcasters?: string[];
44
+ country?: string[];
45
+ credits?: string[];
46
+ description: string;
47
+ duration?: string;
48
+ genre?: string[];
49
+ isDubbed?: boolean;
50
+ language?: string[];
51
+ nicam?: string[] | null;
52
+ poster?: string;
53
+ prid?: string;
54
+ sourceIP?: string;
55
+ ageRating?: string;
56
+ title: string;
57
+ hasPreroll?: string;
58
+ }
59
+ export interface Section {
60
+ cssClasses?: string[];
61
+ start: number;
62
+ end: number;
63
+ title: string;
64
+ }
65
+ export interface Fragments {
66
+ sections: Section[];
67
+ startAtBeginOfFragment?: boolean;
68
+ startAtFragment?: number;
69
+ stopAtEndOfFragment?: boolean;
70
+ }
71
+ export interface StreamOptions {
72
+ sourceConfig?: SourceConfig;
73
+ fragments?: Fragments;
74
+ startOffset?: number;
75
+ liveOffset?: boolean;
76
+ liveProgramTime?: number;
77
+ endpoint?: string;
78
+ preferredDRM?: string;
79
+ prid?: string;
80
+ }
81
+ export interface UIComponents {
82
+ errorMessageOverlay?: ErrorMessageOverlay;
83
+ nicam?: Label<{
84
+ text: string;
85
+ cssClass: string;
86
+ }>;
87
+ subtitlesButton?: SettingsPanelItem | undefined;
88
+ qualityButton?: SettingsPanelItem | undefined;
89
+ watchFromStartButton?: Button<ButtonConfig> | undefined;
90
+ controlbar?: ControlBar | undefined;
91
+ adbutton?: Button<ButtonConfig> | undefined;
92
+ adlabel?: Label<{
93
+ text: string;
94
+ cssClass: string;
95
+ }> | undefined;
96
+ seekBar?: SeekBar | undefined;
97
+ }
98
+ export interface CustomMessageHandlerResult {
99
+ defaultActionRequired?: boolean;
100
+ }
101
+ export declare enum CustomMessages {
102
+ TOGGLE_SETTINGS_PANEL = "toggleSettingsPanel",
103
+ DO_PLAY_NEXT = "doPlayNext"
104
+ }
105
+ export {};
@@ -0,0 +1,6 @@
1
+ export var CustomMessages;
2
+ (function (CustomMessages) {
3
+ CustomMessages["TOGGLE_SETTINGS_PANEL"] = "toggleSettingsPanel";
4
+ CustomMessages["DO_PLAY_NEXT"] = "doPlayNext";
5
+ })(CustomMessages || (CustomMessages = {}));
6
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/types/interfaces.ts"],"names":[],"mappings":"AAuHA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+DAA6C,CAAA;IAC7C,6CAA2B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB"}
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@npo/player",
3
+ "version": "1.9.0",
4
+ "description": "NPO Player",
5
+ "author": "Publieke Omroep <player@npo.nl>",
6
+ "contributors": [
7
+ "Tim Haerkens",
8
+ "Sven van der Leest",
9
+ "Arjan Kruithof"
10
+ ],
11
+ "engines": {
12
+ "node": "^18.16.0"
13
+ },
14
+ "license": "ISC",
15
+ "main": "npoplayer",
16
+ "types": "npoplayer.d.ts",
17
+ "scripts": {
18
+ "build": "webpack --hot",
19
+ "build:scss": "npm run build:web-styles && npm run build:web-styles && npm run build:mobile-styles-min && npm run build:mobile-styles && cp src/scss/*.css dist",
20
+ "build:web-styles": "sass --no-source-map src/scss/npoplayer.scss src/scss/npoplayer.css",
21
+ "build:web-styles-min": "sass --no-source-map --style=compressed src/scss/npoplayer.scss src/scss/npoplayer.min.css",
22
+ "build:mobile-styles": "node-sass --no-source-map src/scss/npoplayer-mobile.scss src/scss/npoplayer-mobile.css",
23
+ "build:mobile-styles-min": "sass --no-source-map --style=compressed src/scss/npoplayer-mobile.scss src/scss/npoplayer-mobile.min.css",
24
+ "lint": "eslint src --fix",
25
+ "bundle": "npm run lint && ts-node build.ts && webpack && npm run build:scss",
26
+ "build:ts": "ts-node build.ts",
27
+ "test": "jest",
28
+ "test:ci": "node_modules/.bin/jest",
29
+ "version:dev": "npm version prerelease --preid=dev --no-git-tag-version"
30
+ },
31
+ "files": [
32
+ "LICENSE",
33
+ "README.md",
34
+ "CHANGELOG.md",
35
+ "lib",
36
+ "src/scss/components",
37
+ "src/scss/variants",
38
+ "src/scss/vars",
39
+ "src/scss/npoplayer.scss",
40
+ "src/scss/npoplayer.css"
41
+ ],
42
+ "devDependencies": {
43
+ "@babel/core": "^7.20.12",
44
+ "@babel/preset-env": "^7.20.2",
45
+ "@babel/preset-typescript": "^7.18.6",
46
+ "@types/fs-extra": "^11.0.1",
47
+ "@types/jest": "^29.4.0",
48
+ "@typescript-eslint/eslint-plugin": "^5.58.0",
49
+ "@typescript-eslint/parser": "^5.58.0",
50
+ "babel-jest": "^28.1.3",
51
+ "babel-loader": "^8.3.0",
52
+ "css-loader": "^6.7.3",
53
+ "eslint": "^8.38.0",
54
+ "eslint-config-standard-with-typescript": "^34.0.1",
55
+ "eslint-plugin-import": "^2.27.5",
56
+ "eslint-plugin-n": "^15.7.0",
57
+ "eslint-plugin-promise": "^6.1.1",
58
+ "eslint-plugin-sonarjs": "^0.19.0",
59
+ "fs-extra": "^11.1.1",
60
+ "jest": "^28.1.3",
61
+ "jest-environment-jsdom": "^29.4.1",
62
+ "jest-sonar-reporter": "2.0.0",
63
+ "jest-transform-css": "^6.0.1",
64
+ "mini-css-extract-plugin": "^2.7.2",
65
+ "node-fetch": "^3.3.0",
66
+ "node-sass": "^7.0.3",
67
+ "sass": "^1.58.0",
68
+ "sass-loader": "^12.6.0",
69
+ "style-loader": "^3.3.1",
70
+ "ts-jest": "^28.0.8",
71
+ "ts-loader": "^9.4.2",
72
+ "ts-node": "^10.9.1",
73
+ "typescript": "^4.9.5",
74
+ "webpack": "^5.75.0",
75
+ "webpack-cli": "^4.10.0",
76
+ "webpack-dev-server": "^4.11.1"
77
+ },
78
+ "dependencies": {
79
+ "@npotag/tag": "^2.0.0",
80
+ "bitmovin-player": "^8.125.0",
81
+ "bitmovin-player-ui": "^3.48.0"
82
+ },
83
+ "keywords": [
84
+ "video",
85
+ "player",
86
+ "stream"
87
+ ]
88
+ }
@@ -0,0 +1,74 @@
1
+ &.bmpui-ster-ad{
2
+ .bmpui-seekbar-playbackposition-marker{
3
+ display: none !important;
4
+ }
5
+ .bmpui-ui-controlbar{
6
+ &.bmpui-controlbar-middle{
7
+ display: none !important;
8
+ }
9
+ .bmpui-ui-rewindbutton,
10
+ .bmpui-ui-forwardbutton,
11
+ .bmpui-ui-settingstogglebutton{
12
+ display: none !important;
13
+ }
14
+ .bmpui-controlbar-bottom{
15
+ display: block !important;
16
+ }
17
+ }
18
+ .bmpui-ui-seekbar {
19
+ .bmpui-seekbar {
20
+ .bmpui-seekbar-bufferlevel {
21
+ background-color: var(--npo-player-white);
22
+ opacity: 0.6;
23
+ }
24
+
25
+ .bmpui-seekbar-backdrop {
26
+ background-color: var(--npo-player-white);
27
+ opacity: 0.3;
28
+ }
29
+
30
+ .bmpui-seekbar-playbackposition {
31
+ background: var(--npo-player-white);
32
+ backdrop-filter: blur(50px);
33
+ border-radius: 5px;
34
+ }
35
+ }
36
+ }
37
+ .bmpui-ui-hugeplaybacktogglebutton{
38
+ display: none !important;
39
+ }
40
+ .videoAdUiClickElement{
41
+ display: none;
42
+ }
43
+ .bmpui-adLabel{
44
+ position: relative;
45
+ padding-right: 15px;
46
+ font-family: var(--fontBold);
47
+ &::before{
48
+ content: "";
49
+ pointer-events: none;
50
+ position: absolute;
51
+ height: 44px;
52
+ width: 59px;
53
+ bottom: -12px;
54
+ left: -65px;
55
+ background-image: url("data:image/svg+xml,%3Csvg width='59' height='44' viewBox='0 0 39 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 15.0338L19.4156 0.414307L38.8238 15.0338L19.4156 29.5855L0 15.0338ZM19.4223 27.5128L36.0603 15.0303L19.4223 2.48968L2.76764 15.0301L19.4223 27.5128Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.2215 13.9887C12.4213 13.3085 11.7303 12.721 11.7303 11.9329C11.7303 11.2697 12.064 10.8895 12.6461 10.8895C12.8494 10.8895 13.5139 10.9733 13.6141 12.0211L15.2164 11.8445C15.0406 10.3315 14.1464 9.42878 12.8164 9.42878C11.1077 9.42878 10.1279 10.3468 10.1279 11.9472C10.1279 13.5345 11.202 14.4297 12.1495 15.2195C12.9488 15.8859 13.704 16.5152 13.704 17.4532C13.704 18.0625 13.3087 18.4261 12.6463 18.4261C12.0333 18.4261 11.6413 17.8635 11.5647 16.8842C11.4962 16.894 10.0231 17.1058 9.96039 17.1152C10.0361 18.5001 10.8656 19.8866 12.5614 19.8866C14.2547 19.8866 15.3066 18.8944 15.3066 17.297C15.3062 15.7618 14.1987 14.8196 13.2215 13.9887ZM15.7374 13.4513V12.1456H16.6171V10.0881H18.2065V12.1456H19.2708V13.4513H18.2067V17.8506C18.2067 18.2478 18.377 18.4748 18.746 18.4748H19.271V19.837C19.0583 19.8936 18.8736 19.922 18.4762 19.922C17.2843 19.922 16.6173 19.3688 16.6173 18.2048V13.4513H15.7374ZM26.2467 19.7803V12.1458H27.7649V13.0398H27.7933C28.1768 12.3871 28.8435 12.0041 29.5958 12.0041H29.922V13.6642C29.6383 13.5932 29.3688 13.5081 28.9002 13.5081C28.3611 13.5081 27.8358 13.8485 27.8358 14.5297V19.7803H26.2467ZM23.4859 17.5288C23.4599 18.3273 23.1512 18.6659 22.6083 18.6659C22.0409 18.6659 21.7284 18.2968 21.7284 17.4167V16.3098H25.0775V14.8908C25.0775 13.2164 24.4249 12.0528 22.6085 12.0528C20.7921 12.0528 20.1395 13.2164 20.1395 14.8908V17.133C20.1395 18.8073 20.7921 19.9714 22.6085 19.9714C24.2771 19.9714 24.9661 18.9917 25.0655 17.5288H23.4859ZM21.7284 14.6073C21.7284 13.7275 22.0409 13.3583 22.6083 13.3583C23.1761 13.3583 23.4882 13.7275 23.4882 14.6073V15.0049H21.7284V14.6073Z' fill='white'/%3E%3C/svg%3E%0A");
56
+ }
57
+ }
58
+ .bmpui-controlbar-textbuttons{
59
+ padding: 0px 40px 17% 0px !important;
60
+ .bmpui-ui-textbutton.ui-sterbutton{
61
+ padding: 14px 10px !important;
62
+ border: none !important;
63
+ border-radius: 6px !important;
64
+ height: fit-content !important;
65
+ width: fit-content !important;
66
+ .bmpui-label{
67
+ font-family: var(--fontNormal) !important;
68
+ font-size: 12px;
69
+ line-height: 0;
70
+ text-align: left;
71
+ }
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,6 @@
1
+ .bmpui-ui-buffering-overlay {
2
+ background-color: var(--npo-player-bufferingcolor);
3
+ }
4
+ .bmpui-ui-buffering-overlay-indicator {
5
+ background-image: url($buffering_indicator) !important;
6
+ }
@@ -0,0 +1,8 @@
1
+ .bitmovinplayer-container {
2
+ font-style: normal !important;
3
+ overflow: visible;
4
+
5
+ ::selection {
6
+ background-color: var(--npo-player-primarycolor);
7
+ }
8
+ }
@@ -0,0 +1,36 @@
1
+ .bmpui-ui-controlbar {
2
+ background: var(--npo-player-bottomcolor);
3
+ }
4
+
5
+ .bmpui-controlbar-title {
6
+ top: 0;
7
+ bottom: auto;
8
+ }
9
+
10
+ .bmpui-controlbar-middle {
11
+ height: 100%;
12
+ display: flex;
13
+
14
+ .bmpui-container-wrapper {
15
+ display: flex;
16
+ flex-direction: row;
17
+ justify-content: space-evenly; //instead of space-between
18
+ align-items: center;
19
+ padding: 0px;
20
+ // gap: 67px;
21
+ width: 100%; //Fix for gap pushing buttons out of screen
22
+ margin: 0 auto;
23
+ }
24
+
25
+ button {
26
+ // height: 44px;
27
+ // width: 44px;
28
+ font-size: 2em;
29
+ }
30
+ }
31
+
32
+ .bmpui-controlbar-bottom {
33
+ button {
34
+ display: block;
35
+ }
36
+ }
@@ -0,0 +1,26 @@
1
+ .bmpui-ui-errormessage-overlay {
2
+ .bmpui-ui-tvnoisecanvas{
3
+ display: none;
4
+ }
5
+ &::before{
6
+ content: "";
7
+ background-color: var(--npo-player-secondarycolor);
8
+ opacity: 0.7;
9
+ width: 100%;
10
+ height: 100%;
11
+ top: 0;
12
+ left: 0;
13
+ bottom: 0;
14
+ right: 0;
15
+ position: absolute;
16
+ }
17
+ }
18
+ .bmpui-ui-errormessage-label {
19
+ font-family: 'NPOSansBold';
20
+ font-weight: 700;
21
+ font-size: 22px;
22
+ line-height: 130%;
23
+ text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.9);
24
+ padding: 15px 5px;
25
+ user-select: none;
26
+ }
@@ -0,0 +1,19 @@
1
+ .bmpui-ui-label {
2
+ font-family: var(--fontBold);
3
+
4
+ &.bmpui-label-metadata-description {
5
+ font-family: var(--fontRegular) !important;
6
+ }
7
+ }
8
+
9
+ .bmpui-ui-selectbox {
10
+ font-family: var(--fontRegular) !important;
11
+ }
12
+
13
+ .bmpui-ui-errormessage-label {
14
+ font-family: var(--fontRegular) !important;
15
+ }
16
+
17
+ .bmpui-ui-playbacktimelabel {
18
+ font-family: var(--fontBold) !important;
19
+ }
@@ -0,0 +1,241 @@
1
+ .bmpui-ui-rewindbutton,
2
+ .bmpui-ui-forwardbutton,
3
+ .bmpui-ui-subtitlesettingstogglebutton,
4
+ .bmpui-ui-settingstogglebutton,
5
+ .bmpui-ui-fullscreentogglebutton,
6
+ .bmpui-ui-playbacktogglebutton,
7
+ .bmpui-ui-volumetogglebutton,
8
+ .bmpui-ui-casttogglebutton,
9
+ .bmpui-ui-airplaytogglebutton,
10
+ .bmpui-ui-piptogglebutton,
11
+ .bmpui-ui-audiotracksettingstogglebutton {
12
+ padding: 8px;
13
+ margin: 0;
14
+ }
15
+
16
+ .bmpui-controlbar-bottom {
17
+ .bmpui-container-wrapper {
18
+ gap: 8px;
19
+ }
20
+ }
21
+
22
+ /*Forward / backward */
23
+ .bmpui-ui-rewindbutton {
24
+ background-image: url($icon_backwards);
25
+ background-size: contain;
26
+ }
27
+
28
+ .bmpui-ui-forwardbutton {
29
+ background-image: url($icon_forward);
30
+ background-size: contain;
31
+ }
32
+
33
+ .bmpui-ui-rewindbutton:hover,
34
+ .bmpui-ui-forwardbutton:hover {
35
+ -webkit-filter: drop-shadow(0 0 1px #fff);
36
+ filter: drop-shadow(0 0 1px #fff);
37
+ }
38
+
39
+ /* Icon Play */
40
+ &.bmpui-player-state-paused, &.bmpui-player-state-prepared, &.bmpui-player-state-finished {
41
+ .bmpui-ui-hugeplaybacktogglebutton {
42
+ .bmpui-image {
43
+ cursor: pointer;
44
+ animation: none !important;
45
+ position: relative;
46
+ background: none;
47
+ background-image: none !important;
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ &:after, &:before{
52
+ content: "";
53
+ position: absolute;
54
+ height: 76px;
55
+ width: 76px;
56
+ }
57
+ &:hover{
58
+ &:after{
59
+ background-size: 55% !important;
60
+ }
61
+ }
62
+ &:after{
63
+ background-image: url($icon_bigplay) !important;
64
+ background-repeat: no-repeat;
65
+ background-position: center;
66
+ transition: background-size linear 0.3s !important;
67
+ background-size: 40%;
68
+ }
69
+ &:before{
70
+ border-radius: 500px;
71
+ background: rgba(0, 0, 0, 0.5);
72
+ }
73
+ }
74
+ &:hover{
75
+ .bmpui-image{
76
+ &:before{
77
+ background: linear-gradient(90deg, var(--npo-player-primarycolor) 0%, var(--npo-player-primarycolor-light) 100%);
78
+ animation: gradientAnimation 2s linear infinite;
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ @container (min-width: 600px){
85
+ .bmpui-ui-hugeplaybacktogglebutton .bmpui-image {
86
+ &:after, &:before{
87
+ height: 88px;
88
+ width: 88px;
89
+ }
90
+ }
91
+ }
92
+
93
+ @container (min-width: 1200px){
94
+ .bmpui-ui-hugeplaybacktogglebutton .bmpui-image {
95
+ &:after, &:before{
96
+ height: 100px;
97
+ width: 100px;
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+ @keyframes gradientAnimation {
104
+ 0% {
105
+ background-position: 0% 50%;
106
+ }
107
+ 50% {
108
+ background-position: 100% 50%;
109
+ }
110
+ 100% {
111
+ background-position: 0% 50%;
112
+ }
113
+ }
114
+
115
+ // Loading icon, does not currently work
116
+ &.bmpui-ui-uicontainer .bmpui-ui-hugeplaybacktogglebutton.bmpui-on .bmpui-image{
117
+ background: none !important;
118
+ background-position: center !important;
119
+ background-repeat: no-repeat !important;
120
+ background-size: 15% !important;
121
+ background-image: url($icon_bigplay) !important;
122
+ }
123
+ &.bmpui-ui-uicontainer:not(.bmpui-player-state-prepared):not(.bmpui-player-state-playing):not(.bmpui-player-state-paused):not(.bmpui-player-state-finished) .bmpui-image {
124
+ background-image: none !important;
125
+ &:after{
126
+ animation: rotation 1s infinite linear;
127
+ background-image: url($icon_loading) !important;
128
+ background-repeat: no-repeat;
129
+ background-position: center;
130
+ background-size: 4em;
131
+ }
132
+ }
133
+
134
+ /* Icon Audio Quality */
135
+ .bmpui-ui-subtitlesettingstogglebutton {
136
+ &.bmpui-off {
137
+ background-image: url($icon_subtitles);
138
+ }
139
+ &.bmpui-on {
140
+ background-image: url($icon_subtitles_active);
141
+ }
142
+ }
143
+
144
+ /* Icon Subtitles */
145
+ .bmpui-ui-subtitlesettingstogglebutton {
146
+ &.bmpui-off {
147
+ background-image: url($icon_subtitles);
148
+ }
149
+ &.bmpui-on {
150
+ background-image: url($icon_subtitles_active);
151
+ }
152
+ }
153
+
154
+ /* Icon Small Play + Pause */
155
+ .bmpui-ui-playbacktogglebutton {
156
+ &.bmpui-off {
157
+ background-image: url($icon_playbackplay);
158
+ }
159
+ &.bmpui-on {
160
+ background-image: url($icon_playbackpause);
161
+ }
162
+ }
163
+
164
+ @keyframes rotation {
165
+ from {
166
+ transform: rotate(0deg);
167
+ }
168
+ to {
169
+ transform: rotate(359deg);
170
+ }
171
+ }
172
+
173
+ .bmpui-ui-fullscreentogglebutton {
174
+ &.bmpui-off {
175
+ background-image: url($icon_fullscreen);
176
+ }
177
+ &.bmpui-on {
178
+ background-image: url($icon_fullscreen_active);
179
+ }
180
+ }
181
+
182
+ /* Icon Settings */
183
+ .bmpui-ui-settingstogglebutton {
184
+ &.bmpui-off {
185
+ background-image: url($icon_settings);
186
+ }
187
+ &.bmpui-on {
188
+ background-image: url($icon_settings_active);
189
+ }
190
+ }
191
+
192
+ /* Icon Cast */
193
+ .bmpui-ui-casttogglebutton {
194
+ &.bmpui-off {
195
+ background-image: url($icon_cast);
196
+ }
197
+ &.bmpui-on {
198
+ background-image: url($icon_cast_active);
199
+ }
200
+ }
201
+
202
+ /* Icon Airplay */
203
+ .bmpui-ui-airplaytogglebutton {
204
+ &.bmpui-off {
205
+ background-image: url($icon_airplay);
206
+ }
207
+ &.bmpui-on {
208
+ background-image: url($icon_airplay_active);
209
+ }
210
+ }
211
+
212
+ /* Icon PIP */
213
+ .bmpui-ui-piptogglebutton {
214
+ &.bmpui-off {
215
+ background-image: url($icon_pip);
216
+ }
217
+ &.bmpui-on {
218
+ background-image: url($icon_pip_active);
219
+ }
220
+ }
221
+
222
+ /* Icon Volume */
223
+ .bmpui-ui-volumetogglebutton.bmpui-muted {
224
+ background-image: url($icon_volume_muted);
225
+ }
226
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='1'],
227
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='2'],
228
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='3'],
229
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='4'] {
230
+ background-image: url($icon_volume_1);
231
+ }
232
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='5'],
233
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='6'],
234
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='7'] {
235
+ background-image: url($icon_volume_2);
236
+ }
237
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='8'],
238
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='9'],
239
+ .bmpui-ui-volumetogglebutton.bmpui-unmuted[data-bmpui-volume-level-tens='10'] {
240
+ background-image: url($icon_volume_3);
241
+ }