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,4 @@
1
+ export class WebContentProtectionRegistry {
2
+ registerContentProtectionIntegration(integrationId: any, keySystem: any, integrationFactory: any): void;
3
+ }
4
+ export const ContentProtectionRegistry: WebContentProtectionRegistry;
@@ -0,0 +1,17 @@
1
+ export function fromNativeCertificateRequest(request: any): {
2
+ url: any;
3
+ method: any;
4
+ headers: any;
5
+ useCredentials: any;
6
+ body: Uint8Array | null;
7
+ };
8
+ export function toNativeCertificateRequest(requestId: any, integrationId: any, keySystemId: any, request: any): {
9
+ requestId: any;
10
+ integrationId: any;
11
+ keySystemId: any;
12
+ url: any;
13
+ method: any;
14
+ headers: any;
15
+ useCredentials: any;
16
+ base64body: string | null;
17
+ };
@@ -0,0 +1,20 @@
1
+ export function fromNativeCertificateResponse(response: any): {
2
+ url: any;
3
+ status: any;
4
+ statusText: any;
5
+ headers: any;
6
+ body: Uint8Array;
7
+ request: {
8
+ url: any;
9
+ method: any;
10
+ headers: any;
11
+ useCredentials: any;
12
+ body: Uint8Array | null;
13
+ };
14
+ };
15
+ export function toNativeCertificateResponseResult(requestId: any, integrationId: any, keySystemId: any, response: any): {
16
+ requestId: any;
17
+ integrationId: any;
18
+ keySystemId: any;
19
+ base64body: string;
20
+ };
@@ -0,0 +1,19 @@
1
+ export function fromNativeLicenseRequest(request: any): {
2
+ url: any;
3
+ method: any;
4
+ headers: any;
5
+ useCredentials: any;
6
+ body: Uint8Array | null;
7
+ fairplaySkdUrl: any;
8
+ };
9
+ export function toNativeLicenseRequest(requestId: any, integrationId: any, keySystemId: any, request: any): {
10
+ requestId: any;
11
+ integrationId: any;
12
+ keySystemId: any;
13
+ url: any;
14
+ method: any;
15
+ headers: any;
16
+ useCredentials: any;
17
+ base64body: string | null;
18
+ fairplaySkdUrl: any;
19
+ };
@@ -0,0 +1,21 @@
1
+ export function fromNativeLicenseResponse(response: any): {
2
+ url: any;
3
+ status: any;
4
+ statusText: any;
5
+ headers: any;
6
+ body: Uint8Array;
7
+ request: {
8
+ url: any;
9
+ method: any;
10
+ headers: any;
11
+ useCredentials: any;
12
+ body: Uint8Array | null;
13
+ fairplaySkdUrl: any;
14
+ };
15
+ };
16
+ export function toNativeLicenseResponseResult(requestId: any, integrationId: any, keySystemId: any, response: any): {
17
+ requestId: any;
18
+ integrationId: any;
19
+ keySystemId: any;
20
+ base64body: string;
21
+ };
@@ -0,0 +1,5 @@
1
+ export function decodeNanInf(v: any): any;
2
+ export function arrayContainsElement_(array: any, element: any): boolean;
3
+ export function isBufferSource(bufferSource: any): boolean;
4
+ export const objectToString: () => string;
5
+ export const isArrayBufferView_: (arg: any) => arg is ArrayBufferView;
@@ -27,3 +27,5 @@ export function fromNativeMediaTrack(track: any): {
27
27
  qualities: any;
28
28
  targetQuality: any;
29
29
  };
30
+ export function findNativeQualityByUid(mediaTrack: any, uid: any): any;
31
+ export function findNativeQualitiesByUid(mediaTrack: any, uid: any): any;
@@ -2,13 +2,22 @@ import type { SourceDescription } from './source/SourceDescription';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { DurationChangeEvent, ErrorEvent, LoadedMetadataEvent, ReadyStateChangeEvent, TimeUpdateEvent, ProgressEvent, SegmentNotFoundEvent } from './event/PlayerEvent';
4
4
  import type { TextTrackEvent, TextTrackListEvent } from './event/TrackEvent';
