react-native-theoplayer 1.7.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +2 -0
  2. package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +115 -0
  3. package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +648 -0
  4. package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.kt +23 -0
  5. package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +446 -0
  6. package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.kt +117 -0
  7. package/android/src/main/java/com/theoplayer/{TimeUpdateRate.java → TimeUpdateRate.kt} +2 -2
  8. package/android/src/main/java/com/theoplayer/ads/AdAdapter.kt +161 -0
  9. package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.kt +90 -0
  10. package/android/src/main/java/com/theoplayer/ads/AdsModule.kt +140 -0
  11. package/android/src/main/java/com/theoplayer/cast/CastEventAdapter.kt +81 -0
  12. package/android/src/main/java/com/theoplayer/cast/CastModule.kt +75 -0
  13. package/android/src/main/java/com/theoplayer/drm/ContentProtectionAdapter.kt +2 -2
  14. package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +1 -2
  15. package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegration.kt +1 -2
  16. package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegrationFactory.kt +3 -5
  17. package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +402 -0
  18. package/android/src/main/java/com/theoplayer/track/MediaTrackEventType.kt +6 -0
  19. package/android/src/main/java/com/theoplayer/track/MediaTrackType.kt +6 -0
  20. package/android/src/main/java/com/theoplayer/track/QualityListAdapter.kt +43 -0
  21. package/android/src/main/java/com/theoplayer/track/QualityListFilter.kt +28 -0
  22. package/android/src/main/java/com/theoplayer/track/TextTrackCueEventType.kt +10 -0
  23. package/android/src/main/java/com/theoplayer/track/TrackEventType.kt +7 -0
  24. package/android/src/main/java/com/theoplayer/track/TrackListAdapter.kt +219 -0
  25. package/android/src/main/java/com/theoplayer/util/ViewResolver.kt +19 -0
  26. package/ios/THEOplayerRCTAdAggregator.swift +15 -6
  27. package/ios/THEOplayerRCTAdsAPI.swift +39 -40
  28. package/ios/THEOplayerRCTBridge.m +54 -1
  29. package/ios/THEOplayerRCTCastAPI.swift +275 -0
  30. package/ios/THEOplayerRCTDebug.swift +3 -0
  31. package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +91 -19
  32. package/ios/THEOplayerRCTTrackEventTypes.swift +17 -0
  33. package/ios/{THEOplayerRCTMetadataAggregator.swift → THEOplayerRCTTrackMetadataAggregator.swift} +69 -55
  34. package/ios/THEOplayerRCTView.swift +126 -22
  35. package/ios/THEOplayerRCTViewAdEventHandler.swift +7 -5
  36. package/ios/THEOplayerRCTViewCastEventHandler.swift +124 -0
  37. package/ios/THEOplayerRCTViewMainEventHandler.swift +1 -1
  38. package/ios/THEOplayerRCTViewMediaTrackEventHandler.swift +185 -0
  39. package/ios/THEOplayerRCTViewTextTrackEventHandler.swift +30 -13
  40. package/ios/custom/Frameworks/ios/put_custom_ios_xcframework_here.txt +1 -1
  41. package/ios/custom/Frameworks/tvos/put_custom_tvos_xcframework_here.txt +2 -0
  42. package/ios/custom/react-native-theoplayer_custom.podspec +46 -0
  43. package/lib/commonjs/api/THEOplayerView.js.map +1 -1
  44. package/lib/commonjs/api/barrel.js +21 -8
  45. package/lib/commonjs/api/barrel.js.map +1 -1
  46. package/lib/commonjs/api/cast/Airplay.js +6 -0
  47. package/lib/commonjs/api/cast/Airplay.js.map +1 -0
  48. package/lib/commonjs/api/cast/CastAPI.js +6 -0
  49. package/lib/commonjs/api/cast/CastAPI.js.map +1 -0
  50. package/lib/commonjs/api/cast/CastConfiguration.js +2 -0
  51. package/lib/commonjs/api/cast/CastConfiguration.js.map +1 -0
  52. package/lib/commonjs/api/cast/CastState.js +2 -0
  53. package/lib/commonjs/api/cast/CastState.js.map +1 -0
  54. package/lib/commonjs/api/cast/Chromecast.js +6 -0
  55. package/lib/commonjs/api/cast/Chromecast.js.map +1 -0
  56. package/lib/commonjs/api/cast/barrel.js +71 -0
  57. package/lib/commonjs/api/cast/barrel.js.map +1 -0
  58. package/lib/commonjs/api/config/PlayerConfiguration.js.map +1 -1
  59. package/lib/commonjs/api/error/ChromecastError.js +2 -0
  60. package/lib/commonjs/api/error/ChromecastError.js.map +1 -0
  61. package/lib/commonjs/api/error/barrel.js +13 -0
  62. package/lib/commonjs/api/error/barrel.js.map +1 -1
  63. package/lib/commonjs/api/event/CastEvent.js +21 -0
  64. package/lib/commonjs/api/event/CastEvent.js.map +1 -0
  65. package/lib/commonjs/api/event/TrackEvent.js +17 -1
  66. package/lib/commonjs/api/event/TrackEvent.js.map +1 -1
  67. package/lib/commonjs/api/event/barrel.js +25 -12
  68. package/lib/commonjs/api/event/barrel.js.map +1 -1
  69. package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
  70. package/lib/commonjs/api/source/barrel.js +13 -0
  71. package/lib/commonjs/api/source/barrel.js.map +1 -1
  72. package/lib/commonjs/api/source/metadata/MetadataDescription.js +2 -0
  73. package/lib/commonjs/api/source/metadata/MetadataDescription.js.map +1 -0
  74. package/lib/commonjs/api/source/metadata/barrel.js +19 -0
  75. package/lib/commonjs/api/source/metadata/barrel.js.map +1 -0
  76. package/lib/commonjs/internal/THEOplayerView.js +30 -0
  77. package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
  78. package/lib/commonjs/internal/THEOplayerView.web.js +80 -20
  79. package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
  80. package/lib/commonjs/internal/cast/THEOplayerNativeAirplay.js +34 -0
  81. package/lib/commonjs/internal/cast/THEOplayerNativeAirplay.js.map +1 -0
  82. package/lib/commonjs/internal/cast/THEOplayerNativeCastApi.js +46 -0
  83. package/lib/commonjs/internal/cast/THEOplayerNativeCastApi.js.map +1 -0
  84. package/lib/commonjs/internal/cast/THEOplayerNativeChromecast.js +42 -0
  85. package/lib/commonjs/internal/cast/THEOplayerNativeChromecast.js.map +1 -0
  86. package/lib/commonjs/internal/cast/THEOplayerWebCastApi.js +31 -0
  87. package/lib/commonjs/internal/cast/THEOplayerWebCastApi.js.map +1 -0
  88. package/lib/commonjs/internal/web/stub/CastButtonStub.js +16 -0
  89. package/lib/commonjs/internal/web/stub/CastButtonStub.js.map +1 -0
  90. package/lib/module/api/THEOplayerView.js.map +1 -1
  91. package/lib/module/api/barrel.js +1 -0
  92. package/lib/module/api/barrel.js.map +1 -1
  93. package/lib/module/api/cast/Airplay.js +2 -0
  94. package/lib/module/api/cast/Airplay.js.map +1 -0
  95. package/lib/module/api/cast/CastAPI.js +2 -0
  96. package/lib/module/api/cast/CastAPI.js.map +1 -0
  97. package/lib/module/api/cast/CastConfiguration.js +2 -0
  98. package/lib/module/api/cast/CastConfiguration.js.map +1 -0
  99. package/lib/module/api/cast/CastState.js +2 -0
  100. package/lib/module/api/cast/CastState.js.map +1 -0
  101. package/lib/module/api/cast/Chromecast.js +2 -0
  102. package/lib/module/api/cast/Chromecast.js.map +1 -0
  103. package/lib/module/api/cast/barrel.js +6 -0
  104. package/lib/module/api/cast/barrel.js.map +1 -0
  105. package/lib/module/api/config/PlayerConfiguration.js.map +1 -1
  106. package/lib/module/api/error/ChromecastError.js +2 -0
  107. package/lib/module/api/error/ChromecastError.js.map +1 -0
  108. package/lib/module/api/error/barrel.js +1 -0
  109. package/lib/module/api/error/barrel.js.map +1 -1
  110. package/lib/module/api/event/CastEvent.js +14 -0
  111. package/lib/module/api/event/CastEvent.js.map +1 -0
  112. package/lib/module/api/event/TrackEvent.js +14 -0
  113. package/lib/module/api/event/TrackEvent.js.map +1 -1
  114. package/lib/module/api/event/barrel.js +2 -1
  115. package/lib/module/api/event/barrel.js.map +1 -1
  116. package/lib/module/api/source/SourceDescription.js.map +1 -1
  117. package/lib/module/api/source/barrel.js +1 -0
  118. package/lib/module/api/source/barrel.js.map +1 -1
  119. package/lib/module/api/source/metadata/MetadataDescription.js +2 -0
  120. package/lib/module/api/source/metadata/MetadataDescription.js.map +1 -0
  121. package/lib/module/api/source/metadata/barrel.js +2 -0
  122. package/lib/module/api/source/metadata/barrel.js.map +1 -0
  123. package/lib/module/internal/THEOplayerView.js +29 -0
  124. package/lib/module/internal/THEOplayerView.js.map +1 -1
  125. package/lib/module/internal/THEOplayerView.web.js +80 -21
  126. package/lib/module/internal/THEOplayerView.web.js.map +1 -1
  127. package/lib/module/internal/cast/THEOplayerNativeAirplay.js +24 -0
  128. package/lib/module/internal/cast/THEOplayerNativeAirplay.js.map +1 -0
  129. package/lib/module/internal/cast/THEOplayerNativeCastApi.js +34 -0
  130. package/lib/module/internal/cast/THEOplayerNativeCastApi.js.map +1 -0
  131. package/lib/module/internal/cast/THEOplayerNativeChromecast.js +32 -0
  132. package/lib/module/internal/cast/THEOplayerNativeChromecast.js.map +1 -0
  133. package/lib/module/internal/cast/THEOplayerWebCastApi.js +22 -0
  134. package/lib/module/internal/cast/THEOplayerWebCastApi.js.map +1 -0
  135. package/lib/module/internal/web/stub/CastButtonStub.js +6 -0
  136. package/lib/module/internal/web/stub/CastButtonStub.js.map +1 -0
  137. package/lib/typescript/lib/commonjs/api/cast/Airplay.d.ts +1 -0
  138. package/lib/typescript/lib/commonjs/api/cast/CastAPI.d.ts +1 -0
  139. package/lib/typescript/lib/commonjs/api/cast/CastConfiguration.d.ts +0 -0
  140. package/lib/typescript/lib/commonjs/api/cast/CastState.d.ts +0 -0
  141. package/lib/typescript/lib/commonjs/api/cast/Chromecast.d.ts +1 -0
  142. package/lib/typescript/lib/commonjs/api/cast/barrel.d.ts +1 -0
  143. package/lib/typescript/lib/commonjs/api/error/ChromecastError.d.ts +0 -0
  144. package/lib/typescript/lib/commonjs/api/event/CastEvent.d.ts +2 -0
  145. package/lib/typescript/lib/commonjs/api/event/TrackEvent.d.ts +4 -0
  146. package/lib/typescript/lib/commonjs/api/source/metadata/MetadataDescription.d.ts +0 -0
  147. package/lib/typescript/lib/commonjs/api/source/metadata/barrel.d.ts +1 -0
  148. package/lib/typescript/lib/commonjs/internal/THEOplayerView.d.ts +3 -0
  149. package/lib/typescript/lib/commonjs/internal/THEOplayerView.web.d.ts +3 -0
  150. package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeAirplay.d.ts +9 -0
  151. package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeCastApi.d.ts +12 -0
  152. package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeChromecast.d.ts +11 -0
  153. package/lib/typescript/lib/commonjs/internal/cast/THEOplayerWebCastApi.d.ts +8 -0
  154. package/lib/typescript/lib/commonjs/internal/web/stub/CastButtonStub.d.ts +2 -0
  155. package/lib/typescript/lib/module/api/barrel.d.ts +1 -0
  156. package/lib/typescript/lib/module/api/cast/Airplay.d.ts +1 -0
  157. package/lib/typescript/lib/module/api/cast/CastAPI.d.ts +1 -0
  158. package/lib/typescript/lib/module/api/cast/CastConfiguration.d.ts +0 -0
  159. package/lib/typescript/lib/module/api/cast/CastState.d.ts +0 -0
  160. package/lib/typescript/lib/module/api/cast/Chromecast.d.ts +1 -0
  161. package/lib/typescript/lib/module/api/cast/barrel.d.ts +3 -0
  162. package/lib/typescript/lib/module/api/error/ChromecastError.d.ts +0 -0
  163. package/lib/typescript/lib/module/api/event/CastEvent.d.ts +1 -0
  164. package/lib/typescript/lib/module/api/event/TrackEvent.d.ts +2 -0
  165. package/lib/typescript/lib/module/api/event/barrel.d.ts +2 -1
  166. package/lib/typescript/lib/module/api/source/barrel.d.ts +1 -0
  167. package/lib/typescript/lib/module/api/source/metadata/MetadataDescription.d.ts +0 -0
  168. package/lib/typescript/lib/module/api/source/metadata/barrel.d.ts +1 -0
  169. package/lib/typescript/lib/module/internal/THEOplayerView.d.ts +3 -0
  170. package/lib/typescript/lib/module/internal/THEOplayerView.web.d.ts +3 -0
  171. package/lib/typescript/lib/module/internal/cast/THEOplayerNativeAirplay.d.ts +8 -0
  172. package/lib/typescript/lib/module/internal/cast/THEOplayerNativeCastApi.d.ts +11 -0
  173. package/lib/typescript/lib/module/internal/cast/THEOplayerNativeChromecast.d.ts +10 -0
  174. package/lib/typescript/lib/module/internal/cast/THEOplayerWebCastApi.d.ts +7 -0
  175. package/lib/typescript/lib/module/internal/web/stub/CastButtonStub.d.ts +2 -0
  176. package/lib/typescript/src/api/THEOplayerView.d.ts +21 -3
  177. package/lib/typescript/src/api/barrel.d.ts +1 -0
  178. package/lib/typescript/src/api/cast/Airplay.d.ts +27 -0
  179. package/lib/typescript/src/api/cast/CastAPI.d.ts +25 -0
  180. package/lib/typescript/src/api/cast/CastConfiguration.d.ts +41 -0
  181. package/lib/typescript/src/api/cast/CastState.d.ts +10 -0
  182. package/lib/typescript/src/api/cast/Chromecast.d.ts +39 -0
  183. package/lib/typescript/src/api/cast/barrel.d.ts +5 -0
  184. package/lib/typescript/src/api/config/PlayerConfiguration.d.ts +6 -1
  185. package/lib/typescript/src/api/error/ChromecastError.d.ts +34 -0
  186. package/lib/typescript/src/api/error/barrel.d.ts +1 -0
  187. package/lib/typescript/src/api/event/CastEvent.d.ts +21 -0
  188. package/lib/typescript/src/api/event/TrackEvent.d.ts +49 -3
  189. package/lib/typescript/src/api/event/barrel.d.ts +2 -1
  190. package/lib/typescript/src/api/source/SourceDescription.d.ts +7 -0
  191. package/lib/typescript/src/api/source/barrel.d.ts +1 -0
  192. package/lib/typescript/src/api/source/metadata/MetadataDescription.d.ts +12 -0
  193. package/lib/typescript/src/api/source/metadata/barrel.d.ts +1 -0
  194. package/lib/typescript/src/internal/THEOplayerView.d.ts +9 -1
  195. package/lib/typescript/src/internal/THEOplayerView.web.d.ts +7 -2
  196. package/lib/typescript/src/internal/cast/THEOplayerNativeAirplay.d.ts +9 -0
  197. package/lib/typescript/src/internal/cast/THEOplayerNativeCastApi.d.ts +10 -0
  198. package/lib/typescript/src/internal/cast/THEOplayerNativeChromecast.d.ts +11 -0
  199. package/lib/typescript/src/internal/cast/THEOplayerWebCastApi.d.ts +9 -0
  200. package/lib/typescript/src/internal/web/stub/CastButtonStub.d.ts +3 -0
  201. package/package.json +2 -2
  202. package/react-native-theoplayer.podspec +2 -2
  203. package/src/api/THEOplayerView.ts +25 -3
  204. package/src/api/barrel.ts +1 -0
  205. package/src/api/cast/Airplay.ts +31 -0
  206. package/src/api/cast/CastAPI.ts +30 -0
  207. package/src/api/cast/CastConfiguration.ts +44 -0
  208. package/src/api/cast/CastState.ts +10 -0
  209. package/src/api/cast/Chromecast.ts +45 -0
  210. package/src/api/cast/barrel.ts +5 -0
  211. package/src/api/config/PlayerConfiguration.ts +7 -1
  212. package/src/api/error/ChromecastError.ts +46 -0
  213. package/src/api/error/barrel.ts +1 -0
  214. package/src/api/event/CastEvent.ts +45 -0
  215. package/src/api/event/TrackEvent.ts +58 -2
  216. package/src/api/event/barrel.ts +2 -1
  217. package/src/api/source/SourceDescription.ts +8 -0
  218. package/src/api/source/barrel.ts +1 -0
  219. package/src/api/source/metadata/MetadataDescription.ts +13 -0
  220. package/src/api/source/metadata/barrel.ts +1 -0
  221. package/src/internal/THEOplayerView.tsx +35 -0
  222. package/src/internal/THEOplayerView.web.tsx +87 -19
  223. package/src/internal/cast/THEOplayerNativeAirplay.ts +22 -0
  224. package/src/internal/cast/THEOplayerNativeCastApi.ts +28 -0
  225. package/src/internal/cast/THEOplayerNativeChromecast.ts +30 -0
  226. package/src/internal/cast/THEOplayerWebCastApi.ts +21 -0
  227. package/src/internal/web/stub/CastButtonStub.tsx +7 -0
  228. package/android/src/main/java/com/theoplayer/PlayerConfigHelper.java +0 -70
  229. package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.java +0 -32
  230. package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.java +0 -525
  231. package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.java +0 -127
  232. package/android/src/main/java/com/theoplayer/SourceHelper.java +0 -362
  233. package/android/src/main/java/com/theoplayer/VideoEventEmitter.java +0 -442
  234. package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.java +0 -92
  235. package/android/src/main/java/com/theoplayer/ads/AdInfo.java +0 -168
  236. package/android/src/main/java/com/theoplayer/ads/AdsModule.java +0 -152
  237. package/android/src/main/java/com/theoplayer/track/QualityListAdapter.java +0 -54
  238. package/android/src/main/java/com/theoplayer/track/QualityListFilter.java +0 -40
  239. package/android/src/main/java/com/theoplayer/track/TextTrackCueEventType.java +0 -11
  240. package/android/src/main/java/com/theoplayer/track/TrackEventType.java +0 -11
  241. package/android/src/main/java/com/theoplayer/track/TrackListInfo.java +0 -212
  242. package/android/src/main/java/com/theoplayer/util/ViewResolver.java +0 -42
  243. package/ios/custom/react-native-theoplayer_custom_ios.podspec +0 -36
