react-native-theoplayer 1.6.1 → 1.7.1

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 (465) hide show
  1. package/README.md +4 -0
  2. package/android/build.gradle +76 -33
  3. package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.3.0/ads-wrapper-4.3.0.aar +0 -0
  4. package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.3.0/ads-wrapper-4.3.0.pom +9 -0
  5. package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml +13 -0
  6. package/android/src/main/java/com/theoplayer/PlayerConfigHelper.java +40 -0
  7. package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.java +8 -3
  8. package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.java +131 -28
  9. package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.java +14 -1
  10. package/android/src/main/java/com/theoplayer/SourceHelper.java +137 -86
  11. package/android/src/main/java/com/theoplayer/VideoEventEmitter.java +44 -12
  12. package/android/src/main/java/com/theoplayer/abr/ABRConfigurationAdapter.kt +72 -0
  13. package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.java +92 -0
  14. package/android/src/main/java/com/theoplayer/ads/AdInfo.java +168 -0
  15. package/android/src/main/java/com/theoplayer/ads/AdsModule.java +152 -0
  16. package/android/src/main/java/com/theoplayer/drm/ContentProtectionAdapter.kt +143 -0
  17. package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +273 -0
  18. package/android/src/main/java/com/theoplayer/drm/KeySystemAdapter.kt +22 -0
  19. package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegration.kt +33 -0
  20. package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegrationFactory.kt +19 -0
  21. package/android/src/main/java/com/theoplayer/drm/RequestMethodAdapter.kt +28 -0
  22. package/android/src/main/java/com/theoplayer/track/QualityListAdapter.java +54 -0
  23. package/android/src/main/java/com/theoplayer/track/QualityListFilter.java +40 -0
  24. package/android/src/main/java/com/theoplayer/track/TrackListInfo.java +10 -2
  25. package/android/src/main/java/com/theoplayer/util/TypeUtils.kt +17 -0
  26. package/android/src/main/java/com/theoplayer/util/ViewResolver.java +42 -0
  27. package/ios/THEOplayerRCTAdAggregator.swift +158 -0
  28. package/ios/THEOplayerRCTAdsAPI.swift +296 -0
  29. package/ios/THEOplayerRCTBridge.m +65 -0
  30. package/ios/THEOplayerRCTContentProtectionAPI.swift +359 -0
  31. package/ios/THEOplayerRCTContentProtectionAggregator.swift +119 -0
  32. package/ios/THEOplayerRCTDebug.swift +11 -5
  33. package/ios/THEOplayerRCTMetadataAggregator.swift +1 -1
  34. package/ios/THEOplayerRCTNetworkUtils.swift +54 -0
  35. package/ios/THEOplayerRCTProxyContentProtectionIntegration.swift +155 -0
  36. package/ios/THEOplayerRCTProxyContentProtectionIntegrationFactory.swift +32 -0
  37. package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +223 -30
  38. package/ios/THEOplayerRCTTypeUtils.swift +18 -0
  39. package/ios/THEOplayerRCTView.swift +109 -49
  40. package/ios/THEOplayerRCTViewAdEventHandler.swift +238 -0
  41. package/ios/{THEOplayerRCTViewEventHandler.swift → THEOplayerRCTViewMainEventHandler.swift} +7 -119
  42. package/ios/THEOplayerRCTViewTextTrackEventHandler.swift +134 -0
  43. package/ios/Theoplayer-Bridging-Header.h +3 -1
  44. package/ios/custom/Frameworks/ios/put_custom_ios_xcframework_here.txt +2 -0
  45. package/ios/custom/react-native-theoplayer_custom_ios.podspec +36 -0
  46. package/ios/custom/theofeatures.sh +14 -0
  47. package/lib/commonjs/api/THEOplayerView.js.map +1 -1
  48. package/lib/commonjs/api/abr/ABRConfiguration.js +2 -0
  49. package/lib/commonjs/api/abr/ABRConfiguration.js.map +1 -0
  50. package/lib/commonjs/api/abr/barrel.js +19 -0
  51. package/lib/commonjs/api/abr/barrel.js.map +1 -0
  52. package/lib/commonjs/api/ads/Ad.js +6 -0
  53. package/lib/commonjs/api/ads/Ad.js.map +1 -0
  54. package/lib/commonjs/api/ads/AdBreak.js +6 -0
  55. package/lib/commonjs/api/ads/AdBreak.js.map +1 -0
  56. package/lib/commonjs/api/ads/AdsAPI.js +6 -0
  57. package/lib/commonjs/api/ads/AdsAPI.js.map +1 -0
  58. package/lib/commonjs/api/ads/AdsConfiguration.js +6 -0
  59. package/lib/commonjs/api/ads/AdsConfiguration.js.map +1 -0
  60. package/lib/commonjs/api/ads/CompanionAd.js +2 -0
  61. package/lib/commonjs/api/ads/CompanionAd.js.map +1 -0
  62. package/lib/commonjs/api/ads/GoogleDai.js +2 -0
  63. package/lib/commonjs/api/ads/GoogleDai.js.map +1 -0
  64. package/lib/commonjs/api/ads/GoogleImaAd.js +6 -0
  65. package/lib/commonjs/api/ads/GoogleImaAd.js.map +1 -0
  66. package/lib/commonjs/api/ads/GoogleImaConfiguration.js +2 -0
  67. package/lib/commonjs/api/ads/GoogleImaConfiguration.js.map +1 -0
  68. package/lib/commonjs/api/ads/barrel.js +110 -0
  69. package/lib/commonjs/api/ads/barrel.js.map +1 -0
  70. package/lib/commonjs/api/barrel.js +58 -6
  71. package/lib/commonjs/api/barrel.js.map +1 -1
  72. package/lib/commonjs/api/config/PlayerConfiguration.js +4 -0
  73. package/lib/commonjs/api/config/PlayerConfiguration.js.map +1 -1
  74. package/lib/commonjs/api/drm/ContentProtectionAPI.js +6 -0
  75. package/lib/commonjs/api/drm/ContentProtectionAPI.js.map +1 -0
  76. package/lib/commonjs/api/drm/ContentProtectionIntegration.js +6 -0
  77. package/lib/commonjs/api/drm/ContentProtectionIntegration.js.map +1 -0
  78. package/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.js +6 -0
  79. package/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.js.map +1 -0
  80. package/lib/commonjs/api/drm/ContentProtectionRequest.js +2 -0
  81. package/lib/commonjs/api/drm/ContentProtectionRequest.js.map +1 -0
  82. package/lib/commonjs/api/drm/ContentProtectionResponse.js +6 -0
  83. package/lib/commonjs/api/drm/ContentProtectionResponse.js.map +1 -0
  84. package/lib/commonjs/api/drm/barrel.js +71 -0
  85. package/lib/commonjs/api/drm/barrel.js.map +1 -0
  86. package/lib/commonjs/api/event/AdEvent.js +89 -0
  87. package/lib/commonjs/api/event/AdEvent.js.map +1 -0
  88. package/lib/commonjs/api/event/barrel.js +13 -0
  89. package/lib/commonjs/api/event/barrel.js.map +1 -1
  90. package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
  91. package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js +6 -0
  92. package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js.map +1 -0
  93. package/lib/commonjs/api/source/ads/IMAAdDescription.js +6 -0
  94. package/lib/commonjs/api/source/ads/IMAAdDescription.js.map +1 -0
  95. package/lib/commonjs/api/source/ads/SpotXAdDescription.js +6 -0
  96. package/lib/commonjs/api/source/ads/SpotXAdDescription.js.map +1 -0
  97. package/lib/commonjs/api/source/ads/THEOplayerAdDescription.js +6 -0
  98. package/lib/commonjs/api/source/ads/THEOplayerAdDescription.js.map +1 -0
  99. package/lib/commonjs/api/source/ads/barrel.js +84 -0
  100. package/lib/commonjs/api/source/ads/barrel.js.map +1 -0
  101. package/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.js +6 -0
  102. package/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.js.map +1 -0
  103. package/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js +6 -0
  104. package/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js.map +1 -0
  105. package/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js +6 -0
  106. package/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js.map +1 -0
  107. package/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js +6 -0
  108. package/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js.map +1 -0
  109. package/lib/commonjs/api/source/ads/ssai/barrel.js +58 -0
  110. package/lib/commonjs/api/source/ads/ssai/barrel.js.map +1 -0
  111. package/lib/commonjs/api/source/barrel.js +16 -3
  112. package/lib/commonjs/api/source/barrel.js.map +1 -1
  113. package/lib/commonjs/api/source/drm/DRMConfiguration.js.map +1 -1
  114. package/lib/commonjs/api/track/MediaTrack.js +29 -0
  115. package/lib/commonjs/api/track/MediaTrack.js.map +1 -1
  116. package/lib/commonjs/api/utils/TypeUtils.js +62 -0
  117. package/lib/commonjs/api/utils/TypeUtils.js.map +1 -0
  118. package/lib/commonjs/api/utils/barrel.js +19 -0
  119. package/lib/commonjs/api/utils/barrel.js.map +1 -0
  120. package/lib/commonjs/index.js +10 -1
  121. package/lib/commonjs/index.js.map +1 -1
  122. package/lib/commonjs/internal/THEOplayerView.js +42 -3
  123. package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
  124. package/lib/commonjs/internal/THEOplayerView.web.js +41 -2
  125. package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
  126. package/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.js +54 -0
  127. package/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.js.map +1 -0
  128. package/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.js +34 -0
  129. package/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.js.map +1 -0
  130. package/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.js +78 -0
  131. package/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.js.map +1 -0
  132. package/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.js +32 -0
  133. package/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.js.map +1 -0
  134. package/lib/commonjs/internal/drm/ContentProtectionRegistry.js +214 -0
  135. package/lib/commonjs/internal/drm/ContentProtectionRegistry.js.map +1 -0
  136. package/lib/commonjs/internal/drm/ContentProtectionRegistry.web.js +20 -0
  137. package/lib/commonjs/internal/drm/ContentProtectionRegistry.web.js.map +1 -0
  138. package/lib/commonjs/internal/drm/NativeCertificateRequest.js +41 -0
  139. package/lib/commonjs/internal/drm/NativeCertificateRequest.js.map +1 -0
  140. package/lib/commonjs/internal/drm/NativeCertificateResponse.js +41 -0
  141. package/lib/commonjs/internal/drm/NativeCertificateResponse.js.map +1 -0
  142. package/lib/commonjs/internal/drm/NativeContentProtectionEvent.js +2 -0
  143. package/lib/commonjs/internal/drm/NativeContentProtectionEvent.js.map +1 -0
  144. package/lib/commonjs/internal/drm/NativeLicenseRequest.js +44 -0
  145. package/lib/commonjs/internal/drm/NativeLicenseRequest.js.map +1 -0
  146. package/lib/commonjs/internal/drm/NativeLicenseResponse.js +41 -0
  147. package/lib/commonjs/internal/drm/NativeLicenseResponse.js.map +1 -0
  148. package/lib/commonjs/internal/utils/TypeUtils.js +41 -0
  149. package/lib/commonjs/internal/utils/TypeUtils.js.map +1 -0
  150. package/lib/commonjs/internal/web/TrackUtils.js +19 -0
  151. package/lib/commonjs/internal/web/TrackUtils.js.map +1 -1
  152. package/lib/module/api/THEOplayerView.js.map +1 -1
  153. package/lib/module/api/abr/ABRConfiguration.js +2 -0
  154. package/lib/module/api/abr/ABRConfiguration.js.map +1 -0
  155. package/lib/module/api/abr/barrel.js +2 -0
  156. package/lib/module/api/abr/barrel.js.map +1 -0
  157. package/lib/module/api/ads/Ad.js +2 -0
  158. package/lib/module/api/ads/Ad.js.map +1 -0
  159. package/lib/module/api/ads/AdBreak.js +2 -0
  160. package/lib/module/api/ads/AdBreak.js.map +1 -0
  161. package/lib/module/api/ads/AdsAPI.js +2 -0
  162. package/lib/module/api/ads/AdsAPI.js.map +1 -0
  163. package/lib/module/api/ads/AdsConfiguration.js +2 -0
  164. package/lib/module/api/ads/AdsConfiguration.js.map +1 -0
  165. package/lib/module/api/ads/CompanionAd.js +2 -0
  166. package/lib/module/api/ads/CompanionAd.js.map +1 -0
  167. package/lib/module/api/ads/GoogleDai.js +2 -0
  168. package/lib/module/api/ads/GoogleDai.js.map +1 -0
  169. package/lib/module/api/ads/GoogleImaAd.js +2 -0
  170. package/lib/module/api/ads/GoogleImaAd.js.map +1 -0
  171. package/lib/module/api/ads/GoogleImaConfiguration.js +2 -0
  172. package/lib/module/api/ads/GoogleImaConfiguration.js.map +1 -0
  173. package/lib/module/api/ads/barrel.js +9 -0
  174. package/lib/module/api/ads/barrel.js.map +1 -0
  175. package/lib/module/api/barrel.js +5 -1
  176. package/lib/module/api/barrel.js.map +1 -1
  177. package/lib/module/api/config/PlayerConfiguration.js +1 -1
  178. package/lib/module/api/config/PlayerConfiguration.js.map +1 -1
  179. package/lib/module/api/drm/ContentProtectionAPI.js +2 -0
  180. package/lib/module/api/drm/ContentProtectionAPI.js.map +1 -0
  181. package/lib/module/api/drm/ContentProtectionIntegration.js +2 -0
  182. package/lib/module/api/drm/ContentProtectionIntegration.js.map +1 -0
  183. package/lib/module/api/drm/ContentProtectionIntegrationFactory.js +2 -0
  184. package/lib/module/api/drm/ContentProtectionIntegrationFactory.js.map +1 -0
  185. package/lib/module/api/drm/ContentProtectionRequest.js +2 -0
  186. package/lib/module/api/drm/ContentProtectionRequest.js.map +1 -0
  187. package/lib/module/api/drm/ContentProtectionResponse.js +2 -0
  188. package/lib/module/api/drm/ContentProtectionResponse.js.map +1 -0
  189. package/lib/module/api/drm/barrel.js +6 -0
  190. package/lib/module/api/drm/barrel.js.map +1 -0
  191. package/lib/module/api/event/AdEvent.js +82 -0
  192. package/lib/module/api/event/AdEvent.js.map +1 -0
  193. package/lib/module/api/event/barrel.js +1 -0
  194. package/lib/module/api/event/barrel.js.map +1 -1
  195. package/lib/module/api/source/SourceDescription.js.map +1 -1
  196. package/lib/module/api/source/ads/FreeWheelAdDescription.js +2 -0
  197. package/lib/module/api/source/ads/FreeWheelAdDescription.js.map +1 -0
  198. package/lib/module/api/source/ads/IMAAdDescription.js +2 -0
  199. package/lib/module/api/source/ads/IMAAdDescription.js.map +1 -0
  200. package/lib/module/api/source/ads/SpotXAdDescription.js +2 -0
  201. package/lib/module/api/source/ads/SpotXAdDescription.js.map +1 -0
  202. package/lib/module/api/source/ads/THEOplayerAdDescription.js +2 -0
  203. package/lib/module/api/source/ads/THEOplayerAdDescription.js.map +1 -0
  204. package/lib/module/api/source/ads/barrel.js +7 -0
  205. package/lib/module/api/source/ads/barrel.js.map +1 -0
  206. package/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.js +2 -0
  207. package/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.js.map +1 -0
  208. package/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js +2 -0
  209. package/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js.map +1 -0
  210. package/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js +2 -0
  211. package/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js.map +1 -0
  212. package/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js +2 -0
  213. package/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js.map +1 -0
  214. package/lib/module/api/source/ads/ssai/barrel.js +5 -0
  215. package/lib/module/api/source/ads/ssai/barrel.js.map +1 -0
  216. package/lib/module/api/source/barrel.js +1 -0
  217. package/lib/module/api/source/barrel.js.map +1 -1
  218. package/lib/module/api/source/drm/DRMConfiguration.js.map +1 -1
  219. package/lib/module/api/track/MediaTrack.js +23 -1
  220. package/lib/module/api/track/MediaTrack.js.map +1 -1
  221. package/lib/module/api/utils/TypeUtils.js +36 -0
  222. package/lib/module/api/utils/TypeUtils.js.map +1 -0
  223. package/lib/module/api/utils/barrel.js +2 -0
  224. package/lib/module/api/utils/barrel.js.map +1 -0
  225. package/lib/module/index.js +1 -0
  226. package/lib/module/index.js.map +1 -1
  227. package/lib/module/internal/THEOplayerView.js +40 -3
  228. package/lib/module/internal/THEOplayerView.js.map +1 -1
  229. package/lib/module/internal/THEOplayerView.web.js +42 -4
  230. package/lib/module/internal/THEOplayerView.web.js.map +1 -1
  231. package/lib/module/internal/ads/THEOplayerNativeAdsAPI.js +43 -0
  232. package/lib/module/internal/ads/THEOplayerNativeAdsAPI.js.map +1 -0
  233. package/lib/module/internal/ads/THEOplayerNativeGoogleDAI.js +24 -0
  234. package/lib/module/internal/ads/THEOplayerNativeGoogleDAI.js.map +1 -0
  235. package/lib/module/internal/ads/THEOplayerWebAdsAPI.js +68 -0
  236. package/lib/module/internal/ads/THEOplayerWebAdsAPI.js.map +1 -0
  237. package/lib/module/internal/ads/THEOplayerWebGoogleDAI.js +23 -0
  238. package/lib/module/internal/ads/THEOplayerWebGoogleDAI.js.map +1 -0
  239. package/lib/module/internal/drm/ContentProtectionRegistry.js +188 -0
  240. package/lib/module/internal/drm/ContentProtectionRegistry.js.map +1 -0
  241. package/lib/module/internal/drm/ContentProtectionRegistry.web.js +9 -0
  242. package/lib/module/internal/drm/ContentProtectionRegistry.web.js.map +1 -0
  243. package/lib/module/internal/drm/NativeCertificateRequest.js +31 -0
  244. package/lib/module/internal/drm/NativeCertificateRequest.js.map +1 -0
  245. package/lib/module/internal/drm/NativeCertificateResponse.js +30 -0
  246. package/lib/module/internal/drm/NativeCertificateResponse.js.map +1 -0
  247. package/lib/module/internal/drm/NativeContentProtectionEvent.js +2 -0
  248. package/lib/module/internal/drm/NativeContentProtectionEvent.js.map +1 -0
  249. package/lib/module/internal/drm/NativeLicenseRequest.js +34 -0
  250. package/lib/module/internal/drm/NativeLicenseRequest.js.map +1 -0
  251. package/lib/module/internal/drm/NativeLicenseResponse.js +30 -0
  252. package/lib/module/internal/drm/NativeLicenseResponse.js.map +1 -0
  253. package/lib/module/internal/utils/TypeUtils.js +24 -0
  254. package/lib/module/internal/utils/TypeUtils.js.map +1 -0
  255. package/lib/module/internal/web/TrackUtils.js +15 -0
  256. package/lib/module/internal/web/TrackUtils.js.map +1 -1
  257. package/lib/typescript/lib/commonjs/api/abr/ABRConfiguration.d.ts +0 -0
  258. package/lib/typescript/lib/commonjs/api/abr/barrel.d.ts +1 -0
  259. package/lib/typescript/lib/commonjs/api/ads/Ad.d.ts +1 -0
  260. package/lib/typescript/lib/commonjs/api/ads/AdBreak.d.ts +1 -0
  261. package/lib/typescript/lib/commonjs/api/ads/AdsAPI.d.ts +1 -0
  262. package/lib/typescript/lib/commonjs/api/ads/AdsConfiguration.d.ts +1 -0
  263. package/lib/typescript/lib/commonjs/api/ads/CompanionAd.d.ts +0 -0
  264. package/lib/typescript/lib/commonjs/api/ads/GoogleDai.d.ts +0 -0
  265. package/lib/typescript/lib/commonjs/api/ads/GoogleImaAd.d.ts +1 -0
  266. package/lib/typescript/lib/commonjs/api/ads/GoogleImaConfiguration.d.ts +0 -0
  267. package/lib/typescript/lib/commonjs/api/ads/barrel.d.ts +1 -0
  268. package/lib/typescript/lib/commonjs/api/config/PlayerConfiguration.d.ts +1 -0
  269. package/lib/typescript/lib/commonjs/api/drm/ContentProtectionAPI.d.ts +1 -0
  270. package/lib/typescript/lib/commonjs/api/drm/ContentProtectionIntegration.d.ts +1 -0
  271. package/lib/typescript/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.d.ts +1 -0
  272. package/lib/typescript/lib/commonjs/api/drm/ContentProtectionRequest.d.ts +0 -0
  273. package/lib/typescript/lib/commonjs/api/drm/ContentProtectionResponse.d.ts +1 -0
  274. package/lib/typescript/lib/commonjs/api/drm/barrel.d.ts +1 -0
  275. package/lib/typescript/lib/commonjs/api/event/AdEvent.d.ts +2 -0
  276. package/lib/typescript/lib/commonjs/api/source/ads/FreeWheelAdDescription.d.ts +1 -0
  277. package/lib/typescript/lib/commonjs/api/source/ads/IMAAdDescription.d.ts +1 -0
  278. package/lib/typescript/lib/commonjs/api/source/ads/SpotXAdDescription.d.ts +1 -0
  279. package/lib/typescript/lib/commonjs/api/source/ads/THEOplayerAdDescription.d.ts +1 -0
  280. package/lib/typescript/lib/commonjs/api/source/ads/barrel.d.ts +1 -0
  281. package/lib/typescript/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +1 -0
  282. package/lib/typescript/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +1 -0
  283. package/lib/typescript/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +1 -0
  284. package/lib/typescript/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +1 -0
  285. package/lib/typescript/lib/commonjs/api/source/ads/ssai/barrel.d.ts +1 -0
  286. package/lib/typescript/lib/commonjs/api/track/MediaTrack.d.ts +8 -0
  287. package/lib/typescript/lib/commonjs/api/utils/TypeUtils.d.ts +13 -0
  288. package/lib/typescript/lib/commonjs/api/utils/barrel.d.ts +1 -0
  289. package/lib/typescript/lib/commonjs/index.d.ts +2 -0
  290. package/lib/typescript/lib/commonjs/internal/THEOplayerView.d.ts +5 -0
  291. package/lib/typescript/lib/commonjs/internal/THEOplayerView.web.d.ts +4 -0
  292. package/lib/typescript/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.d.ts +14 -0
  293. package/lib/typescript/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.d.ts +9 -0
  294. package/lib/typescript/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.d.ts +14 -0
  295. package/lib/typescript/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.d.ts +9 -0
  296. package/lib/typescript/lib/commonjs/internal/drm/ContentProtectionRegistry.d.ts +14 -0
  297. package/lib/typescript/lib/commonjs/internal/drm/ContentProtectionRegistry.web.d.ts +5 -0
  298. package/lib/typescript/lib/commonjs/internal/drm/NativeCertificateRequest.d.ts +18 -0
  299. package/lib/typescript/lib/commonjs/internal/drm/NativeCertificateResponse.d.ts +21 -0
  300. package/lib/typescript/lib/commonjs/internal/drm/NativeContentProtectionEvent.d.ts +0 -0
  301. package/lib/typescript/lib/commonjs/internal/drm/NativeLicenseRequest.d.ts +20 -0
  302. package/lib/typescript/lib/commonjs/internal/drm/NativeLicenseResponse.d.ts +22 -0
  303. package/lib/typescript/lib/commonjs/internal/utils/TypeUtils.d.ts +6 -0
  304. package/lib/typescript/lib/commonjs/internal/web/TrackUtils.d.ts +2 -0
  305. package/lib/typescript/lib/module/api/abr/ABRConfiguration.d.ts +0 -0
  306. package/lib/typescript/lib/module/api/abr/barrel.d.ts +1 -0
  307. package/lib/typescript/lib/module/api/ads/Ad.d.ts +1 -0
  308. package/lib/typescript/lib/module/api/ads/AdBreak.d.ts +1 -0
  309. package/lib/typescript/lib/module/api/ads/AdsAPI.d.ts +1 -0
  310. package/lib/typescript/lib/module/api/ads/AdsConfiguration.d.ts +1 -0
  311. package/lib/typescript/lib/module/api/ads/CompanionAd.d.ts +0 -0
  312. package/lib/typescript/lib/module/api/ads/GoogleDai.d.ts +0 -0
  313. package/lib/typescript/lib/module/api/ads/GoogleImaAd.d.ts +1 -0
  314. package/lib/typescript/lib/module/api/ads/GoogleImaConfiguration.d.ts +0 -0
  315. package/lib/typescript/lib/module/api/ads/barrel.d.ts +5 -0
  316. package/lib/typescript/lib/module/api/barrel.d.ts +5 -1
  317. package/lib/typescript/lib/module/api/config/PlayerConfiguration.d.ts +1 -0
  318. package/lib/typescript/lib/module/api/config/barrel.d.ts +1 -1
  319. package/lib/typescript/lib/module/api/drm/ContentProtectionAPI.d.ts +1 -0
  320. package/lib/typescript/lib/module/api/drm/ContentProtectionIntegration.d.ts +1 -0
  321. package/lib/typescript/lib/module/api/drm/ContentProtectionIntegrationFactory.d.ts +1 -0
  322. package/lib/typescript/lib/module/api/drm/ContentProtectionRequest.d.ts +0 -0
  323. package/lib/typescript/lib/module/api/drm/ContentProtectionResponse.d.ts +1 -0
  324. package/lib/typescript/lib/module/api/drm/barrel.d.ts +4 -0
  325. package/lib/typescript/lib/module/api/event/AdEvent.d.ts +1 -0
  326. package/lib/typescript/lib/module/api/event/barrel.d.ts +1 -0
  327. package/lib/typescript/lib/module/api/source/ads/FreeWheelAdDescription.d.ts +1 -0
  328. package/lib/typescript/lib/module/api/source/ads/IMAAdDescription.d.ts +1 -0
  329. package/lib/typescript/lib/module/api/source/ads/SpotXAdDescription.d.ts +1 -0
  330. package/lib/typescript/lib/module/api/source/ads/THEOplayerAdDescription.d.ts +1 -0
  331. package/lib/typescript/lib/module/api/source/ads/barrel.d.ts +5 -0
  332. package/lib/typescript/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +1 -0
  333. package/lib/typescript/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +1 -0
  334. package/lib/typescript/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +1 -0
  335. package/lib/typescript/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +1 -0
  336. package/lib/typescript/lib/module/api/source/ads/ssai/barrel.d.ts +4 -0
  337. package/lib/typescript/lib/module/api/source/barrel.d.ts +1 -0
  338. package/lib/typescript/lib/module/api/track/MediaTrack.d.ts +8 -1
  339. package/lib/typescript/lib/module/api/utils/TypeUtils.d.ts +12 -0
  340. package/lib/typescript/lib/module/api/utils/barrel.d.ts +1 -0
  341. package/lib/typescript/lib/module/index.d.ts +1 -0
  342. package/lib/typescript/lib/module/internal/THEOplayerView.d.ts +8 -0
  343. package/lib/typescript/lib/module/internal/THEOplayerView.web.d.ts +4 -0
  344. package/lib/typescript/lib/module/internal/ads/THEOplayerNativeAdsAPI.d.ts +13 -0
  345. package/lib/typescript/lib/module/internal/ads/THEOplayerNativeGoogleDAI.d.ts +8 -0
  346. package/lib/typescript/lib/module/internal/ads/THEOplayerWebAdsAPI.d.ts +13 -0
  347. package/lib/typescript/lib/module/internal/ads/THEOplayerWebGoogleDAI.d.ts +8 -0
  348. package/lib/typescript/lib/module/internal/drm/ContentProtectionRegistry.d.ts +13 -0
  349. package/lib/typescript/lib/module/internal/drm/ContentProtectionRegistry.web.d.ts +4 -0
  350. package/lib/typescript/lib/module/internal/drm/NativeCertificateRequest.d.ts +17 -0
  351. package/lib/typescript/lib/module/internal/drm/NativeCertificateResponse.d.ts +20 -0
  352. package/lib/typescript/lib/module/internal/drm/NativeContentProtectionEvent.d.ts +0 -0
  353. package/lib/typescript/lib/module/internal/drm/NativeLicenseRequest.d.ts +19 -0
  354. package/lib/typescript/lib/module/internal/drm/NativeLicenseResponse.d.ts +21 -0
  355. package/lib/typescript/lib/module/internal/utils/TypeUtils.d.ts +5 -0
  356. package/lib/typescript/lib/module/internal/web/TrackUtils.d.ts +2 -0
  357. package/lib/typescript/src/api/THEOplayerView.d.ts +25 -4
  358. package/lib/typescript/src/api/abr/ABRConfiguration.d.ts +95 -0
  359. package/lib/typescript/src/api/abr/barrel.d.ts +1 -0
  360. package/lib/typescript/src/api/ads/Ad.d.ts +238 -0
  361. package/lib/typescript/src/api/ads/AdBreak.d.ts +39 -0
  362. package/lib/typescript/src/api/ads/AdsAPI.d.ts +46 -0
  363. package/lib/typescript/src/api/ads/AdsConfiguration.d.ts +69 -0
  364. package/lib/typescript/src/api/ads/CompanionAd.d.ts +59 -0
  365. package/lib/typescript/src/api/ads/GoogleDai.d.ts +29 -0
  366. package/lib/typescript/src/api/ads/GoogleImaAd.d.ts +78 -0
  367. package/lib/typescript/src/api/ads/GoogleImaConfiguration.d.ts +13 -0
  368. package/lib/typescript/src/api/ads/barrel.d.ts +8 -0
  369. package/lib/typescript/src/api/barrel.d.ts +5 -1
  370. package/lib/typescript/src/api/config/PlayerConfiguration.d.ts +5 -0
  371. package/lib/typescript/src/api/drm/ContentProtectionAPI.d.ts +5 -0
  372. package/lib/typescript/src/api/drm/ContentProtectionIntegration.d.ts +86 -0
  373. package/lib/typescript/src/api/drm/ContentProtectionIntegrationFactory.d.ts +15 -0
  374. package/lib/typescript/src/api/drm/ContentProtectionRequest.d.ts +56 -0
  375. package/lib/typescript/src/api/drm/ContentProtectionResponse.d.ts +56 -0
  376. package/lib/typescript/src/api/drm/barrel.d.ts +5 -0
  377. package/lib/typescript/src/api/event/AdEvent.d.ts +13 -0
  378. package/lib/typescript/src/api/event/barrel.d.ts +1 -0
  379. package/lib/typescript/src/api/source/SourceDescription.d.ts +8 -0
  380. package/lib/typescript/src/api/source/ads/FreeWheelAdDescription.d.ts +85 -0
  381. package/lib/typescript/src/api/source/ads/IMAAdDescription.d.ts +25 -0
  382. package/lib/typescript/src/api/source/ads/SpotXAdDescription.d.ts +115 -0
  383. package/lib/typescript/src/api/source/ads/THEOplayerAdDescription.d.ts +32 -0
  384. package/lib/typescript/src/api/source/ads/barrel.d.ts +6 -0
  385. package/lib/typescript/src/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +130 -0
  386. package/lib/typescript/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +27 -0
  387. package/lib/typescript/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +26 -0
  388. package/lib/typescript/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +46 -0
  389. package/lib/typescript/src/api/source/ads/ssai/barrel.d.ts +4 -0
  390. package/lib/typescript/src/api/source/barrel.d.ts +1 -0
  391. package/lib/typescript/src/api/source/drm/DRMConfiguration.d.ts +0 -30
  392. package/lib/typescript/src/api/track/MediaTrack.d.ts +5 -2
  393. package/lib/typescript/src/api/utils/TypeUtils.d.ts +20 -0
  394. package/lib/typescript/src/api/utils/barrel.d.ts +1 -0
  395. package/lib/typescript/src/index.d.ts +1 -0
  396. package/lib/typescript/src/internal/THEOplayerView.d.ts +10 -4
  397. package/lib/typescript/src/internal/THEOplayerView.web.d.ts +7 -2
  398. package/lib/typescript/src/internal/ads/THEOplayerNativeAdsAPI.d.ts +17 -0
  399. package/lib/typescript/src/internal/ads/THEOplayerNativeGoogleDAI.d.ts +10 -0
  400. package/lib/typescript/src/internal/ads/THEOplayerWebAdsAPI.d.ts +15 -0
  401. package/lib/typescript/src/internal/ads/THEOplayerWebGoogleDAI.d.ts +10 -0
  402. package/lib/typescript/src/internal/drm/ContentProtectionRegistry.d.ts +19 -0
  403. package/lib/typescript/src/internal/drm/ContentProtectionRegistry.web.d.ts +5 -0
  404. package/lib/typescript/src/internal/drm/NativeCertificateRequest.d.ts +13 -0
  405. package/lib/typescript/src/internal/drm/NativeCertificateResponse.d.ts +18 -0
  406. package/lib/typescript/src/internal/drm/NativeContentProtectionEvent.d.ts +5 -0
  407. package/lib/typescript/src/internal/drm/NativeLicenseRequest.d.ts +14 -0
  408. package/lib/typescript/src/internal/drm/NativeLicenseResponse.d.ts +18 -0
  409. package/lib/typescript/src/internal/utils/TypeUtils.d.ts +5 -0
  410. package/lib/typescript/src/internal/web/TrackUtils.d.ts +3 -1
  411. package/package.json +4 -3
  412. package/src/api/THEOplayerView.ts +29 -4
  413. package/src/api/abr/ABRConfiguration.ts +103 -0
  414. package/src/api/abr/barrel.ts +1 -0
  415. package/src/api/ads/Ad.ts +267 -0
  416. package/src/api/ads/AdBreak.ts +44 -0
  417. package/src/api/ads/AdsAPI.ts +53 -0
  418. package/src/api/ads/AdsConfiguration.ts +76 -0
  419. package/src/api/ads/CompanionAd.ts +65 -0
  420. package/src/api/ads/GoogleDai.ts +32 -0
  421. package/src/api/ads/GoogleImaAd.ts +86 -0
  422. package/src/api/ads/GoogleImaConfiguration.ts +13 -0
  423. package/src/api/ads/barrel.ts +8 -0
  424. package/src/api/barrel.ts +5 -1
  425. package/src/api/config/PlayerConfiguration.ts +7 -0
  426. package/src/api/drm/ContentProtectionAPI.ts +6 -0
  427. package/src/api/drm/ContentProtectionIntegration.ts +93 -0
  428. package/src/api/drm/ContentProtectionIntegrationFactory.ts +16 -0
  429. package/src/api/drm/ContentProtectionRequest.ts +60 -0
  430. package/src/api/drm/ContentProtectionResponse.ts +62 -0
  431. package/src/api/drm/barrel.ts +5 -0
  432. package/src/api/event/AdEvent.ts +117 -0
  433. package/src/api/event/barrel.ts +1 -0
  434. package/src/api/source/SourceDescription.ts +9 -0
  435. package/src/api/source/ads/FreeWheelAdDescription.ts +97 -0
  436. package/src/api/source/ads/IMAAdDescription.ts +26 -0
  437. package/src/api/source/ads/SpotXAdDescription.ts +126 -0
  438. package/src/api/source/ads/THEOplayerAdDescription.ts +34 -0
  439. package/src/api/source/ads/barrel.ts +6 -0
  440. package/src/api/source/ads/ssai/GoogleDAIConfiguration.ts +145 -0
  441. package/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.ts +30 -0
  442. package/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts +28 -0
  443. package/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.ts +51 -0
  444. package/src/api/source/ads/ssai/barrel.ts +4 -0
  445. package/src/api/source/barrel.ts +1 -0
  446. package/src/api/source/drm/DRMConfiguration.ts +0 -35
  447. package/src/api/track/MediaTrack.ts +22 -2
  448. package/src/api/utils/TypeUtils.ts +39 -0
  449. package/src/api/utils/barrel.ts +1 -0
  450. package/src/index.tsx +1 -0
  451. package/src/internal/THEOplayerView.tsx +49 -8
  452. package/src/internal/THEOplayerView.web.tsx +37 -7
  453. package/src/internal/ads/THEOplayerNativeAdsAPI.ts +44 -0
  454. package/src/internal/ads/THEOplayerNativeGoogleDAI.ts +23 -0
  455. package/src/internal/ads/THEOplayerWebAdsAPI.ts +51 -0
  456. package/src/internal/ads/THEOplayerWebGoogleDAI.ts +22 -0
  457. package/src/internal/drm/ContentProtectionRegistry.ts +173 -0
  458. package/src/internal/drm/ContentProtectionRegistry.web.ts +10 -0
  459. package/src/internal/drm/NativeCertificateRequest.ts +41 -0
  460. package/src/internal/drm/NativeCertificateResponse.ts +45 -0
  461. package/src/internal/drm/NativeContentProtectionEvent.ts +5 -0
  462. package/src/internal/drm/NativeLicenseRequest.ts +39 -0
  463. package/src/internal/drm/NativeLicenseResponse.ts +45 -0
  464. package/src/internal/utils/TypeUtils.ts +39 -0
  465. package/src/internal/web/TrackUtils.ts +22 -1
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Represents a companion ad which is displayed near the video player.
3
+ *
4
+ * @public
5
+ */
6
+ export interface CompanionAd {
7
+ /**
8
+ * The identifier of the element in which the companion ad should be appended, if available.
9
+ *
10
+ * @remarks
11
+ * <br/> Only available for Google DAI and THEO ads if provided in the VAST.
12
+ */
13
+ adSlotId?: string;
14
+ /**
15
+ * The alternative description for the ad.
16
+ *
17
+ * @remarks
18
+ * <br/> - Returns value as reported in the VAST StaticResource. If not specified, it returns an empty string.
19
+ * <br/> - Returns an empty string for THEO ads if not available.
20
+ * <br/> - Returns an empty string for Google IMA / Google DAI integrations.
21
+ */
22
+ altText: string;
23
+ /**
24
+ * The content of the ad, as HTML.
25
+ *
26
+ * @remarks
27
+ * <br/> - Available for StaticResource and HTMLResource in THEO ad system.
28
+ * <br/> - Available in the DAI ad system.
29
+ */
30
+ contentHTML: string;
31
+ /**
32
+ * The website of the advertisement.
33
+ *
34
+ * @remarks
35
+ * <br/> - Only available for StaticResource if specified by the VAST. Otherwise returns an empty string.
36
+ */
37
+ clickThrough?: string;
38
+ /**
39
+ * The height of the ad, in pixels.
40
+ *
41
+ * @remarks
42
+ * <br/> - Only available for IMA ad system and THEO ad system.
43
+ */
44
+ height: number;
45
+ /**
46
+ * The URI of the ad content as specified in the VAST file.
47
+ *
48
+ * @remarks
49
+ * <br/> - Only available in the THEO ad system for StaticResource. Otherwise returns an empty string.
50
+ */
51
+ resourceURI: string;
52
+ /**
53
+ * The width of the ad, in pixels.
54
+ *
55
+ * @remarks
56
+ * <br/> - Only available for IMA ad system and THEO ad system.
57
+ */
58
+ width: number;
59
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The Google DAI API.
3
+ *
4
+ * @public
5
+ */
6
+ export interface GoogleDAI {
7
+ /**
8
+ * Returns the content time without ads for a given stream time. Returns the given stream time for live streams.
9
+ *
10
+ * @param time - The stream time with inserted ads (in seconds).
11
+ */
12
+ contentTimeForStreamTime(time: number): Promise<number>;
13
+ /**
14
+ * Returns the stream time with ads for a given content time. Returns the given content time for live streams.
15
+ *
16
+ * @param time - The content time without any ads (in seconds).
17
+ */
18
+ streamTimeForContentTime(time: number): Promise<number>;
19
+ /**
20
+ * Whether snapback is enabled. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.
21
+ *
22
+ * @defaultValue `true`
23
+ */
24
+ readonly snapback: Promise<boolean>;
25
+ /**
26
+ * Set snapback value. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.
27
+ */
28
+ setSnapback(enabled: boolean): void;
29
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Represents a Google IMA creative compliant to the VAST specification.
3
+ *
4
+ * @remarks
5
+ * <br/> - Available since v2.60.0.
6
+ *
7
+ * @public
8
+ */
9
+ import type { Ad } from './Ad';
10
+ export interface GoogleImaAd extends Ad {
11
+ /**
12
+ * The bitrate of the currently playing creative as listed in the VAST response or 0.
13
+ */
14
+ readonly bitrate: number;
15
+ /**
16
+ * Record of custom parameters for the ad at the time of ad trafficking.
17
+ * Each entry contains a parameter name with associated value.
18
+ *
19
+ * @remarks
20
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
21
+ */
22
+ traffickingParameters: {
23
+ [parameterKey: string]: string;
24
+ } | undefined;
25
+ /**
26
+ * Return title of the advertisement.
27
+ *
28
+ * @remarks
29
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
30
+ */
31
+ title: string | undefined;
32
+ /**
33
+ * The custom parameters for the ad at the time of ad trafficking, as a string.
34
+ *
35
+ * @remarks
36
+ * <br/> - A parsed version is available as {@link GoogleImaAd.traffickingParameters}.
37
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
38
+ */
39
+ traffickingParametersString: string | undefined;
40
+ /**
41
+ * List of wrapper ad identifiers as specified in the VAST response.
42
+ */
43
+ wrapperAdIds: string[];
44
+ /**
45
+ * List of wrapper ad systems as specified in the VAST response.
46
+ */
47
+ wrapperAdSystems: string[];
48
+ /**
49
+ * List of wrapper creative identifiers.
50
+ *
51
+ * @remarks
52
+ * <br/> - Starts with the first wrapper ad.
53
+ */
54
+ wrapperCreativeIds: string[];
55
+ /**
56
+ * The url of the chosen media file.
57
+ *
58
+ * @remarks
59
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
60
+ */
61
+ mediaUrl: string | undefined;
62
+ /**
63
+ * The content type of the ad.
64
+ *
65
+ * @remarks
66
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
67
+ * <br/> - For linear ads, the content type is only going to be available after the `'adbegin'` event, when the media file is selected.
68
+ */
69
+ contentType: string | undefined;
70
+ /**
71
+ * The identifier of the API framework needed to execute the ad.
72
+ *
73
+ * @remarks
74
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
75
+ * <br/> - This corresponds with the apiFramework specified in vast.
76
+ */
77
+ apiFramework: string | undefined;
78
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Describes the configuration of Google IMA.
3
+ *
4
+ * @internal
5
+ */
6
+ export interface GoogleImaConfiguration {
7
+ /**
8
+ * Whether the native (mobile) IMA implementation will be used.
9
+ *
10
+ * @internal
11
+ */
12
+ useNativeIma: boolean;
13
+ }
@@ -0,0 +1,8 @@
1
+ export * from './Ad';
2
+ export * from './AdBreak';
3
+ export * from './AdsConfiguration';
4
+ export * from './AdsAPI';
5
+ export * from './CompanionAd';
6
+ export * from './GoogleDai';
7
+ export * from './GoogleImaAd';
8
+ export * from './GoogleImaConfiguration';
@@ -1,7 +1,11 @@
1
+ export * from './abr/barrel';
2
+ export * from './ads/barrel';
3
+ export * from './config/barrel';
1
4
  export * from './error/barrel';
2
5
  export * from './event/barrel';
6
+ export * from './drm/barrel';
3
7
  export * from './source/barrel';
4
8
  export * from './timeranges/barrel';
5
9
  export * from './track/barrel';
6
- export * from './config/barrel';
10
+ export * from './utils/barrel';
7
11
  export * from './THEOplayerView';
@@ -1,4 +1,9 @@
1
+ import type { AdsConfiguration } from "../ads/AdsConfiguration";
1
2
  export interface PlayerConfiguration {
3
+ /**
4
+ * The ads configuration for the player.
5
+ */
6
+ ads?: AdsConfiguration;
2
7
  /**
3
8
  * The license for the player
4
9
  */
@@ -0,0 +1,5 @@
1
+ import type { KeySystemId } from 'react-native-theoplayer';
2
+ import type { ContentProtectionIntegrationFactory } from './ContentProtectionIntegrationFactory';
3
+ export interface ContentProtectionAPI {
4
+ registerContentProtectionIntegration(integrationId: string, keySystem: KeySystemId, integrationFactory: ContentProtectionIntegrationFactory): void;
5
+ }
@@ -0,0 +1,86 @@
1
+ import type { CertificateRequest, LicenseRequest } from './ContentProtectionRequest';
2
+ import type { CertificateResponse, LicenseResponse } from './ContentProtectionResponse';
3
+ /**
4
+ * A synchronous or asynchronous return type
5
+ *
6
+ * @public
7
+ */
8
+ export declare type MaybeAsync<T> = T | PromiseLike<T>;
9
+ export declare type BufferSource = ArrayBufferView | ArrayBuffer;
10
+ /**
11
+ * This ContentProtectionIntegration defines some methods to alter license and certificate requests and responses.
12
+ *
13
+ * @public
14
+ */
15
+ export interface ContentProtectionIntegration {
16
+ /**
17
+ * Handler which will be called when a HTTP request for a new certificate is about to be sent.
18
+ *
19
+ * @remarks
20
+ * If a valid certificate was provided as part of the {@link KeySystemConfiguration.certificate}, this handler will not be called.
21
+ * The handler must return either a request or a raw certificate. When a (possibly modified) request is returned,
22
+ * the player will send that request instead of the original request. When a raw certificate is returned,
23
+ * the request is skipped entirely and the certificate is used directly. If no handler is provided, the player sends the original request.
24
+ *
25
+ * For example, an integration may want to “wrap” the request body in a different format (e.g. JSON or XML) for
26
+ * certain DRM vendors, or add additional authentication tokens to the request.
27
+ * Alternatively, an integration may want to send the HTTP request using its own network stack,
28
+ * and return the final certificate response to the player.
29
+ *
30
+ * @param request - The {@link CertificateRequest} that is about to be sent.
31
+ */
32
+ onCertificateRequest?(request: CertificateRequest): MaybeAsync<Partial<CertificateRequest> | BufferSource>;
33
+ /**
34
+ * Handler which will be called when a HTTP request for a certificate returns a response.
35
+ *
36
+ * @remarks
37
+ * The handler will be called regardless of the HTTP status code on the response (i.e. also for unsuccessful statuses outside of the 200-299 range).
38
+ * The handler must return the raw certificate, in a manner suitable for further processing by the CDM.
39
+ * If no handler is provided, the player uses the response body as raw certificate, but only if the response’s status indicates success.
40
+ *
41
+ * For example, an integration may want to “unwrap” a wrapped JSON or XML response body, turning it into a raw certificate.
42
+ *
43
+ * @param response - The {@link CertificateResponse} that was returned from the certificate request.
44
+ */
45
+ onCertificateResponse?(response: CertificateResponse): MaybeAsync<BufferSource>;
46
+ /**
47
+ * Handler which will be called when a HTTP request for a new license is about to be sent.
48
+ *
49
+ * @remarks
50
+ * The handler must return either a request or a raw license. When a (possibly modified) request is returned,
51
+ * the player will send that request instead of the original request. When a raw license is returned,
52
+ * the request is skipped entirely and the license is used directly. If no handler is provided, the player sends the original request.
53
+ *
54
+ * For example, an integration may want to “wrap” the request body in a different format (e.g. JSON or XML) for certain DRM vendors,
55
+ * or add additional authentication tokens to the request. Alternatively, an integration may want to send the HTTP request using its own network stack,
56
+ * and return the final license response to the player.
57
+ *
58
+ * @param request - The {@link LicenseRequest} that is about to be sent.
59
+ */
60
+ onLicenseRequest?(request: LicenseRequest): MaybeAsync<Partial<LicenseRequest> | BufferSource>;
61
+ /**
62
+ * Handler which will be called when a HTTP request for a license returns an response.
63
+ *
64
+ * @remarks
65
+ * The handler will be called regardless of the HTTP status code on the response (i.e. also for unsuccessful statuses outside of the 200-299 range).
66
+ * The handler must return the raw license, in a manner suitable for further processing by the CDM.
67
+ * If no handler is provided, the player uses the response body as raw license, but only if the response’s status indicates success.
68
+ *
69
+ * For example, an integration may want to “unwrap” a wrapped JSON or XML response body, turning it into a raw license.
70
+ *
71
+ * @param response - The {@link LicenseResponse} that was returned from the license request.
72
+ */
73
+ onLicenseResponse?(response: LicenseResponse): MaybeAsync<BufferSource>;
74
+ /**
75
+ * A function to extract the Fairplay content ID from the key URI, as given by the URI attribute of the `#EXT-X-KEY` tag in the HLS playlist (m3u8).
76
+ *
77
+ * @remarks
78
+ * In order to start a Fairplay license request, the player must provide the initialization data, the content ID and the certificate to the CDM.
79
+ * The content ID is usually contained in the key URI in some vendor-specific way, for example in the host name (e.g. `skd://123456789`)
80
+ * or in the URL query (e.g. `skd://vendor?123456789`). This function should extract this content ID from the key URI.
81
+ * This method is required only for Fairplay integrations. It is ignored for other key systems.
82
+ *
83
+ * @param skdUrl - The key URI.
84
+ */
85
+ extractFairplayContentId?(skdUrl: string): MaybeAsync<string>;
86
+ }
@@ -0,0 +1,15 @@
1
+ import type { ContentProtectionIntegration } from './ContentProtectionIntegration';
2
+ import type { DRMConfiguration } from 'react-native-theoplayer';
3
+ /**
4
+ * Factory pattern to create {@link ContentProtectionIntegration}s.
5
+ *
6
+ * @public
7
+ */
8
+ export interface ContentProtectionIntegrationFactory {
9
+ /**
10
+ * Build a new {@link ContentProtectionIntegration} based on the given {@link DRMConfiguration}.
11
+ *
12
+ * @param configuration - The {@link DRMConfiguration} of the currently loading source.
13
+ */
14
+ build(configuration: DRMConfiguration): ContentProtectionIntegration;
15
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * A request, either for a certificate or a license.
3
+ * @public
4
+ */
5
+ export interface ContentProtectionRequest {
6
+ /**
7
+ * The URL for the certificate server. By default, this will equal the certificate URL configured in the
8
+ * `{@link KeySystemConfiguration}`.
9
+ */
10
+ url: string;
11
+ /**
12
+ * The method of the HTTP request, for example: GET, POST or PUT.
13
+ *
14
+ * @remarks
15
+ * <br/> - Will be equal to GET for Fairplay certificate requests and POST for Widevine certificate requests.
16
+ * <br/> - Will be equal to POST for all license requests.
17
+ */
18
+ method: string;
19
+ /**
20
+ * The HTTP request headers to be sent to the server.
21
+ */
22
+ headers: {
23
+ [headerName: string]: string;
24
+ };
25
+ /**
26
+ * The body of the certificate request.
27
+ *
28
+ * @remarks
29
+ * <br/> - For GET requests (such as with Fairplay), the body will be empty (null).
30
+ * <br/> - For POST requests (such as with Widevine): the body will contain the two bytes in an array as specified in the certificate request protocol.
31
+ */
32
+ body: Uint8Array | null;
33
+ /**
34
+ * Whether the player is allowed to use credentials for cross-origin requests.
35
+ */
36
+ useCredentials: boolean;
37
+ }
38
+ /**
39
+ * A request for a certificate.
40
+ *
41
+ * @public
42
+ */
43
+ export declare type CertificateRequest = ContentProtectionRequest;
44
+ /**
45
+ * A request for a license.
46
+ * @public
47
+ */
48
+ export interface LicenseRequest extends ContentProtectionRequest {
49
+ /**
50
+ * The SKD URL (for example skd://fb64ba7c5bd34bf188cf9ba76ab8370e) as extracted from the #EXT-X-KEY tag in the HLS playlist.
51
+ *
52
+ * @remarks
53
+ * <br/> - Only available for Fairplay license requests. The value will be `undefined` otherwise.
54
+ */
55
+ fairplaySkdUrl: string | undefined;
56
+ }
@@ -0,0 +1,56 @@
1
+ import type { CertificateRequest, ContentProtectionRequest, LicenseRequest } from './ContentProtectionRequest';
2
+ /**
3
+ * The response, either of a license or for a certificate request.
4
+ * @public
5
+ */
6
+ export interface ContentProtectionResponse {
7
+ /**
8
+ * The request for which the response is being returned.
9
+ */
10
+ request: ContentProtectionRequest;
11
+ /**
12
+ * The URL from which the response was returned. This might have been redirected transparently.
13
+ */
14
+ url: string;
15
+ /**
16
+ * The status code as returned in the HTTP response.
17
+ */
18
+ status: number;
19
+ /**
20
+ * The status text as returned in the HTTP response.
21
+ */
22
+ statusText: string;
23
+ /**
24
+ * The HTTP headers as returned by the server.
25
+ *
26
+ * @remarks
27
+ * <br/> - On web not all headers might be shown due to Cross Origin Resource Sharing restrictions.
28
+ */
29
+ headers: {
30
+ [headerName: string]: string;
31
+ };
32
+ /**
33
+ * The body of the response.
34
+ */
35
+ body: Uint8Array;
36
+ }
37
+ /**
38
+ * The response of a certificate request.
39
+ * @public
40
+ */
41
+ export interface CertificateResponse extends ContentProtectionResponse {
42
+ /**
43
+ * The request for which the response is being returned.
44
+ */
45
+ request: CertificateRequest;
46
+ }
47
+ /**
48
+ * The response of a license request.
49
+ * @public
50
+ */
51
+ export interface LicenseResponse extends ContentProtectionResponse {
52
+ /**
53
+ * The request for which the response is being returned.
54
+ */
55
+ request: LicenseRequest;
56
+ }
@@ -0,0 +1,5 @@
1
+ export * from './ContentProtectionAPI';
2
+ export * from './ContentProtectionIntegration';
3
+ export * from './ContentProtectionIntegrationFactory';
4
+ export * from './ContentProtectionRequest';
5
+ export * from './ContentProtectionResponse';
@@ -0,0 +1,13 @@
1
+ import type { Ad, AdBreak } from 'react-native-theoplayer';
2
+ export interface AdEvent {
3
+ /**
4
+ * Type of ad event.
5
+ */
6
+ type: AdEventType;
7
+ /**
8
+ * The ad or adbreak for which the event was dispatched.
9
+ */
10
+ ad: Ad | AdBreak;
11
+ }
12
+ export declare const AdEventNames: readonly ["addadbreak", "removeadbreak", "adloaded", "adbreakbegin", "adbreakend", "adbreakchange", "updateadbreak", "addad", "adbegin", "adend", "updatead", "adloaded", "adfirstquartile", "admidpoint", "adthirdquartile", "adskip", "adimpression", "aderror", "admetadata", "adbuffering"];
13
+ export declare type AdEventType = typeof AdEventNames[number];
@@ -1,2 +1,3 @@
1
1
  export * from './PlayerEvent';
2
2
  export * from './TrackEvent';
3
+ export * from './AdEvent';
@@ -10,6 +10,7 @@ import type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration
10
10
  import type { DRMConfiguration } from './drm/DRMConfiguration';
11
11
  import type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';
12
12
  import type { AdDescription } from './ads/Ads';
13
+ import type { ServerSideAdInsertionConfiguration } from "./ads/ssai/ServerSideAdInsertionConfiguration";
13
14
  export declare type Source = TypedSource;
14
15
  /**
15
16
  * A media resource or list of media resources.
@@ -265,4 +266,11 @@ export interface TypedSource extends BaseSource {
265
266
  * <br/> - Available since v2.15.0.
266
267
  */
267
268
  contentProtection?: DRMConfiguration;
269
+ /**
270
+ * The Server-side Ad Insertion parameters for the media resource.
271
+ *
272
+ * @remarks
273
+ * <br/> - Available since v2.12.0.
274
+ */
275
+ ssai?: ServerSideAdInsertionConfiguration;
268
276
  }
@@ -0,0 +1,85 @@
1
+ import type { AdDescription } from "./Ads";
2
+ /**
3
+ * The possible ad unit types, represented by a value from the following list:
4
+ * <br/> - `'preroll'`: The linear ad will play before the content started.
5
+ * <br/> - `'midroll'`: The linear ad will play at a time offset during the content.
6
+ * <br/> - `'postroll'`: The linear ad will play after the content ended.
7
+ * <br/> - `'overlay'`: The non-linear ad.
8
+ *
9
+ * @public
10
+ */
11
+ export declare type FreeWheelAdUnitType = 'preroll' | 'midroll' | 'postroll' | 'overlay';
12
+ /**
13
+ * Represents a FreeWheel cue.
14
+ *
15
+ * @public
16
+ */
17
+ export interface FreeWheelCue {
18
+ /**
19
+ * The ad unit type.
20
+ */
21
+ adUnit: FreeWheelAdUnitType;
22
+ /**
23
+ * Offset after which the ad break will start, in seconds.
24
+ */
25
+ timeOffset: number;
26
+ }
27
+ /**
28
+ * Describes a FreeWheel ad break request.
29
+ *
30
+ * @remarks
31
+ * <br/> - Available since v2.42.0.
32
+ *
33
+ * @public
34
+ */
35
+ export interface FreeWheelAdDescription extends AdDescription {
36
+ /**
37
+ * The integration of this ad break.
38
+ */
39
+ integration: 'freewheel';
40
+ /**
41
+ * The FreeWheel ad server URL.
42
+ */
43
+ adServerUrl: string;
44
+ /**
45
+ * The duration of the asset, in seconds.
46
+ *
47
+ * @remarks
48
+ * <br/> - Optional for live assets.
49
+ */
50
+ assetDuration?: number;
51
+ /**
52
+ * The identifier of the asset.
53
+ *
54
+ * @remarks
55
+ * <br/> - Generated by FreeWheel CMS when an asset is uploaded.
56
+ */
57
+ assetId?: string;
58
+ /**
59
+ * The network identifier which is associated with a FreeWheel customer.
60
+ */
61
+ networkId: number;
62
+ /**
63
+ * The server side configuration profile.
64
+ *
65
+ * @remarks
66
+ * <br/> - Used to indicate desired player capabilities.
67
+ */
68
+ profile: string;
69
+ /**
70
+ * The identifier of the video player's location.
71
+ */
72
+ siteSectionId?: string;
73
+ /**
74
+ * List of cue points.
75
+ *
76
+ * @remarks
77
+ * <br/> - Not available in all FreeWheel modes.
78
+ */
79
+ cuePoints?: FreeWheelCue[];
80
+ /**
81
+ * A record of query string parameters added to the FreeWheel ad break request.
82
+ * Each entry contains the parameter name with associated value.
83
+ */
84
+ customData?: Record<string, string>;
85
+ }
@@ -0,0 +1,25 @@
1
+ import type { AdDescription, AdSource } from "./Ads";
2
+ /**
3
+ * Describes a Google IMA ad break request.
4
+ *
5
+ * @public
6
+ */
7
+ export interface IMAAdDescription extends AdDescription {
8
+ /**
9
+ * The integration of this ad break.
10
+ */
11
+ integration: 'google-ima';
12
+ /**
13
+ * The source of the ad
14
+ *
15
+ * @remarks
16
+ * <br/> - VAST, VMAP and VPAID are supported.
17
+ */
18
+ sources: string | AdSource;
19
+ /**
20
+ * Optional settings object for mapping verification vendors (google.ima.OmidVerificationVendor) to OMID Access Modes (google.ima.OmidAccessMode).
21
+ */
22
+ omidAccessModeRules?: {
23
+ [key: number]: string;
24
+ };
25
+ }