5
- import type { HostComponent } from 'react-native';
6
5
  import type { PlayerConfiguration } from './config/PlayerConfiguration';
6
+ import type { ABRConfiguration } from './abr/ABRConfiguration';
7
+ import type { AdEvent } from "./event/AdEvent";
8
+ import type { AdsAPI } from "./ads/AdsAPI";
7
9
  export interface THEOplayerViewProps {
8
10
  /**
9
11
  * The player configuration with THEOplayer license.
10
12
  */
11
13
  config?: PlayerConfiguration;
14
+ /**
15
+ * The player's adaptive bitrate (ABR) configuration.
16
+ *
17
+ * @remarks
18
+ * <br/> - This property is supported on Android & Web platforms only.
19
+ */
20
+ abrConfig?: ABRConfiguration;
12
21
  /**
13
22
  * A source description that determines the current media resource.
14
23
  */
@@ -56,6 +65,10 @@ export interface THEOplayerViewProps {
56
65
  * Used to set the current selected video track by passing its `uid`, or `null` to select none.
57
66
  */
58
67
  selectedVideoTrack?: number | null;
68
+ /**
69
+ * Used to set the current selected video quality by passing its `uid`, or `null` to select none.
70
+ */
71
+ targetVideoQuality?: number | number[] | undefined;
59
72
  /**
60
73
  * Used to set the current selected audio track by passing its `uid`, or `null` to select none.
61
74
  */
@@ -136,7 +149,7 @@ export interface THEOplayerViewProps {
136
149
  */
137
150
  onSeeking?: () => void;
138
151
  /**
139
- * Invoked when a seek operation completed and the current playback position has changed
152
+ * Invoked when a seek operation completed and the current playback position has changed.
140
153
  */
141
154
  onSeeked?: () => void;
142
155
  /**
@@ -145,7 +158,7 @@ export interface THEOplayerViewProps {
145
158
  */
146
159
  onEnded?: () => void;
147
160
  /**
148
- * Invoked when the current playback position changed.
161
+ * Invoked each time the current playback position changed.
149
162
  */
150
163
  onTimeUpdate?: (event: TimeUpdateEvent) => void;
151
164
  /**
@@ -167,12 +180,20 @@ export interface THEOplayerViewProps {
167
180
  * Invoked when a text track event occurs.
168
181
  */
169
182
  onTextTrackEvent?: (event: TextTrackEvent) => void;
183
+ /**
184
+ * Invoked when an ad event occurs.
185
+ */
186
+ onAdEvent?: (event: AdEvent) => void;
170
187
  }
171
- export interface THEOplayerViewComponent extends HostComponent<THEOplayerViewProps> {
188
+ export interface THEOplayerViewComponent {
172
189
  /**
173
190
  * Seek to a new position.
174
191
  *
175
192
  * @param seekTime - new time, in milliseconds.
176
193
  */
177
194
  seek: (seekTime: number) => void;
195
+ /**
196
+ * The API for advertisements.
197
+ */
198
+ ads: AdsAPI;
178
199
  }
@@ -0,0 +1,95 @@
1
+ /**
2
+ * The adaptive bitrate strategy of the first segment, represented by a value from the following list:
3
+ * <br/> - `'performance'`: The player will optimize ABR behavior to focus on the performance of the player. This strategy initiates playback with the lowest quality suitable for the device which means faster start-up time.
4
+ * <br/> - `'quality'`: The player will optimize ABR behavior to focus displaying the best visual quality to the end-user. This strategy initiates playback with the highest bit rate suitable for the device.
5
+ * <br/> - `'bandwidth'`: The player will optimize the ABR behavior to focus on displaying the most optimal quality based on historic data of available bandwidth and knowledge of the network conditions.
6
+ *
7
+ * @public
8
+ */
9
+ export declare type ABRStrategyType = 'performance' | 'quality' | 'bandwidth';
10
+ /**
11
+ * Describes the metadata of the adaptive bitrate strategy.
12
+ *
13
+ * @public
14
+ */
15
+ export interface ABRMetadata {
16
+ /**
17
+ * The initial bitrate, in bits per second.
18
+ *
19
+ * @defaultValue Bitrate available to the browser.
20
+ */
21
+ bitrate?: number;
22
+ }
23
+ /**
24
+ * Describes the configuration of the adaptive bitrate strategy.
25
+ *
26
+ * @public
27
+ */
28
+ export interface ABRStrategyConfiguration {
29
+ /**
30
+ * The strategy for initial playback.
31
+ */
32
+ type: ABRStrategyType;
33
+ /**
34
+ * The metadata for the initial playback strategy.
35
+ *
36
+ * @defaultValue A {@link ABRMetadata} object with default values.
37
+ */
38
+ metadata?: ABRMetadata;
39
+ }
40
+ /**
41
+ * The adaptive bitrate stratey.
42
+ *
43
+ * @public
44
+ */
45
+ export declare type ABRStrategy = ABRStrategyConfiguration | ABRStrategyType;
46
+ /**
47
+ * Describes the adaptive bitrate configuration.
48
+ *
49
+ * @public
50
+ */
51
+ export interface ABRConfiguration {
52
+ /**
53
+ * The adaptive bitrate strategy.
54
+ *
55
+ * @defaultValue `'bandwidth'`
56
+ */
57
+ strategy?: ABRStrategy;
58
+ /**
59
+ * The amount which the player should buffer ahead of the current playback position, in seconds.
60
+ *
61
+ * @remarks
62
+ * <br/> - Before v4.3.0: This duration has a maximum of 60 seconds.
63
+ * <br/> - After v4.3.0: This duration has no maximum.
64
+ * <br/> - The player might reduce or ignore the configured amount because of device or performance constraints.
65
+ *
66
+ * @defaultValue `20`
67
+ */
68
+ targetBuffer?: number;
69
+ /**
70
+ * The amount of data which the player should keep in its buffer before the current playback position, in seconds.
71
+ * This configuration option can be used to reduce the memory footprint on memory restricted devices or on devices
72
+ * which don't automatically prune decoder buffers.
73
+ *
74
+ * Note that the player can decide to keep less data in the decoder buffer in case memory is running low.
75
+ * A value of 0 or lower is not accepted and will be treated as default.
76
+ *
77
+ * @defaultValue `30`
78
+ *
79
+ * @remarks
80
+ * <br/> - This property is currently supported on Web platforms only.
81
+ */
82
+ bufferLookbackWindow?: number;
83
+ /**
84
+ * The maximum length of the player's buffer, in seconds.
85
+ *
86
+ * The player will initially buffer up to {@link ABRConfiguration.targetBuffer} seconds of media data.
87
+ * If the player detects that the decoder is unable to hold so much data,
88
+ * it will reduce `maxBufferLength` and restrict `targetBuffer` to be less than
89
+ * this maximum.
90
+ *
91
+ * @remarks
92
+ * <br/> - This property is currently supported on Web platforms only.
93
+ */
94
+ readonly maxBufferLength?: number;
95
+ }
@@ -0,0 +1 @@
1
+ export * from './ABRConfiguration';
@@ -0,0 +1,238 @@
1
+ /**
2
+ * Represents a VAST creative. It is either a linear or non-linear ad.
3
+ *
4
+ * @public
5
+ */
6
+ import type { AdBreak } from './AdBreak';
7
+ import type { CompanionAd } from 'theoplayer';
8
+ export interface Ad {
9
+ /**
10
+ * The source ad server information included in the ad response.
11
+ *
12
+ * @remarks
13
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
14
+ */
15
+ adSystem: string | undefined;
16
+ /**
17
+ * The integration of the ad, represented by a value from the following list:
18
+ * <br/> - `'theo'`
19
+ * <br/> - `'google-ima'`
20
+ * <br/> - `'google-dai'`
21
+ * <br/> - `'freewheel'`
22
+ *
23
+ * @defaultValue `'theo'`
24
+ */
25
+ integration?: string;
26
+ /**
27
+ * The type of the ad, represented by a value from the following list:
28
+ * <br/> - `'linear'`
29
+ * <br/> - `'nonlinear'`
30
+ */
31
+ type: string;
32
+ /**
33
+ * The identifier of the creative.
34
+ *
35
+ * @remarks
36
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
37
+ */
38
+ id: string | undefined;
39
+ /**
40
+ * The ready state of the ad.
41
+ */
42
+ readyState?: AdReadyState;
43
+ /**
44
+ * The ad break which the ad is part of.
45
+ *
46
+ * @remarks
47
+ * <br/> - Available for VAST-ads.
48
+ */
49
+ adBreak: AdBreak;
50
+ /**
51
+ * The duration of the ad, in seconds.
52
+ *
53
+ * @remarks
54
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
55
+ * <br/> - Only available for LinearAd.
56
+ */
57
+ duration?: number;
58
+ /**
59
+ * The width of the ad, in pixels.
60
+ *
61
+ * @remarks
62
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
63
+ */
64
+ width: number | undefined;
65
+ /**
66
+ * The height of the ad.
67
+ *
68
+ * @remarks
69
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
70
+ */
71
+ height: number | undefined;
72
+ /**
73
+ * The URI of the the ad content.
74
+ *
75
+ * @remarks
76
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
77
+ */
78
+ resourceURI?: string;
79
+ /**
80
+ * The website of the advertisement.
81
+ *
82
+ * @remarks
83
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
84
+ */
85
+ clickThrough: string | undefined;
86
+ /**
87
+ * List of companions which can be displayed outside the player.
88
+ *
89
+ * @remarks
90
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
91
+ * <br/> - Only supported for `'theo'` and `'google-dai'`.
92
+ */
93
+ companions: CompanionAd[];
94
+ /**
95
+ * Offset after which the ad break may be skipped, in seconds.
96
+ *
97
+ * @remarks
98
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
99
+ * <br/> - If the offset is -1, the ad is unskippable.
100
+ * <br/> - If the offset is 0, the ad is immediately skippable.
101
+ * <br/> - Otherwise it must be a positive number indicating the offset.
102
+ */
103
+ skipOffset: number | undefined;
104
+ /**
105
+ * The identifier of the selected creative for the ad.
106
+ *
107
+ * @remarks
108
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
109
+ */
110
+ creativeId: string | undefined;
111
+ /**
112
+ * The list of universal ad ID information of the selected creative for the ad.
113
+ *
114
+ * @remarks
115
+ * <br/> - Only supported for `'theo'` and `'google-ima'`.
116
+ */
117
+ universalAdIds: UniversalAdId[];
118
+ }
119
+ /**
120
+ * The ad readiness state, represented by a value from the following list:
121
+ * <br/> - `'none'`: The ad not loaded state.
122
+ * <br/> - `'ready'`: The ad loaded state.
123
+ *
124
+ * @remarks
125
+ * <br/> - An ad is loaded when the ad resource (e.g. VAST file) is downloaded.
126
+ * <br/> - another remark
127
+ *
128
+ * @public
129
+ */
130
+ export declare type AdReadyState = 'none' | 'ready';
131
+ /**
132
+ * Represents the information regarding the universal identifier of an ad.
133
+ *
134
+ * @public
135
+ */
136
+ export interface UniversalAdId {
137
+ /**
138
+ * The registry associated with cataloging the UniversalAdId of the selected creative for the ad.
139
+ *
140
+ * @remarks
141
+ * <br/> - Returns the registry value, or 'unknown' if unavailable.
142
+ */
143
+ adIdRegistry: string;
144
+ /**
145
+ * The UniversalAdId of the selected creative for the ad.
146
+ *
147
+ * @remarks
148
+ * <br/> - Returns the id value or 'unknown' if unavailable.
149
+ */
150
+ adIdValue: string;
151
+ }
152
+ /**
153
+ * Represents a non-linear ad in the VAST specification.
154
+ *
155
+ * @public
156
+ */
157
+ export interface NonLinearAd extends Ad {
158
+ /**
159
+ * The alternative description for the ad.
160
+ *
161
+ * @remarks
162
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
163
+ */
164
+ altText: string | undefined;
165
+ /**
166
+ * The website of the ad.
167
+ *
168
+ * @remarks
169
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
170
+ */
171
+ clickThrough: string | undefined;
172
+ /**
173
+ * The HTML-string with the content of the ad.
174
+ *
175
+ * @remarks
176
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
177
+ */
178
+ contentHTML: string | undefined;
179
+ }
180
+ /**
181
+ * The delivery type of the ad content file, represented by a value from the following list:
182
+ * <br/> - `'progressive'`: Delivered through progressive download protocols (e.g. HTTP).
183
+ * <br/> - `'streaming'`: Delivered through streaming download protocols.
184
+ *
185
+ * @remarks
186
+ * <br/> - `'streaming'` is currently not supported.
187
+ *
188
+ * @public
189
+ */
190
+ export declare type DeliveryType = 'progressive' | 'streaming';
191
+ /**
192
+ * Represents metadata of an media file with ad content.
193
+ *
194
+ * @remarks
195
+ * <br/> - This metadata is retrieved from the VAST file.
196
+ *
197
+ * @public
198
+ */
199
+ export interface MediaFile {
200
+ /**
201
+ * The delivery type of the video file.
202
+ */
203
+ delivery: DeliveryType;
204
+ /**
205
+ * The MIME type for the file container.
206
+ */
207
+ type: string;
208
+ /**
209
+ * The native width of the video file, in pixels.
210
+ */
211
+ width: number;
212
+ /**
213
+ * The native height of the video file, in pixels.
214
+ */
215
+ height: number;
216
+ /**
217
+ * The URI of the VAST content.
218
+ */
219
+ contentURL: string;
220
+ }
221
+ /**
222
+ * Represents a linear ad in the VAST specification.
223
+ *
224
+ * @public
225
+ */
226
+ export interface LinearAd extends Ad {
227
+ /**
228
+ * The duration of the ad, in seconds.
229
+ *
230
+ * @remarks
231
+ * <br/> - Available when the {@link Ad.readyState} is `'ready'`.
232
+ */
233
+ duration: number;
234
+ /**
235
+ * List of media files which contain metadata about ad video files.
236
+ */
237
+ mediaFiles: MediaFile[];
238
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Represents an ad break in the VMAP specification or an ad pod in the VAST specification.
3
+ *
4
+ * @public
5
+ */
6
+ import type { Ad } from './Ad';
7
+ export interface AdBreak {
8
+ /**
9
+ * The integration of the ad break, represented by a value from the following list:
10
+ * <br/> - `'theo'`
11
+ * <br/> - `'google-ima'`
12
+ * <br/> - `'google-dai'`
13
+ * <br/> - `'freewheel'`
14
+ */
15
+ integration: string | undefined;
16
+ /**
17
+ * List of ads which will be played sequentially at the ad break's time offset.
18
+ */
19
+ ads: Ad[] | undefined;
20
+ /**
21
+ * The time offset at which content will be paused to play the ad break, in seconds.
22
+ */
23
+ timeOffset: number;
24
+ /**
25
+ * The duration of the ad break, in seconds.
26
+ *
27
+ * @remarks
28
+ * <br/> - Ads are lazily loaded. This property becomes available when all ads are loaded.
29
+ */
30
+ maxDuration: number | undefined;
31
+ /**
32
+ * The remaining duration of the ad break, in seconds.
33
+ *
34
+ * @remarks
35
+ * <br/> - Ads are lazily loaded. This property becomes available when all ads are loaded.
36
+ * <br/> - This feature is not available in the Google IMA integration and will default to -1.
37
+ */
38
+ maxRemainingDuration: number | undefined;
39
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The API for advertisements.
3
+ */
4
+ import type { AdDescription } from "../source/ads/Ads";
5
+ import type { AdBreak } from "./AdBreak";
6
+ import type { Ad } from "./Ad";
7
+ import type { GoogleDAI } from "./GoogleDai";
8
+ export interface AdsAPI {
9
+ /**
10
+ * Whether a linear ad is currently playing.
11
+ */
12
+ playing(): Promise<boolean>;
13
+ /**
14
+ * Skip the current linear ad.
15
+ *
16
+ * @remarks
17
+ * <br/> - This will have no effect when the current linear ad is (not yet) skippable.
18
+ */
19
+ skip(): void;
20
+ /**
21
+ * The currently playing ad break.
22
+ */
23
+ currentAdBreak(): Promise<AdBreak>;
24
+ /**
25
+ * List of currently playing ads.
26
+ */
27
+ currentAds(): Promise<Ad[]>;
28
+ /**
29
+ * List of ad breaks which still need to be played.
30
+ */
31
+ scheduledAdBreaks(): Promise<AdBreak[]>;
32
+ /**
33
+ * Add an ad break request.
34
+ *
35
+ * @remarks
36
+ * <br/> - Prefer scheduling ad breaks up front through SourceConfiguration.ads.
37
+ */
38
+ schedule(ad: AdDescription): void;
39
+ /**
40
+ * The Google DAI API.
41
+ *
42
+ * @remarks
43
+ * <br/> - Only available when the feature or extension `'google-dai'` is enabled.
44
+ */
45
+ readonly dai?: GoogleDAI;
46
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Describes the configuration of advertisement.
3
+ *
4
+ * @public
5
+ */
6
+ import type { GoogleImaConfiguration } from './GoogleImaConfiguration';
7
+ export interface AdsConfiguration {
8
+ /**
9
+ * Allows configuring which mime types are allowed during ad playback.
10
+ *
11
+ * @remarks
12
+ * <br/> - This feature is only available for Google IMA.
13
+ * <br/> - If set to an array, all ads with another mime types will be ignored.
14
+ * <br/> - If set to `undefined` the ad system will pick media based on the browser's capabilities.
15
+ *
16
+ * @defaultValue `undefined`
17
+ */
18
+ allowedMimeTypes?: string[];
19
+ /**
20
+ * Whether an advertisement UI is shown.
21
+ *
22
+ * @defaultValue `true`
23
+ */
24
+ uiEnabled?: boolean;
25
+ /**
26
+ * Whether media files of mid- and postrolls are preloaded.
27
+ *
28
+ * @remarks
29
+ * <br/> - This feature is only available for Google IMA.
30
+ *
31
+ * @defaultValue `'midroll-and-postroll'`
32
+ */
33
+ preload?: AdPreloadType;
34
+ /**
35
+ * The iframe policy for VPAID ads.
36
+ *
37
+ * @remarks
38
+ * <br/> - This feature is only available for Google IMA and SpotX.
39
+ *
40
+ * @defaultValue `'enabled'`
41
+ */
42
+ vpaidMode?: VPAIDMode;
43
+ /**
44
+ * The Google IMA configuration.
45
+ *
46
+ * @internal
47
+ */
48
+ googleImaConfiguration?: GoogleImaConfiguration;
49
+ }
50
+ /**
51
+ * The ad preloading strategy, represented by a value from the following list:
52
+ * <br/> - `'none'`: Ads are not preloaded.
53
+ * <br/> - `'midroll-and-postroll'`: Mid- and postrolls are preloaded.
54
+ *
55
+ * @remarks
56
+ * <br/> - For Google IMA, preloading starts 4 seconds before ad playback.
57
+ *
58
+ * @public
59
+ */
60
+ export declare type AdPreloadType = 'none' | 'midroll-and-postroll';
61
+ /**
62
+ * The iframe policies for VPAID ads, represented by a value from the following list:
63
+ * <br/> - `'enabled'`: Ads will load in a cross domain iframe. This disables access to the site via JavaScript. Ads that require a friendly iframe will fail to play.
64
+ * <br/> - `'insecure'`: Ads will load in a friendly iframe. This allows access to the site via JavaScript.
65
+ * <br/> - `'disabled'`: Ads will error when requested.
66
+ *
67
+ * @public
68
+ */
69
+ export declare type VPAIDMode = 'enabled' | 'insecure' | 'disabled';