@@ -0,0 +1 @@
1
+ {"version":3,"names":["THEOplayerNativeAirplay","constructor","_player","casting","NativeModules","CastModule","airplayCasting","nativeHandle","state","airplayState","start","airplayStart","stop","airplayStop"],"sources":["THEOplayerNativeAirplay.ts"],"sourcesContent":["import type { Airplay, CastState, THEOplayerView } from 'react-native-theoplayer';\nimport { NativeModules } from 'react-native';\n\nexport class THEOplayerNativeAirplay implements Airplay {\n public constructor(private readonly _player: THEOplayerView) {}\n\n casting(): Promise<boolean> {\n return NativeModules.CastModule.airplayCasting(this._player.nativeHandle);\n }\n\n state(): Promise<CastState> {\n return NativeModules.CastModule.airplayState(this._player.nativeHandle);\n }\n\n start(): void {\n NativeModules.CastModule.airplayStart(this._player.nativeHandle);\n }\n\n stop(): void {\n NativeModules.CastModule.airplayStop(this._player.nativeHandle);\n }\n}\n"],"mappings":";;;;;;;AACA;;AAEO,MAAMA,uBAAN,CAAiD;EAC/CC,WAAW,CAAkBC,OAAlB,EAA2C;IAAA,KAAzBA,OAAyB,GAAzBA,OAAyB;EAAE;;EAE/DC,OAAO,GAAqB;IAC1B,OAAOC,0BAAA,CAAcC,UAAd,CAAyBC,cAAzB,CAAwC,KAAKJ,OAAL,CAAaK,YAArD,CAAP;EACD;;EAEDC,KAAK,GAAuB;IAC1B,OAAOJ,0BAAA,CAAcC,UAAd,CAAyBI,YAAzB,CAAsC,KAAKP,OAAL,CAAaK,YAAnD,CAAP;EACD;;EAEDG,KAAK,GAAS;IACZN,0BAAA,CAAcC,UAAd,CAAyBM,YAAzB,CAAsC,KAAKT,OAAL,CAAaK,YAAnD;EACD;;EAEDK,IAAI,GAAS;IACXR,0BAAA,CAAcC,UAAd,CAAyBQ,WAAzB,CAAqC,KAAKX,OAAL,CAAaK,YAAlD;EACD;;AAjBqD"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.THEOplayerNativeCastAPI = void 0;
7
+
8
+ var _reactNative = require("react-native");
9
+
10
+ var _THEOplayerNativeChromecast = require("./THEOplayerNativeChromecast");
11
+
12
+ var _THEOplayerNativeAirplay = require("./THEOplayerNativeAirplay");
13
+
14
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+
16
+ class THEOplayerNativeCastAPI {
17
+ constructor(_player) {
18
+ this._player = _player;
19
+
20
+ _defineProperty(this, "_chromecast", void 0);
21
+
22
+ _defineProperty(this, "_airplay", void 0);
23
+
24
+ this._chromecast = new _THEOplayerNativeChromecast.THEOplayerNativeChromecast(this._player);
25
+
26
+ if (_reactNative.Platform.OS !== 'android') {
27
+ this._airplay = new _THEOplayerNativeAirplay.THEOplayerNativeAirplay(this._player);
28
+ }
29
+ }
30
+
31
+ casting() {
32
+ return _reactNative.NativeModules.CastModule.casting(this._player.nativeHandle);
33
+ }
34
+
35
+ get chromecast() {
36
+ return this._chromecast;
37
+ }
38
+
39
+ get airplay() {
40
+ return this._airplay;
41
+ }
42
+
43
+ }
44
+
45
+ exports.THEOplayerNativeCastAPI = THEOplayerNativeCastAPI;
46
+ //# sourceMappingURL=THEOplayerNativeCastApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["THEOplayerNativeCastAPI","constructor","_player","_chromecast","THEOplayerNativeChromecast","Platform","OS","_airplay","THEOplayerNativeAirplay","casting","NativeModules","CastModule","nativeHandle","chromecast","airplay"],"sources":["THEOplayerNativeCastApi.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport { THEOplayerNativeChromecast } from './THEOplayerNativeChromecast';\nimport { THEOplayerNativeAirplay } from './THEOplayerNativeAirplay';\nimport type { Airplay, CastAPI, Chromecast, THEOplayerView } from 'react-native-theoplayer';\n\nexport class THEOplayerNativeCastAPI implements CastAPI {\n private readonly _chromecast: Chromecast;\n private readonly _airplay: Airplay | undefined;\n\n constructor(private readonly _player: THEOplayerView) {\n this._chromecast = new THEOplayerNativeChromecast(this._player);\n if (Platform.OS !== 'android') {\n this._airplay = new THEOplayerNativeAirplay(this._player);\n }\n }\n\n casting(): Promise<boolean> {\n return NativeModules.CastModule.casting(this._player.nativeHandle);\n }\n\n get chromecast(): Chromecast | undefined {\n return this._chromecast;\n }\n\n get airplay(): Airplay | undefined {\n return this._airplay;\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAGO,MAAMA,uBAAN,CAAiD;EAItDC,WAAW,CAAkBC,OAAlB,EAA2C;IAAA,KAAzBA,OAAyB,GAAzBA,OAAyB;;IAAA;;IAAA;;IACpD,KAAKC,WAAL,GAAmB,IAAIC,sDAAJ,CAA+B,KAAKF,OAApC,CAAnB;;IACA,IAAIG,qBAAA,CAASC,EAAT,KAAgB,SAApB,EAA+B;MAC7B,KAAKC,QAAL,GAAgB,IAAIC,gDAAJ,CAA4B,KAAKN,OAAjC,CAAhB;IACD;EACF;;EAEDO,OAAO,GAAqB;IAC1B,OAAOC,0BAAA,CAAcC,UAAd,CAAyBF,OAAzB,CAAiC,KAAKP,OAAL,CAAaU,YAA9C,CAAP;EACD;;EAEa,IAAVC,UAAU,GAA2B;IACvC,OAAO,KAAKV,WAAZ;EACD;;EAEU,IAAPW,OAAO,GAAwB;IACjC,OAAO,KAAKP,QAAZ;EACD;;AArBqD"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.THEOplayerNativeChromecast = void 0;
7
+
8
+ var _reactNative = require("react-native");
9
+
10
+ class THEOplayerNativeChromecast {
11
+ constructor(_player) {
12
+ this._player = _player;
13
+ }
14
+
15
+ casting() {
16
+ return _reactNative.NativeModules.CastModule.chromecastCasting(this._player.nativeHandle);
17
+ }
18
+
19
+ state() {
20
+ return _reactNative.NativeModules.CastModule.chromecastState(this._player.nativeHandle);
21
+ }
22
+
23
+ start() {
24
+ _reactNative.NativeModules.CastModule.chromecastStart(this._player.nativeHandle);
25
+ }
26
+
27
+ stop() {
28
+ _reactNative.NativeModules.CastModule.chromecastStop(this._player.nativeHandle);
29
+ }
30
+
31
+ join() {
32
+ _reactNative.NativeModules.CastModule.chromecastJoin(this._player.nativeHandle);
33
+ }
34
+
35
+ leave() {
36
+ _reactNative.NativeModules.CastModule.chromecastLeave(this._player.nativeHandle);
37
+ }
38
+
39
+ }
40
+
41
+ exports.THEOplayerNativeChromecast = THEOplayerNativeChromecast;
42
+ //# sourceMappingURL=THEOplayerNativeChromecast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["THEOplayerNativeChromecast","constructor","_player","casting","NativeModules","CastModule","chromecastCasting","nativeHandle","state","chromecastState","start","chromecastStart","stop","chromecastStop","join","chromecastJoin","leave","chromecastLeave"],"sources":["THEOplayerNativeChromecast.ts"],"sourcesContent":["import type { CastState, Chromecast, THEOplayerView } from 'react-native-theoplayer';\nimport { NativeModules } from 'react-native';\n\nexport class THEOplayerNativeChromecast implements Chromecast {\n public constructor(private readonly _player: THEOplayerView) {}\n\n casting(): Promise<boolean> {\n return NativeModules.CastModule.chromecastCasting(this._player.nativeHandle);\n }\n\n state(): Promise<CastState> {\n return NativeModules.CastModule.chromecastState(this._player.nativeHandle);\n }\n\n start(): void {\n NativeModules.CastModule.chromecastStart(this._player.nativeHandle);\n }\n\n stop(): void {\n NativeModules.CastModule.chromecastStop(this._player.nativeHandle);\n }\n\n join(): void {\n NativeModules.CastModule.chromecastJoin(this._player.nativeHandle);\n }\n\n leave(): void {\n NativeModules.CastModule.chromecastLeave(this._player.nativeHandle);\n }\n}\n"],"mappings":";;;;;;;AACA;;AAEO,MAAMA,0BAAN,CAAuD;EACrDC,WAAW,CAAkBC,OAAlB,EAA2C;IAAA,KAAzBA,OAAyB,GAAzBA,OAAyB;EAAE;;EAE/DC,OAAO,GAAqB;IAC1B,OAAOC,0BAAA,CAAcC,UAAd,CAAyBC,iBAAzB,CAA2C,KAAKJ,OAAL,CAAaK,YAAxD,CAAP;EACD;;EAEDC,KAAK,GAAuB;IAC1B,OAAOJ,0BAAA,CAAcC,UAAd,CAAyBI,eAAzB,CAAyC,KAAKP,OAAL,CAAaK,YAAtD,CAAP;EACD;;EAEDG,KAAK,GAAS;IACZN,0BAAA,CAAcC,UAAd,CAAyBM,eAAzB,CAAyC,KAAKT,OAAL,CAAaK,YAAtD;EACD;;EAEDK,IAAI,GAAS;IACXR,0BAAA,CAAcC,UAAd,CAAyBQ,cAAzB,CAAwC,KAAKX,OAAL,CAAaK,YAArD;EACD;;EAEDO,IAAI,GAAS;IACXV,0BAAA,CAAcC,UAAd,CAAyBU,cAAzB,CAAwC,KAAKb,OAAL,CAAaK,YAArD;EACD;;EAEDS,KAAK,GAAS;IACZZ,0BAAA,CAAcC,UAAd,CAAyBY,eAAzB,CAAyC,KAAKf,OAAL,CAAaK,YAAtD;EACD;;AAzB2D"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.THEOplayerWebCastAPI = void 0;
7
+
8
+ class THEOplayerWebCastAPI {
9
+ // @ts-ignore
10
+ constructor(_player) {
11
+ this._player = _player;
12
+ }
13
+
14
+ casting() {
15
+ return Promise.resolve(false);
16
+ }
17
+
18
+ get chromecast() {
19
+ // TODO
20
+ return undefined;
21
+ }
22
+
23
+ get airplay() {
24
+ // TODO
25
+ return undefined;
26
+ }
27
+
28
+ }
29
+
30
+ exports.THEOplayerWebCastAPI = THEOplayerWebCastAPI;
31
+ //# sourceMappingURL=THEOplayerWebCastApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["THEOplayerWebCastAPI","constructor","_player","casting","Promise","resolve","chromecast","undefined","airplay"],"sources":["THEOplayerWebCastApi.ts"],"sourcesContent":["import type { Airplay, CastAPI, Chromecast } from 'react-native-theoplayer';\nimport type { THEOplayerView } from '../THEOplayerView.web';\n\nexport class THEOplayerWebCastAPI implements CastAPI {\n // @ts-ignore\n constructor(private readonly _player: THEOplayerView) {}\n\n casting(): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n get chromecast(): Chromecast | undefined {\n // TODO\n return undefined;\n }\n\n get airplay(): Airplay | undefined {\n // TODO\n return undefined;\n }\n}\n"],"mappings":";;;;;;;AAGO,MAAMA,oBAAN,CAA8C;EACnD;EACAC,WAAW,CAAkBC,OAAlB,EAA2C;IAAA,KAAzBA,OAAyB,GAAzBA,OAAyB;EAAE;;EAExDC,OAAO,GAAqB;IAC1B,OAAOC,OAAO,CAACC,OAAR,CAAgB,KAAhB,CAAP;EACD;;EAEa,IAAVC,UAAU,GAA2B;IACvC;IACA,OAAOC,SAAP;EACD;;EAEU,IAAPC,OAAO,GAAwB;IACjC;IACA,OAAOD,SAAP;EACD;;AAhBkD"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CastButton = CastButton;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ // Provides a stub for react-native-google-cast on web.
13
+ function CastButton(_props) {
14
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
15
+ }
16
+ //# sourceMappingURL=CastButtonStub.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CastButton","_props"],"sources":["CastButtonStub.tsx"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport React from 'react';\n\n// Provides a stub for react-native-google-cast on web.\nexport function CastButton(_props: ViewProps): JSX.Element {\n return <></>;\n}\n"],"mappings":";;;;;;;AACA;;;;AAEA;AACO,SAASA,UAAT,CAAoBC,MAApB,EAAoD;EACzD,oBAAO,2DAAP;AACD"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["THEOplayerView.ts"],"sourcesContent":["import type { SourceDescription } from './source/SourceDescription';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport type {\n DurationChangeEvent,\n ErrorEvent,\n LoadedMetadataEvent,\n ReadyStateChangeEvent,\n TimeUpdateEvent,\n ProgressEvent,\n SegmentNotFoundEvent,\n} from './event/PlayerEvent';\nimport type { TextTrackEvent, TextTrackListEvent } from './event/TrackEvent';\nimport type { PlayerConfiguration } from './config/PlayerConfiguration';\nimport type { ABRConfiguration } from './abr/ABRConfiguration';\nimport type { AdEvent } from \"./event/AdEvent\";\nimport type { AdsAPI } from \"./ads/AdsAPI\";\n\nexport interface THEOplayerViewProps {\n /**\n * The player configuration with THEOplayer license.\n */\n config?: PlayerConfiguration;\n\n /**\n * The player's adaptive bitrate (ABR) configuration.\n *\n * @remarks\n * <br/> - This property is supported on Android & Web platforms only.\n */\n abrConfig?: ABRConfiguration;\n\n /**\n * A source description that determines the current media resource.\n */\n source: SourceDescription;\n\n /**\n * Used to set the player's paused state.\n *\n * @remarks\n * <br/> - If paused is initially set to `true`, play-out will start once the source is set.\n */\n paused?: boolean;\n\n /**\n * Used to set the playback rate of the media.\n *\n * @example\n * <br/> - `playbackRate = 0.70` will slow down the playback rate of the media by 30%.\n * <br/> - `playbackRate = 1.25` will speed up the playback rate of the media by 25%.\n *\n * @remarks\n * <br/> - Playback rate is represented by a number where `1` is default playback speed.\n * <br/> - Playback rate must be a positive number.\n * <br/> - It is recommended that you limit the range to between 0.5 and 4.\n */\n playbackRate?: number;\n\n /**\n * Used to set the volume of the audio.\n *\n * @remarks\n * <br/> - Volume is represented by a floating point number between `0.0` and `1.0`.\n */\n volume?: number;\n\n /**\n * Determines whether audio is muted.\n */\n muted?: boolean;\n\n /**\n * Determines whether the player is currently playing in fullscreen.\n */\n fullscreen?: boolean;\n\n /**\n * Used to set the current selected text track by passing its `uid`, or `null` to select none.\n */\n selectedTextTrack?: number | null;\n\n /**\n * Used to set the current selected video track by passing its `uid`, or `null` to select none.\n */\n selectedVideoTrack?: number | null;\n\n /**\n * Used to set the current selected video quality by passing its `uid`, or `null` to select none.\n */\n targetVideoQuality?: number | number[] | undefined;\n\n /**\n * Used to set the current selected audio track by passing its `uid`, or `null` to select none.\n */\n selectedAudioTrack?: number | null;\n\n /**\n * The style applied to the player view.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Invoked before the player goes to fullscreen.\n */\n onFullscreenPlayerWillPresent?: () => void;\n\n /**\n * Invoked after the player went to fullscreen.\n */\n onFullscreenPlayerDidPresent?: () => void;\n\n /**\n * Invoked before the player returns from fullscreen.\n */\n onFullscreenPlayerWillDismiss?: () => void;\n\n /**\n * Invoked after the player returned from fullscreen.\n */\n onFullscreenPlayerDidDismiss?: () => void;\n\n /**\n * Invoked when the player's buffering state has changed.\n *\n * @remarks\n * <br/> - The `isBuffering` value is typically coupled to showing/hiding a loading indicator.\n *\n * @param isBuffering A value that indicates whether the player is buffering.\n */\n onBufferingStateChange?: (isBuffering: boolean) => void;\n\n /**\n * Invoked when the player receives a new source description.\n */\n onSourceChange?: () => void;\n\n /**\n * Invoked when the player starts loading the manifest.\n */\n onLoadStart?: () => void;\n\n /**\n * Invoked when the player has determined the duration and dimensions of the\n * media resource, and the text and media tracks are ready.\n */\n onLoadedMetadata?: (event: LoadedMetadataEvent) => void;\n\n /**\n * Invoked when the player can render the media data at the current playback position for the first time.\n */\n onLoadedData?: () => void;\n\n /**\n * Invoked when the player's readyState has changed.\n */\n onReadyStateChange?: (event: ReadyStateChangeEvent) => void;\n\n /**\n * Invoked when an error occurs.\n */\n onError?: (event: ErrorEvent) => void;\n\n /**\n * Invoked each time the player has loaded media data.\n */\n onProgress?: (event: ProgressEvent) => void;\n\n /**\n * Invoked when the player's internal paused state changes to `false`.\n */\n onPlay?: () => void;\n\n /**\n * Invoked when playback is ready to start after having been paused or delayed due to\n * lack of media data.\n */\n onPlaying?: () => void;\n\n /**\n * Invoked when the player's internal paused state changes to `true`.\n */\n onPause?: () => void;\n\n /**\n * Invoked when a seek operation starts and the player is seeking a new position.\n */\n onSeeking?: () => void;\n\n /**\n * Invoked when a seek operation completed and the current playback position has changed.\n */\n onSeeked?: () => void;\n\n /**\n * Invoked when playback has stopped because the end of the media was reached or because\n * no further data is available.\n */\n onEnded?: () => void;\n\n /**\n * Invoked each time the current playback position changed.\n */\n onTimeUpdate?: (event: TimeUpdateEvent) => void;\n\n /**\n * Invoked when the player's duration attribute has been updated.\n */\n onDurationChange?: (event: DurationChangeEvent) => void;\n\n /**\n * Invoked when a segment can not be found.\n *\n * @remarks\n * <br/> - Only dispatched on DASH streams.\n */\n onSegmentNotFound?: (event: SegmentNotFoundEvent) => void;\n\n /**\n * Invoked when a text track list event occurs.\n */\n onTextTrackListEvent?: (event: TextTrackListEvent) => void;\n\n /**\n * Invoked when a text track event occurs.\n */\n onTextTrackEvent?: (event: TextTrackEvent) => void;\n\n /**\n * Invoked when an ad event occurs.\n */\n onAdEvent?: (event: AdEvent) => void;\n}\n\nexport interface THEOplayerViewComponent {\n /**\n * Seek to a new position.\n *\n * @param seekTime - new time, in milliseconds.\n */\n seek: (seekTime: number) => void;\n\n /**\n * The API for advertisements.\n */\n ads: AdsAPI;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["THEOplayerView.ts"],"sourcesContent":["import type { SourceDescription } from './source/SourceDescription';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport type {\n DurationChangeEvent,\n ErrorEvent,\n LoadedMetadataEvent,\n ReadyStateChangeEvent,\n TimeUpdateEvent,\n ProgressEvent,\n SegmentNotFoundEvent,\n} from './event/PlayerEvent';\nimport type { MediaTrackEvent, MediaTrackListEvent, TextTrackEvent, TextTrackListEvent } from './event/TrackEvent';\nimport type { PlayerConfiguration } from './config/PlayerConfiguration';\nimport type { ABRConfiguration } from './abr/ABRConfiguration';\nimport type { AdEvent } from './event/AdEvent';\nimport type { AdsAPI } from './ads/AdsAPI';\nimport type { CastAPI } from './cast/CastAPI';\nimport type { CastEvent } from './event/CastEvent';\n\nexport interface THEOplayerViewProps {\n /**\n * The player configuration with THEOplayer license.\n */\n config?: PlayerConfiguration;\n\n /**\n * The player's adaptive bitrate (ABR) configuration.\n *\n * @remarks\n * <br/> - This property is supported on Android & Web platforms only.\n */\n abrConfig?: ABRConfiguration;\n\n /**\n * A source description that determines the current media resource.\n */\n source: SourceDescription;\n\n /**\n * Used to set the player's paused state.\n *\n * @remarks\n * <br/> - If paused is initially set to `true`, play-out will start once the source is set.\n */\n paused?: boolean;\n\n /**\n * Used to set the playback rate of the media.\n *\n * @example\n * <br/> - `playbackRate = 0.70` will slow down the playback rate of the media by 30%.\n * <br/> - `playbackRate = 1.25` will speed up the playback rate of the media by 25%.\n *\n * @remarks\n * <br/> - Playback rate is represented by a number where `1` is default playback speed.\n * <br/> - Playback rate must be a positive number.\n * <br/> - It is recommended that you limit the range to between 0.5 and 4.\n */\n playbackRate?: number;\n\n /**\n * Used to set the volume of the audio.\n *\n * @remarks\n * <br/> - Volume is represented by a floating point number between `0.0` and `1.0`.\n */\n volume?: number;\n\n /**\n * Determines whether audio is muted.\n */\n muted?: boolean;\n\n /**\n * Determines whether the player is currently playing in fullscreen.\n */\n fullscreen?: boolean;\n\n /**\n * Used to set the current selected text track by passing its `uid`, or `null` to select none.\n */\n selectedTextTrack?: number | null;\n\n /**\n * Used to set the current selected video track by passing its `uid`, or `null` to select none.\n */\n selectedVideoTrack?: number | null;\n\n /**\n * Used to set the current selected video quality by passing its `uid`, or `null` to select none.\n */\n targetVideoQuality?: number | number[] | undefined;\n\n /**\n * Used to set the current selected audio track by passing its `uid`, or `null` to select none.\n */\n selectedAudioTrack?: number | null;\n\n /**\n * The style applied to the player view.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Invoked before the player goes to fullscreen.\n */\n onFullscreenPlayerWillPresent?: () => void;\n\n /**\n * Invoked after the player went to fullscreen.\n */\n onFullscreenPlayerDidPresent?: () => void;\n\n /**\n * Invoked before the player returns from fullscreen.\n */\n onFullscreenPlayerWillDismiss?: () => void;\n\n /**\n * Invoked after the player returned from fullscreen.\n */\n onFullscreenPlayerDidDismiss?: () => void;\n\n /**\n * Invoked when the player's buffering state has changed.\n *\n * @remarks\n * <br/> - The `isBuffering` value is typically coupled to showing/hiding a loading indicator.\n *\n * @param isBuffering A value that indicates whether the player is buffering.\n */\n onBufferingStateChange?: (isBuffering: boolean) => void;\n\n /**\n * Invoked when the player receives a new source description.\n */\n onSourceChange?: () => void;\n\n /**\n * Invoked when the player starts loading the manifest.\n */\n onLoadStart?: () => void;\n\n /**\n * Invoked when the player has determined the duration and dimensions of the\n * media resource, and the text and media tracks are ready.\n */\n onLoadedMetadata?: (event: LoadedMetadataEvent) => void;\n\n /**\n * Invoked when the player can render the media data at the current playback position for the first time.\n */\n onLoadedData?: () => void;\n\n /**\n * Invoked when the player's readyState has changed.\n */\n onReadyStateChange?: (event: ReadyStateChangeEvent) => void;\n\n /**\n * Invoked when an error occurs.\n */\n onError?: (event: ErrorEvent) => void;\n\n /**\n * Invoked each time the player has loaded media data.\n */\n onProgress?: (event: ProgressEvent) => void;\n\n /**\n * Invoked when the player's internal paused state changes to `false`.\n */\n onPlay?: () => void;\n\n /**\n * Invoked when playback is ready to start after having been paused or delayed due to\n * lack of media data.\n */\n onPlaying?: () => void;\n\n /**\n * Invoked when the player's internal paused state changes to `true`.\n */\n onPause?: () => void;\n\n /**\n * Invoked when a seek operation starts and the player is seeking a new position.\n */\n onSeeking?: () => void;\n\n /**\n * Invoked when a seek operation completed and the current playback position has changed.\n */\n onSeeked?: () => void;\n\n /**\n * Invoked when playback has stopped because the end of the media was reached or because\n * no further data is available.\n */\n onEnded?: () => void;\n\n /**\n * Invoked each time the current playback position changed.\n */\n onTimeUpdate?: (event: TimeUpdateEvent) => void;\n\n /**\n * Invoked when the player's duration attribute has been updated.\n */\n onDurationChange?: (event: DurationChangeEvent) => void;\n\n /**\n * Invoked when a segment can not be found.\n *\n * @remarks\n * <br/> - Only dispatched on DASH streams.\n */\n onSegmentNotFound?: (event: SegmentNotFoundEvent) => void;\n\n /**\n * Invoked when a text track list event occurs.\n */\n onTextTrackListEvent?: (event: TextTrackListEvent) => void;\n\n /**\n * Invoked when a text track event occurs.\n */\n onTextTrackEvent?: (event: TextTrackEvent) => void;\n\n /**\n * Invoked when a media track list event occurs.\n */\n onMediaTrackListEvent?: (event: MediaTrackListEvent) => void;\n\n /**\n * Invoked when a media track event occurs.\n */\n onMediaTrackEvent?: (event: MediaTrackEvent) => void;\n\n /**\n * Invoked when an ad event occurs.\n */\n onAdEvent?: (event: AdEvent) => void;\n\n /**\n * Invoked when a cast event occurs, either for Chromecast or Airplay.\n */\n onCastEvent?: (event: CastEvent) => void;\n}\n\nexport interface THEOplayerViewComponent {\n /**\n * Seek to a new position.\n *\n * @param seekTime - new time, in milliseconds.\n */\n seek: (seekTime: number) => void;\n\n /**\n * The API for advertisements.\n */\n ads: AdsAPI;\n\n /**\n * The API for casting devices.\n */\n cast: CastAPI;\n}\n"],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  export * from './abr/barrel';
2
2
  export * from './ads/barrel';
3
+ export * from './cast/barrel';
3
4
  export * from './config/barrel';
4
5
  export * from './error/barrel';
5
6
  export * from './event/barrel';
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './abr/barrel';\nexport * from './ads/barrel';\nexport * from './config/barrel';\nexport * from './error/barrel';\nexport * from './event/barrel';\nexport * from './drm/barrel';\nexport * from './source/barrel';\nexport * from './timeranges/barrel';\nexport * from './track/barrel';\nexport * from './utils/barrel';\nexport * from './THEOplayerView';\n"],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,cAAd;AACA,cAAc,iBAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,cAAd;AACA,cAAc,iBAAd;AACA,cAAc,qBAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,kBAAd"}
1
+ {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './abr/barrel';\nexport * from './ads/barrel';\nexport * from './cast/barrel';\nexport * from './config/barrel';\nexport * from './error/barrel';\nexport * from './event/barrel';\nexport * from './drm/barrel';\nexport * from './source/barrel';\nexport * from './timeranges/barrel';\nexport * from './track/barrel';\nexport * from './utils/barrel';\nexport * from './THEOplayerView';\n"],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,cAAd;AACA,cAAc,eAAd;AACA,cAAc,iBAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,cAAd;AACA,cAAc,iBAAd;AACA,cAAc,qBAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,cAAc,kBAAd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Airplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["Airplay.ts"],"sourcesContent":["/**\n * The Airplay API.\n *\n * @public\n */\nimport type {CastState} from \"./CastState\";\n\nexport interface Airplay {\n /**\n * Whether the player is connected with an airplay device.\n */\n casting(): Promise<boolean>;\n\n /**\n * The state of the casting process.\n */\n state(): Promise<CastState>;\n\n /**\n * Start a casting session with the player's source.\n *\n * @remarks\n * <br/> - A native browser pop-up will prompt to choose an airplay device.\n */\n start(): void;\n\n /**\n * Stop the active casting session.\n */\n stop(): void;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CastAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["CastAPI.ts"],"sourcesContent":["import type {Airplay} from \"./Airplay\";\nimport type {Chromecast} from \"./Chromecast\";\n\n/**\n * The API for casting.\n */\n\n\nexport interface CastAPI {\n /**\n * Whether the player is connected with a casting device.\n */\n casting(): Promise<boolean>;\n\n /**\n * The Chromecast API.\n *\n * @remarks\n * <br/> - Only available when the feature or extension `'chromecast'` is enabled.\n */\n readonly chromecast?: Chromecast;\n\n /**\n * The Airplay API.\n *\n * @remarks\n * <br/> - Only available when the feature or extension `'airplay'` is enabled.\n */\n readonly airplay?: Airplay;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=CastConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["CastConfiguration.ts"],"sourcesContent":["/**\n * Describes the configuration of the Cast integrations.\n *\n * @public\n */\nexport interface CastConfiguration {\n /**\n * The Chromecast configuration.\n *\n * @defaultValue A {@link ChromecastConfiguration} with default values.\n */\n chromecast?: ChromecastConfiguration;\n\n /**\n * The join strategy of the player.\n *\n * @defaultValue `'manual'`\n */\n strategy?: JoinStrategy;\n}\n\n/**\n * The join strategy, represented by a value from the following list:\n * <br/> - `'auto'` : The player will automatically join a cast session if one exists when play is called. Otherwise it will prompt the user with all available devices.\n * <br/> - `'manual'` : The player will take over an existing session if there is one and the cast button is clicked. Otherwise it will prompt the user with all available devices.\n * <br/> - `'disabled'` : The player is not affected by cast sessions and is not castable.\n *\n * @public\n */\nexport type JoinStrategy = 'auto' | 'manual' | 'disabled';\n\n/**\n * Describes the configuration of the Chromecast integration.\n *\n * @public\n */\nexport interface ChromecastConfiguration {\n /**\n * The identifier of a custom Chromecast receiver app.\n *\n * @defaultValue The default THEOplayer receiver app.\n */\n appID?: string;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=CastState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["CastState.ts"],"sourcesContent":["/**\n * The state of a casting process, represented by a value from the following list:\n * <br/> - `'unavailable'`: No available cast devices.\n * <br/> - `'available'`: Cast device available, but the player is not connected.\n * <br/> - `'connecting'`: Cast device available and the player is connecting.\n * <br/> - `'connected'`: Cast device available and the player is connected.\n *\n * @public\n */\nexport type CastState = 'unavailable' | 'available' | 'connecting' | 'connected';\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Chromecast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["Chromecast.ts"],"sourcesContent":["/**\n * The Airplay API.\n *\n * @public\n */\nimport type {CastState} from \"./CastState\";\n\nexport interface Chromecast {\n /**\n * Whether the player is connected with a chromecast device.\n */\n casting(): Promise<boolean>;\n\n /**\n * The state of the casting process.\n */\n state(): Promise<CastState>;\n\n /**\n * Start a casting session with the player's source.\n *\n * @remarks\n * <br/> - A native browser pop-up will prompt to choose a chromecast device.\n */\n start(): void;\n\n /**\n * Stop the active casting session.\n */\n stop(): void;\n\n /**\n * Join an active casting session.\n */\n join(): void;\n\n /**\n * Leave the active casting session.\n *\n * @remarks\n * <br/> - Does not stop the session when other devices are connected.\n * <br/> - Use {@link stop} to fully stop the session.\n */\n leave(): void;\n}\n"],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './Airplay';
2
+ export * from './CastAPI';
3
+ export * from './CastConfiguration';
4
+ export * from './CastState';
5
+ export * from './Chromecast';
6
+ //# sourceMappingURL=barrel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './Airplay';\nexport * from './CastAPI';\nexport * from './CastConfiguration';\nexport * from './CastState';\nexport * from './Chromecast';\n"],"mappings":"AAAA,cAAc,WAAd;AACA,cAAc,WAAd;AACA,cAAc,qBAAd;AACA,cAAc,aAAd;AACA,cAAc,cAAd"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["PlayerConfiguration.ts"],"sourcesContent":["import type { AdsConfiguration } from \"../ads/AdsConfiguration\";\n\nexport interface PlayerConfiguration {\n /**\n * The ads configuration for the player.\n */\n ads?: AdsConfiguration;\n\n /**\n * The license for the player\n */\n readonly license?: string;\n\n /**\n * The url to fetch the license for the player\n */\n readonly licenseUrl?: string;\n\n /**\n * Sets whether the native player is chromeless (without UI).\n */\n readonly chromeless?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["PlayerConfiguration.ts"],"sourcesContent":["import type { AdsConfiguration } from '../ads/AdsConfiguration';\nimport type { CastConfiguration } from '../cast/CastConfiguration';\n\nexport interface PlayerConfiguration {\n /**\n * The ads configuration for the player.\n */\n ads?: AdsConfiguration;\n\n /**\n * The cast configuration for the player.\n */\n cast?: CastConfiguration;\n\n /**\n * The license for the player\n */\n readonly license?: string;\n\n /**\n * The url to fetch the license for the player\n */\n readonly licenseUrl?: string;\n\n /**\n * Sets whether the native player is chromeless (without UI).\n */\n readonly chromeless?: boolean;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ChromecastError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["ChromecastError.ts"],"sourcesContent":["/**\n * The chromecast error code, represented by a value from the following list:\n * <br/> - `'CANCEL'`: The operation was canceled by the user.\n * <br/> - `'TIMEOUT'`: The operation timed out.\n * <br/> - `'API_NOT_INITIALIZED'`: The API is not initialized.\n * <br/> - `'INVALID_PARAMETER'`: The parameters to the operation were not valid.\n * <br/> - `'EXTENSION_NOT_COMPATIBLE'`: The API script is not compatible with the installed Cast extension.\n * <br/> - `'EXTENSION_MISSING'`: The Cast extension is not available.\n * <br/> - `'RECEIVER_UNAVAILABLE'`: No receiver was compatible with the session request.\n * <br/> - `'SESSION_ERROR'`: A session could not be created, or a session was invalid.\n * <br/> - `'CHANNEL_ERROR'`: A channel to the receiver is not available.\n * <br/> - `'LOAD_MEDIA_FAILED'`: Load media failed.\n *\n * @remarks\n * <br/> - The error codes correspond to the error codes documented in the {@link https://developers.google.com/cast/docs/reference/chrome/chrome.cast.html#.ErrorCode | Chromecast API reference}.\n *\n * @public\n */\nexport type ChromecastErrorCode =\n | 'CANCEL'\n | 'TIMEOUT'\n | 'API_NOT_INITIALIZED'\n | 'INVALID_PARAMETER'\n | 'EXTENSION_NOT_COMPATIBLE'\n | 'EXTENSION_MISSING'\n | 'RECEIVER_UNAVAILABLE'\n | 'SESSION_ERROR'\n | 'CHANNEL_ERROR'\n | 'LOAD_MEDIA_FAILED';\n\n/**\n * An error that occurred while casting or attempting to cast to Chromecast.\n *\n * @public\n */\nexport interface ChromecastError {\n /**\n * The error code of the error.\n */\n errorCode: ChromecastErrorCode;\n\n /**\n * The human-readable description of the error.\n */\n description: string;\n}\n"],"mappings":""}
@@ -1,2 +1,3 @@
1
1
  export * from './PlayerError';
2
+ export * from './ChromecastError';
2
3
  //# sourceMappingURL=barrel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './PlayerError';\n"],"mappings":"AAAA,cAAc,eAAd"}
1
+ {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './PlayerError';\nexport * from './ChromecastError';\n"],"mappings":"AAAA,cAAc,eAAd;AACA,cAAc,mBAAd"}
@@ -0,0 +1,14 @@
1
+ export const CastEventNames = [
2
+ /**
3
+ * Dispatched when the ChromeCast state was changed.
4
+ */
5
+ 'chromecaststatechange',
6
+ /**
7
+ * Dispatched when the Airplay state was changed.
8
+ */
9
+ 'airplaystatechange',
10
+ /**
11
+ * Dispatched when an error occurred when using Chromecast.
12
+ */
13
+ 'chromecasterror'];
14
+ //# sourceMappingURL=CastEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CastEventNames"],"sources":["CastEvent.ts"],"sourcesContent":["import type { CastState, ChromecastError } from 'react-native-theoplayer';\n\nexport const CastEventNames = [\n /**\n * Dispatched when the ChromeCast state was changed.\n */\n 'chromecaststatechange',\n\n /**\n * Dispatched when the Airplay state was changed.\n */\n 'airplaystatechange',\n\n /**\n * Dispatched when an error occurred when using Chromecast.\n */\n 'chromecasterror',\n] as const;\n\nexport type CastEventType = typeof CastEventNames[number];\n\nexport interface CastEvent {\n /**\n * Type of ad event.\n */\n readonly type: CastEventType;\n}\n\nexport interface ChromecastChangeEvent extends CastEvent {\n readonly type: 'chromecaststatechange';\n\n readonly state: CastState;\n}\n\nexport interface AirplayStateChangeEvent extends CastEvent {\n readonly type: 'airplaystatechange';\n\n readonly state: CastState;\n}\n\nexport interface ChromecastErrorEvent extends CastEvent {\n readonly type: 'chromecasterror';\n\n readonly error: ChromecastError;\n}\n"],"mappings":"AAEA,OAAO,MAAMA,cAAc,GAAG;AAC5B;AACF;AACA;AACE,uBAJ4B;AAM5B;AACF;AACA;AACE,oBAT4B;AAW5B;AACF;AACA;AACE,iBAd4B,CAAvB"}
@@ -3,6 +3,7 @@ export let TrackListEventType;
3
3
  (function (TrackListEventType) {
4
4
  TrackListEventType[TrackListEventType["AddTrack"] = 0] = "AddTrack";
5
5
  TrackListEventType[TrackListEventType["RemoveTrack"] = 1] = "RemoveTrack";
6
+ TrackListEventType[TrackListEventType["ChangeTrack"] = 2] = "ChangeTrack";
6
7
  })(TrackListEventType || (TrackListEventType = {}));
7
8
 
8
9
  export let TextTrackEventType;
@@ -11,4 +12,17 @@ export let TextTrackEventType;
11
12
  TextTrackEventType[TextTrackEventType["AddCue"] = 0] = "AddCue";
12
13
  TextTrackEventType[TextTrackEventType["RemoveCue"] = 1] = "RemoveCue";
13
14
  })(TextTrackEventType || (TextTrackEventType = {}));
15
+
16
+ export let MediaTrackType;
17
+
18
+ (function (MediaTrackType) {
19
+ MediaTrackType[MediaTrackType["Audio"] = 0] = "Audio";
20
+ MediaTrackType[MediaTrackType["Video"] = 1] = "Video";
21
+ })(MediaTrackType || (MediaTrackType = {}));
22
+
23
+ export let MediaTrackEventType;
24
+
25
+ (function (MediaTrackEventType) {
26
+ MediaTrackEventType[MediaTrackEventType["ActiveQualityChanged"] = 0] = "ActiveQualityChanged";
27
+ })(MediaTrackEventType || (MediaTrackEventType = {}));
14
28
  //# sourceMappingURL=TrackEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["TrackListEventType","TextTrackEventType"],"sources":["TrackEvent.ts"],"sourcesContent":["import type { TextTrack } from '../track/TextTrack';\nimport type { TextTrackCue } from '../track/TextTrackCue';\n\nexport enum TrackListEventType {\n /**\n * Dispatched when track has been added to the track list.\n */\n AddTrack,\n\n /**\n * Dispatched when track has been removed from the track list.\n */\n RemoveTrack,\n}\n\nexport interface TextTrackListEvent {\n /**\n * The type of text track list event.\n */\n readonly type: TrackListEventType;\n\n /**\n * The relevant text track.\n */\n readonly track: TextTrack;\n}\n\nexport enum TextTrackEventType {\n /**\n * Dispatched when cue has been added to the text track.\n */\n AddCue,\n\n /**\n * Dispatched when cue has been removed from the text track.\n */\n RemoveCue,\n}\n\nexport interface TextTrackEvent {\n /**\n * The type of text track event.\n */\n readonly type: TextTrackEventType;\n\n /**\n * The text track's uid to which this cue belongs.\n */\n readonly trackUid: number;\n\n /**\n * The text track's cue.\n */\n readonly cue: TextTrackCue;\n}\n"],"mappings":"AAGA,WAAYA,kBAAZ;;WAAYA,kB;EAAAA,kB,CAAAA,kB;EAAAA,kB,CAAAA,kB;GAAAA,kB,KAAAA,kB;;AAwBZ,WAAYC,kBAAZ;;WAAYA,kB;EAAAA,kB,CAAAA,kB;EAAAA,kB,CAAAA,kB;GAAAA,kB,KAAAA,kB"}
1
+ {"version":3,"names":["TrackListEventType","TextTrackEventType","MediaTrackType","MediaTrackEventType"],"sources":["TrackEvent.ts"],"sourcesContent":["import type { TextTrack } from '../track/TextTrack';\nimport type { TextTrackCue } from '../track/TextTrackCue';\nimport type { MediaTrack } from '../track/MediaTrack';\nimport type { Quality } from '../track/Quality';\n\nexport enum TrackListEventType {\n /**\n * Dispatched when track has been added to the track list.\n */\n AddTrack,\n\n /**\n * Dispatched when track has been removed from the track list.\n */\n RemoveTrack,\n\n /**\n * Fired when a track has been changed.\n */\n ChangeTrack,\n}\n\nexport interface TrackListEvent {\n /**\n * The type of track list event.\n */\n readonly type: TrackListEventType;\n}\n\nexport interface TextTrackListEvent extends TrackListEvent {\n /**\n * The relevant text track.\n */\n readonly track: TextTrack;\n}\n\nexport enum TextTrackEventType {\n /**\n * Dispatched when cue has been added to the text track.\n */\n AddCue,\n\n /**\n * Dispatched when cue has been removed from the text track.\n */\n RemoveCue,\n}\n\nexport interface TextTrackEvent {\n /**\n * The type of text track event.\n */\n readonly type: TextTrackEventType;\n\n /**\n * The text track's uid to which this cue belongs.\n */\n readonly trackUid: number;\n\n /**\n * The text track's cue.\n */\n readonly cue: TextTrackCue;\n}\n\nexport enum MediaTrackType {\n Audio,\n\n Video,\n}\n\nexport interface MediaTrackListEvent extends TrackListEvent {\n /**\n * The relevant media track type, either {@link MediaTrackType.Audio} or {@link MediaTrackType.Video}.\n */\n readonly trackType: MediaTrackType;\n\n /**\n * The relevant media track.\n */\n readonly track: MediaTrack;\n}\n\nexport enum MediaTrackEventType {\n /**\n * Dispatched when the media track's active quality changes.\n */\n ActiveQualityChanged,\n}\n\nexport interface MediaTrackEvent {\n /**\n * The type of media track event.\n */\n readonly type: MediaTrackEventType;\n\n /**\n * The media track's type to which event belongs, either {@link MediaTrackType.Audio} or {@link MediaTrackType.Video}.\n */\n readonly trackType: MediaTrackType;\n\n /**\n * The media track's uid to which event belongs.\n */\n readonly trackUid: number;\n\n /**\n * The affected media track's qualities.\n */\n readonly qualities?: Quality | Quality[];\n}\n"],"mappings":"AAKA,WAAYA,kBAAZ;;WAAYA,kB;EAAAA,kB,CAAAA,kB;EAAAA,kB,CAAAA,kB;EAAAA,kB,CAAAA,kB;GAAAA,kB,KAAAA,kB;;AA+BZ,WAAYC,kBAAZ;;WAAYA,kB;EAAAA,kB,CAAAA,kB;EAAAA,kB,CAAAA,kB;GAAAA,kB,KAAAA,kB;;AA6BZ,WAAYC,cAAZ;;WAAYA,c;EAAAA,c,CAAAA,c;EAAAA,c,CAAAA,c;GAAAA,c,KAAAA,c;;AAkBZ,WAAYC,mBAAZ;;WAAYA,mB;EAAAA,mB,CAAAA,mB;GAAAA,mB,KAAAA,mB"}
@@ -1,4 +1,5 @@
1
+ export * from './AdEvent';
2
+ export * from './CastEvent';
1
3
  export * from './PlayerEvent';
2
4
  export * from './TrackEvent';
3
- export * from './AdEvent';
4
5
  //# sourceMappingURL=barrel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './PlayerEvent';\nexport * from './TrackEvent';\nexport * from './AdEvent';\n"],"mappings":"AAAA,cAAc,eAAd;AACA,cAAc,cAAd;AACA,cAAc,WAAd"}
1
+ {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './AdEvent';\nexport * from './CastEvent';\nexport * from './PlayerEvent';\nexport * from './TrackEvent';\n"],"mappings":"AAAA,cAAc,WAAd;AACA,cAAc,aAAd;AACA,cAAc,eAAd;AACA,cAAc,cAAd"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["SourceDescription.ts"],"sourcesContent":["/**\n * Represents a media resource.\n *\n * @remarks\n * <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource}.\n *\n * @public\n */\nimport type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration';\nimport type { DRMConfiguration } from './drm/DRMConfiguration';\nimport type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';\nimport type { AdDescription } from './ads/Ads';\nimport type { ServerSideAdInsertionConfiguration } from \"./ads/ssai/ServerSideAdInsertionConfiguration\";\n\nexport type Source = TypedSource;\n\n/**\n * A media resource or list of media resources.\n *\n * @remarks\n * <br/> - The order of sources when using a list determines their priority when attempting playback.\n *\n * @public\n */\nexport type Sources = Source | Source[];\n\n/**\n * The cross-origin setting of a source, represented by a value from the following list:\n * <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.\n * <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.\n * <br/> - `''`: Setting the empty string is the same as `'anonymous'`\n *\n * @remarks\n * <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}\n *\n * @public\n */\nexport type CrossOriginSetting = '' | 'anonymous' | 'use-credentials';\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceConfiguration {\n /**\n * List of {@link AdDescription}s to be queued for playback.\n */\n ads?: AdDescription[];\n\n /**\n * Content protection configuration.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The poster of the media source.\n *\n * @remarks\n * <br/> - An empty string (`''`) clears the current poster.\n * <br/> - This poster has priority over {@link ChromelessPlayer.poster}.\n */\n poster?: string;\n\n /**\n * List of text tracks to be side-loaded with the media source.\n *\n * @remarks\n * <br/> - A source change will reset side-loaded text tracks.\n */\n textTracks?: TextTrackDescription[];\n\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.\n */\n timeServer?: string;\n}\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceDescription extends SourceConfiguration {\n /**\n * One or more media resources for playback.\n *\n * @remarks\n * <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.\n * <br/> - The player will try each source in the provided order.\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.\n * In that case, the player will try to play the HLS source instead.\n *\n * ```\n * [{\n * src: 'dash-source-with-drm.mpd'\n * contentProtection: {\n * widevine: {\n * licenseAcquisitionURL: 'https://license.company.com/wv'\n * },\n * playready: {\n * licenseAcquisitionURL: 'https://license.company.com/pr'\n * }\n * }\n * },{\n * src: 'hls-source-with-drm.m3u8',\n * contentProtection: {\n * fairplay: {\n * certificateURL: 'https://license.company.com/fp'\n * }\n * }\n * }]\n * ```\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.\n * In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.\n *\n * ```\n * [{\n * src: 'source.mpd'\n * },{\n * src: 'source.mp4'\n * }]\n * ```\n */\n sources?: Sources;\n}\n\n/**\n * Describes the configuration of a side-loaded text track.\n *\n * @public\n */\nexport interface TextTrackDescription {\n /**\n * Whether the text track should be enabled by default.\n *\n * @remarks\n * <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.\n *\n * @defaultValue `false`\n */\n default?: boolean;\n\n /**\n * The kind of the text track, represented by a value from the following list:\n * <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.\n * <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).\n * <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).\n * <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).\n * <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.\n *\n * @remarks\n * <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.\n *\n * @defaultValue `'subtitles'`\n */\n kind?: string;\n\n /**\n * The format of the track, represented by a value from the following list:\n * <br/> - `'srt'`\n * <br/> - `'ttml'`\n * <br/> - `'webvtt'`\n * <br/> - `'emsg'`\n * <br/> - `'eventstream'`\n * <br/> - `'id3'`\n * <br/> - `'cea608'`\n * <br/> - `'daterange'`\n *\n * @defaultValue `''`\n */\n format?: string;\n\n /**\n * The source URL of the text track.\n */\n src: string;\n\n /**\n * The language of the text track.\n */\n srclang?: string;\n\n /**\n * A label for the text track.\n *\n * @remarks\n * <br/> - This will be used as an identifier on the player API and in the UI.\n */\n label?: string;\n\n /**\n * The identifier of this text track.\n *\n * @internal\n */\n // Note: This works for HLS, but not for DASH.\n id?: string;\n}\n\n/**\n * Represents the common properties of a media resource.\n *\n * @public\n */\nexport interface BaseSource {\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - Available since v2.47.0.\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Whether the source should be played in the low-latency-mode of the player.\n *\n * @defaultValue `false`\n *\n * @remarks\n * <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.\n * <br/> - Available since v2.62.0.\n */\n lowLatency?: boolean;\n\n /**\n * The configuration for controlling playback of an MPEG-DASH stream.\n *\n * @remarks\n * <br/> - Available since v2.79.0.\n * <br/> - Ignored for non-DASH streams.\n */\n dash?: DashPlaybackConfiguration;\n\n /**\n * The configuration for controlling playback of an HLS stream.\n *\n * @remarks\n * <br/> - Available since v2.82.0.\n * <br/> - Ignored for non-HLS streams.\n */\n hls?: HlsPlaybackConfiguration;\n}\n\n/**\n * Represents a media resource characterized by a URL to the resource and optionally information about the resource.\n *\n * @public\n */\nexport interface TypedSource extends BaseSource {\n /**\n * The source URL of the media resource.\n *\n * @remarks\n * <br/> - Required if the `ssai` property is absent.\n * <br/> - Available since v2.4.0.\n */\n src?: string;\n\n /**\n * The content type (MIME type) of the media resource, represented by a value from the following list:\n * <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.\n * <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.\n * <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.\n * <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.\n *\n * @remarks\n * <br/> - Available since v2.4.0.\n */\n type?: string;\n\n /**\n * The content protection parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.15.0.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The Server-side Ad Insertion parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.12.0.\n */\n ssai?: ServerSideAdInsertionConfiguration;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["SourceDescription.ts"],"sourcesContent":["/**\n * Represents a media resource.\n *\n * @remarks\n * <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource}.\n *\n * @public\n */\nimport type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration';\nimport type { DRMConfiguration } from './drm/DRMConfiguration';\nimport type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';\nimport type { AdDescription } from './ads/Ads';\nimport type { MetadataDescription } from './metadata/MetadataDescription';\nimport type { ServerSideAdInsertionConfiguration } from \"./ads/ssai/ServerSideAdInsertionConfiguration\";\n\nexport type Source = TypedSource;\n\n/**\n * A media resource or list of media resources.\n *\n * @remarks\n * <br/> - The order of sources when using a list determines their priority when attempting playback.\n *\n * @public\n */\nexport type Sources = Source | Source[];\n\n/**\n * The cross-origin setting of a source, represented by a value from the following list:\n * <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.\n * <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.\n * <br/> - `''`: Setting the empty string is the same as `'anonymous'`\n *\n * @remarks\n * <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}\n *\n * @public\n */\nexport type CrossOriginSetting = '' | 'anonymous' | 'use-credentials';\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceConfiguration {\n /**\n * List of {@link AdDescription}s to be queued for playback.\n */\n ads?: AdDescription[];\n\n /**\n * Content protection configuration.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The poster of the media source.\n *\n * @remarks\n * <br/> - An empty string (`''`) clears the current poster.\n * <br/> - This poster has priority over {@link ChromelessPlayer.poster}.\n */\n poster?: string;\n\n /**\n * List of text tracks to be side-loaded with the media source.\n *\n * @remarks\n * <br/> - A source change will reset side-loaded text tracks.\n */\n textTracks?: TextTrackDescription[];\n\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Describes the metadata of a source.\n *\n * @public\n */\n metadata?: MetadataDescription;\n}\n\n/**\n * Describes the configuration of a player's source.\n *\n * @public\n */\nexport interface SourceDescription extends SourceConfiguration {\n /**\n * One or more media resources for playback.\n *\n * @remarks\n * <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.\n * <br/> - The player will try each source in the provided order.\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.\n * In that case, the player will try to play the HLS source instead.\n *\n * ```\n * [{\n * src: 'dash-source-with-drm.mpd'\n * contentProtection: {\n * widevine: {\n * licenseAcquisitionURL: 'https://license.company.com/wv'\n * },\n * playready: {\n * licenseAcquisitionURL: 'https://license.company.com/pr'\n * }\n * }\n * },{\n * src: 'hls-source-with-drm.m3u8',\n * contentProtection: {\n * fairplay: {\n * certificateURL: 'https://license.company.com/fp'\n * }\n * }\n * }]\n * ```\n *\n * @example\n * In this example, the player will first try to play the DASH source.\n * This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.\n * In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.\n *\n * ```\n * [{\n * src: 'source.mpd'\n * },{\n * src: 'source.mp4'\n * }]\n * ```\n */\n sources?: Sources;\n}\n\n/**\n * Describes the configuration of a side-loaded text track.\n *\n * @public\n */\nexport interface TextTrackDescription {\n /**\n * Whether the text track should be enabled by default.\n *\n * @remarks\n * <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.\n *\n * @defaultValue `false`\n */\n default?: boolean;\n\n /**\n * The kind of the text track, represented by a value from the following list:\n * <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.\n * <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).\n * <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).\n * <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).\n * <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.\n *\n * @remarks\n * <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.\n *\n * @defaultValue `'subtitles'`\n */\n kind?: string;\n\n /**\n * The format of the track, represented by a value from the following list:\n * <br/> - `'srt'`\n * <br/> - `'ttml'`\n * <br/> - `'webvtt'`\n * <br/> - `'emsg'`\n * <br/> - `'eventstream'`\n * <br/> - `'id3'`\n * <br/> - `'cea608'`\n * <br/> - `'daterange'`\n *\n * @defaultValue `''`\n */\n format?: string;\n\n /**\n * The source URL of the text track.\n */\n src: string;\n\n /**\n * The language of the text track.\n */\n srclang?: string;\n\n /**\n * A label for the text track.\n *\n * @remarks\n * <br/> - This will be used as an identifier on the player API and in the UI.\n */\n label?: string;\n\n /**\n * The identifier of this text track.\n *\n * @internal\n */\n // Note: This works for HLS, but not for DASH.\n id?: string;\n}\n\n/**\n * Represents the common properties of a media resource.\n *\n * @public\n */\nexport interface BaseSource {\n /**\n * The URL of a time server used by the player to synchronise the time in DASH sources.\n *\n * @remarks\n * <br/> - Available since v2.47.0.\n * <br/> - The time server should return time in ISO-8601 format.\n * <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.\n * <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.\n */\n timeServer?: string;\n\n /**\n * Whether the source should be played in the low-latency-mode of the player.\n *\n * @defaultValue `false`\n *\n * @remarks\n * <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.\n * <br/> - Available since v2.62.0.\n */\n lowLatency?: boolean;\n\n /**\n * The configuration for controlling playback of an MPEG-DASH stream.\n *\n * @remarks\n * <br/> - Available since v2.79.0.\n * <br/> - Ignored for non-DASH streams.\n */\n dash?: DashPlaybackConfiguration;\n\n /**\n * The configuration for controlling playback of an HLS stream.\n *\n * @remarks\n * <br/> - Available since v2.82.0.\n * <br/> - Ignored for non-HLS streams.\n */\n hls?: HlsPlaybackConfiguration;\n}\n\n/**\n * Represents a media resource characterized by a URL to the resource and optionally information about the resource.\n *\n * @public\n */\nexport interface TypedSource extends BaseSource {\n /**\n * The source URL of the media resource.\n *\n * @remarks\n * <br/> - Required if the `ssai` property is absent.\n * <br/> - Available since v2.4.0.\n */\n src?: string;\n\n /**\n * The content type (MIME type) of the media resource, represented by a value from the following list:\n * <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.\n * <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.\n * <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.\n * <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.\n *\n * @remarks\n * <br/> - Available since v2.4.0.\n */\n type?: string;\n\n /**\n * The content protection parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.15.0.\n */\n contentProtection?: DRMConfiguration;\n\n /**\n * The Server-side Ad Insertion parameters for the media resource.\n *\n * @remarks\n * <br/> - Available since v2.12.0.\n */\n ssai?: ServerSideAdInsertionConfiguration;\n}\n"],"mappings":""}
@@ -2,5 +2,6 @@ export * from './ads/barrel';
2
2
  export * from './drm/barrel';
3
3
  export * from './dash/barrel';
4
4
  export * from './hls/barrel';
5
+ export * from './metadata/barrel';
5
6
  export * from './SourceDescription';
6
7
  //# sourceMappingURL=barrel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './ads/barrel';\nexport * from './drm/barrel';\nexport * from './dash/barrel';\nexport * from './hls/barrel';\nexport * from './SourceDescription';\n"],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,cAAd;AACA,cAAc,eAAd;AACA,cAAc,cAAd;AACA,cAAc,qBAAd"}
1
+ {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './ads/barrel';\nexport * from './drm/barrel';\nexport * from './dash/barrel';\nexport * from './hls/barrel';\nexport * from './metadata/barrel';\nexport * from './SourceDescription';\n"],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,cAAd;AACA,cAAc,eAAd;AACA,cAAc,cAAd;AACA,cAAc,mBAAd;AACA,cAAc,qBAAd"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=MetadataDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["MetadataDescription.ts"],"sourcesContent":["/**\n * Describes the metadata of a source.\n *\n * @public\n */\nexport interface MetadataDescription {\n [metadataKey: string]: any;\n\n /**\n * The title of the content.\n */\n readonly title?: string;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './MetadataDescription';
2
+ //# sourceMappingURL=barrel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './MetadataDescription';\n"],"mappings":"AAAA,cAAc,uBAAd"}
@@ -6,6 +6,7 @@ import React, { PureComponent } from 'react';
6
6
  import { findNodeHandle, StyleSheet, requireNativeComponent, View, UIManager, Platform } from 'react-native';
7
7
  import styles from './THEOplayerView.style';
8
8
  import { THEOplayerNativeAdsAPI } from './ads/THEOplayerNativeAdsAPI';
9
+ import { THEOplayerNativeCastAPI } from './cast/THEOplayerNativeCastApi';
9
10
  import { decodeNanInf } from './utils/TypeUtils';
10
11
  export class THEOplayerView extends PureComponent {
11
12
  constructor(props) {
@@ -15,6 +16,8 @@ export class THEOplayerView extends PureComponent {
15
16
 
16
17
  _defineProperty(this, "_adsApi", void 0);
17
18
 
19
+ _defineProperty(this, "_castApi", void 0);
20
+
18
21
  _defineProperty(this, "_onSourceChange", () => {
19
22
  this.reset();
20
23
 
@@ -147,12 +150,30 @@ export class THEOplayerView extends PureComponent {
147
150
  }
148
151
  });
149
152
 
153
+ _defineProperty(this, "_onMediaTrackListEvent", event => {
154
+ if (this.props.onMediaTrackListEvent) {
155
+ this.props.onMediaTrackListEvent(event.nativeEvent);
156
+ }
157
+ });
158
+
159
+ _defineProperty(this, "_onMediaTrackEvent", event => {
160
+ if (this.props.onMediaTrackEvent) {
161
+ this.props.onMediaTrackEvent(event.nativeEvent);
162
+ }
163
+ });
164
+
150
165
  _defineProperty(this, "_onAdEvent", event => {
151
166
  if (this.props.onAdEvent) {
152
167
  this.props.onAdEvent(event.nativeEvent);
153
168
  }
154
169
  });
155
170
 
171
+ _defineProperty(this, "_onCastEvent", event => {
172
+ if (this.props.onCastEvent) {
173
+ this.props.onCastEvent(event.nativeEvent);
174
+ }
175
+ });
176
+
156
177
  _defineProperty(this, "_onFullscreenPlayerWillPresent", () => {
157
178
  if (this.props.onFullscreenPlayerWillPresent) {
158
179
  this.props.onFullscreenPlayerWillPresent();
@@ -180,6 +201,7 @@ export class THEOplayerView extends PureComponent {
180
201
  this._root = /*#__PURE__*/React.createRef();
181
202
  this.state = THEOplayerView.initialState;
182
203
  this._adsApi = new THEOplayerNativeAdsAPI(this);
204
+ this._castApi = new THEOplayerNativeCastAPI(this);
183
205
  }
184
206
 
185
207
  componentWillUnmount() {
@@ -214,6 +236,10 @@ export class THEOplayerView extends PureComponent {
214
236
  return this._adsApi;
215
237
  }
216
238
 
239
+ get cast() {
240
+ return this._castApi;
241
+ }
242
+
217
243
  reset() {
218
244
  this.setState(THEOplayerView.initialState);
219
245
  }
@@ -280,7 +306,10 @@ export class THEOplayerView extends PureComponent {
280
306
  onNativeSegmentNotFound: this._onSegmentNotFound,
281
307
  onNativeTextTrackListEvent: this._onTextTrackListEvent,
282
308
  onNativeTextTrackEvent: this._onTextTrackEvent,
309
+ onNativeMediaTrackListEvent: this._onMediaTrackListEvent,
310
+ onNativeMediaTrackEvent: this._onMediaTrackEvent,
283
311
  onNativeAdEvent: this._onAdEvent,
312
+ onNativeCastEvent: this._onCastEvent,
284
313
  onNativeFullscreenPlayerWillPresent: this._onFullscreenPlayerWillPresent,
285
314
  onNativeFullscreenPlayerDidPresent: this._onFullscreenPlayerDidPresent,
286
315
  onNativeFullscreenPlayerWillDismiss: this._onFullscreenPlayerWillDismiss,