react-native-theoplayer 1.6.1 → 1.7.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.
- package/README.md +4 -0
- package/android/build.gradle +70 -25
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.3.0/ads-wrapper-4.3.0.aar +0 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.3.0/ads-wrapper-4.3.0.pom +9 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml +13 -0
- package/android/src/main/java/com/theoplayer/PlayerConfigHelper.java +40 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.java +8 -3
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.java +131 -28
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.java +14 -1
- package/android/src/main/java/com/theoplayer/SourceHelper.java +137 -86
- package/android/src/main/java/com/theoplayer/VideoEventEmitter.java +44 -12
- package/android/src/main/java/com/theoplayer/abr/ABRConfigurationAdapter.kt +72 -0
- package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.java +92 -0
- package/android/src/main/java/com/theoplayer/ads/AdInfo.java +168 -0
- package/android/src/main/java/com/theoplayer/ads/AdsModule.java +152 -0
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionAdapter.kt +143 -0
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +269 -0
- package/android/src/main/java/com/theoplayer/drm/KeySystemAdapter.kt +22 -0
- package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegration.kt +33 -0
- package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegrationFactory.kt +19 -0
- package/android/src/main/java/com/theoplayer/drm/RequestMethodAdapter.kt +28 -0
- package/android/src/main/java/com/theoplayer/track/QualityListAdapter.java +54 -0
- package/android/src/main/java/com/theoplayer/track/QualityListFilter.java +40 -0
- package/android/src/main/java/com/theoplayer/track/TrackListInfo.java +10 -2
- package/android/src/main/java/com/theoplayer/util/TypeUtils.kt +17 -0
- package/android/src/main/java/com/theoplayer/util/ViewResolver.java +42 -0
- package/ios/THEOplayerRCTAdAggregator.swift +158 -0
- package/ios/THEOplayerRCTAdsAPI.swift +296 -0
- package/ios/THEOplayerRCTBridge.m +65 -0
- package/ios/THEOplayerRCTContentProtectionAPI.swift +359 -0
- package/ios/THEOplayerRCTContentProtectionAggregator.swift +119 -0
- package/ios/THEOplayerRCTDebug.swift +11 -5
- package/ios/THEOplayerRCTMetadataAggregator.swift +1 -1
- package/ios/THEOplayerRCTNetworkUtils.swift +54 -0
- package/ios/THEOplayerRCTProxyContentProtectionIntegration.swift +155 -0
- package/ios/THEOplayerRCTProxyContentProtectionIntegrationFactory.swift +32 -0
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +223 -30
- package/ios/THEOplayerRCTTypeUtils.swift +18 -0
- package/ios/THEOplayerRCTView.swift +109 -49
- package/ios/THEOplayerRCTViewAdEventHandler.swift +238 -0
- package/ios/{THEOplayerRCTViewEventHandler.swift → THEOplayerRCTViewMainEventHandler.swift} +7 -119
- package/ios/THEOplayerRCTViewTextTrackEventHandler.swift +134 -0
- package/ios/Theoplayer-Bridging-Header.h +3 -1
- package/ios/custom/Frameworks/ios/put_custom_ios_xcframework_here.txt +2 -0
- package/ios/custom/react-native-theoplayer_custom_ios.podspec +36 -0
- package/ios/custom/theofeatures.sh +14 -0
- package/lib/commonjs/api/THEOplayerView.js.map +1 -1
- package/lib/commonjs/api/abr/ABRConfiguration.js +2 -0
- package/lib/commonjs/api/abr/ABRConfiguration.js.map +1 -0
- package/lib/commonjs/api/abr/barrel.js +19 -0
- package/lib/commonjs/api/abr/barrel.js.map +1 -0
- package/lib/commonjs/api/ads/Ad.js +6 -0
- package/lib/commonjs/api/ads/Ad.js.map +1 -0
- package/lib/commonjs/api/ads/AdBreak.js +6 -0
- package/lib/commonjs/api/ads/AdBreak.js.map +1 -0
- package/lib/commonjs/api/ads/AdsAPI.js +6 -0
- package/lib/commonjs/api/ads/AdsAPI.js.map +1 -0
- package/lib/commonjs/api/ads/AdsConfiguration.js +6 -0
- package/lib/commonjs/api/ads/AdsConfiguration.js.map +1 -0
- package/lib/commonjs/api/ads/CompanionAd.js +2 -0
- package/lib/commonjs/api/ads/CompanionAd.js.map +1 -0
- package/lib/commonjs/api/ads/GoogleDai.js +2 -0
- package/lib/commonjs/api/ads/GoogleDai.js.map +1 -0
- package/lib/commonjs/api/ads/GoogleImaAd.js +6 -0
- package/lib/commonjs/api/ads/GoogleImaAd.js.map +1 -0
- package/lib/commonjs/api/ads/GoogleImaConfiguration.js +2 -0
- package/lib/commonjs/api/ads/GoogleImaConfiguration.js.map +1 -0
- package/lib/commonjs/api/ads/barrel.js +110 -0
- package/lib/commonjs/api/ads/barrel.js.map +1 -0
- package/lib/commonjs/api/barrel.js +58 -6
- package/lib/commonjs/api/barrel.js.map +1 -1
- package/lib/commonjs/api/config/PlayerConfiguration.js +4 -0
- package/lib/commonjs/api/config/PlayerConfiguration.js.map +1 -1
- package/lib/commonjs/api/drm/ContentProtectionAPI.js +6 -0
- package/lib/commonjs/api/drm/ContentProtectionAPI.js.map +1 -0
- package/lib/commonjs/api/drm/ContentProtectionIntegration.js +6 -0
- package/lib/commonjs/api/drm/ContentProtectionIntegration.js.map +1 -0
- package/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.js +6 -0
- package/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.js.map +1 -0
- package/lib/commonjs/api/drm/ContentProtectionRequest.js +2 -0
- package/lib/commonjs/api/drm/ContentProtectionRequest.js.map +1 -0
- package/lib/commonjs/api/drm/ContentProtectionResponse.js +6 -0
- package/lib/commonjs/api/drm/ContentProtectionResponse.js.map +1 -0
- package/lib/commonjs/api/drm/barrel.js +71 -0
- package/lib/commonjs/api/drm/barrel.js.map +1 -0
- package/lib/commonjs/api/event/AdEvent.js +89 -0
- package/lib/commonjs/api/event/AdEvent.js.map +1 -0
- package/lib/commonjs/api/event/barrel.js +13 -0
- package/lib/commonjs/api/event/barrel.js.map +1 -1
- package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
- package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js +6 -0
- package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js.map +1 -0
- package/lib/commonjs/api/source/ads/IMAAdDescription.js +6 -0
- package/lib/commonjs/api/source/ads/IMAAdDescription.js.map +1 -0
- package/lib/commonjs/api/source/ads/SpotXAdDescription.js +6 -0
- package/lib/commonjs/api/source/ads/SpotXAdDescription.js.map +1 -0
- package/lib/commonjs/api/source/ads/THEOplayerAdDescription.js +6 -0
- package/lib/commonjs/api/source/ads/THEOplayerAdDescription.js.map +1 -0
- package/lib/commonjs/api/source/ads/barrel.js +84 -0
- package/lib/commonjs/api/source/ads/barrel.js.map +1 -0
- package/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.js +6 -0
- package/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js +6 -0
- package/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js +6 -0
- package/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js +6 -0
- package/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/ads/ssai/barrel.js +58 -0
- package/lib/commonjs/api/source/ads/ssai/barrel.js.map +1 -0
- package/lib/commonjs/api/source/barrel.js +16 -3
- package/lib/commonjs/api/source/barrel.js.map +1 -1
- package/lib/commonjs/api/source/drm/DRMConfiguration.js.map +1 -1
- package/lib/commonjs/api/track/MediaTrack.js +29 -0
- package/lib/commonjs/api/track/MediaTrack.js.map +1 -1
- package/lib/commonjs/api/utils/TypeUtils.js +62 -0
- package/lib/commonjs/api/utils/TypeUtils.js.map +1 -0
- package/lib/commonjs/api/utils/barrel.js +19 -0
- package/lib/commonjs/api/utils/barrel.js.map +1 -0
- package/lib/commonjs/index.js +10 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.js +42 -3
- package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.web.js +41 -2
- package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
- package/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.js +54 -0
- package/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.js.map +1 -0
- package/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.js +34 -0
- package/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.js.map +1 -0
- package/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.js +78 -0
- package/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.js.map +1 -0
- package/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.js +32 -0
- package/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.js.map +1 -0
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.js +214 -0
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.js.map +1 -0
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.web.js +20 -0
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.web.js.map +1 -0
- package/lib/commonjs/internal/drm/NativeCertificateRequest.js +41 -0
- package/lib/commonjs/internal/drm/NativeCertificateRequest.js.map +1 -0
- package/lib/commonjs/internal/drm/NativeCertificateResponse.js +41 -0
- package/lib/commonjs/internal/drm/NativeCertificateResponse.js.map +1 -0
- package/lib/commonjs/internal/drm/NativeContentProtectionEvent.js +2 -0
- package/lib/commonjs/internal/drm/NativeContentProtectionEvent.js.map +1 -0
- package/lib/commonjs/internal/drm/NativeLicenseRequest.js +44 -0
- package/lib/commonjs/internal/drm/NativeLicenseRequest.js.map +1 -0
- package/lib/commonjs/internal/drm/NativeLicenseResponse.js +41 -0
- package/lib/commonjs/internal/drm/NativeLicenseResponse.js.map +1 -0
- package/lib/commonjs/internal/utils/TypeUtils.js +41 -0
- package/lib/commonjs/internal/utils/TypeUtils.js.map +1 -0
- package/lib/commonjs/internal/web/TrackUtils.js +19 -0
- package/lib/commonjs/internal/web/TrackUtils.js.map +1 -1
- package/lib/module/api/THEOplayerView.js.map +1 -1
- package/lib/module/api/abr/ABRConfiguration.js +2 -0
- package/lib/module/api/abr/ABRConfiguration.js.map +1 -0
- package/lib/module/api/abr/barrel.js +2 -0
- package/lib/module/api/abr/barrel.js.map +1 -0
- package/lib/module/api/ads/Ad.js +2 -0
- package/lib/module/api/ads/Ad.js.map +1 -0
- package/lib/module/api/ads/AdBreak.js +2 -0
- package/lib/module/api/ads/AdBreak.js.map +1 -0
- package/lib/module/api/ads/AdsAPI.js +2 -0
- package/lib/module/api/ads/AdsAPI.js.map +1 -0
- package/lib/module/api/ads/AdsConfiguration.js +2 -0
- package/lib/module/api/ads/AdsConfiguration.js.map +1 -0
- package/lib/module/api/ads/CompanionAd.js +2 -0
- package/lib/module/api/ads/CompanionAd.js.map +1 -0
- package/lib/module/api/ads/GoogleDai.js +2 -0
- package/lib/module/api/ads/GoogleDai.js.map +1 -0
- package/lib/module/api/ads/GoogleImaAd.js +2 -0
- package/lib/module/api/ads/GoogleImaAd.js.map +1 -0
- package/lib/module/api/ads/GoogleImaConfiguration.js +2 -0
- package/lib/module/api/ads/GoogleImaConfiguration.js.map +1 -0
- package/lib/module/api/ads/barrel.js +9 -0
- package/lib/module/api/ads/barrel.js.map +1 -0
- package/lib/module/api/barrel.js +5 -1
- package/lib/module/api/barrel.js.map +1 -1
- package/lib/module/api/config/PlayerConfiguration.js +1 -1
- package/lib/module/api/config/PlayerConfiguration.js.map +1 -1
- package/lib/module/api/drm/ContentProtectionAPI.js +2 -0
- package/lib/module/api/drm/ContentProtectionAPI.js.map +1 -0
- package/lib/module/api/drm/ContentProtectionIntegration.js +2 -0
- package/lib/module/api/drm/ContentProtectionIntegration.js.map +1 -0
- package/lib/module/api/drm/ContentProtectionIntegrationFactory.js +2 -0
- package/lib/module/api/drm/ContentProtectionIntegrationFactory.js.map +1 -0
- package/lib/module/api/drm/ContentProtectionRequest.js +2 -0
- package/lib/module/api/drm/ContentProtectionRequest.js.map +1 -0
- package/lib/module/api/drm/ContentProtectionResponse.js +2 -0
- package/lib/module/api/drm/ContentProtectionResponse.js.map +1 -0
- package/lib/module/api/drm/barrel.js +6 -0
- package/lib/module/api/drm/barrel.js.map +1 -0
- package/lib/module/api/event/AdEvent.js +82 -0
- package/lib/module/api/event/AdEvent.js.map +1 -0
- package/lib/module/api/event/barrel.js +1 -0
- package/lib/module/api/event/barrel.js.map +1 -1
- package/lib/module/api/source/SourceDescription.js.map +1 -1
- package/lib/module/api/source/ads/FreeWheelAdDescription.js +2 -0
- package/lib/module/api/source/ads/FreeWheelAdDescription.js.map +1 -0
- package/lib/module/api/source/ads/IMAAdDescription.js +2 -0
- package/lib/module/api/source/ads/IMAAdDescription.js.map +1 -0
- package/lib/module/api/source/ads/SpotXAdDescription.js +2 -0
- package/lib/module/api/source/ads/SpotXAdDescription.js.map +1 -0
- package/lib/module/api/source/ads/THEOplayerAdDescription.js +2 -0
- package/lib/module/api/source/ads/THEOplayerAdDescription.js.map +1 -0
- package/lib/module/api/source/ads/barrel.js +7 -0
- package/lib/module/api/source/ads/barrel.js.map +1 -0
- package/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.js +2 -0
- package/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.js.map +1 -0
- package/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js +2 -0
- package/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js.map +1 -0
- package/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js +2 -0
- package/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.js.map +1 -0
- package/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js +2 -0
- package/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js.map +1 -0
- package/lib/module/api/source/ads/ssai/barrel.js +5 -0
- package/lib/module/api/source/ads/ssai/barrel.js.map +1 -0
- package/lib/module/api/source/barrel.js +1 -0
- package/lib/module/api/source/barrel.js.map +1 -1
- package/lib/module/api/source/drm/DRMConfiguration.js.map +1 -1
- package/lib/module/api/track/MediaTrack.js +23 -1
- package/lib/module/api/track/MediaTrack.js.map +1 -1
- package/lib/module/api/utils/TypeUtils.js +36 -0
- package/lib/module/api/utils/TypeUtils.js.map +1 -0
- package/lib/module/api/utils/barrel.js +2 -0
- package/lib/module/api/utils/barrel.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/THEOplayerView.js +40 -3
- package/lib/module/internal/THEOplayerView.js.map +1 -1
- package/lib/module/internal/THEOplayerView.web.js +42 -4
- package/lib/module/internal/THEOplayerView.web.js.map +1 -1
- package/lib/module/internal/ads/THEOplayerNativeAdsAPI.js +43 -0
- package/lib/module/internal/ads/THEOplayerNativeAdsAPI.js.map +1 -0
- package/lib/module/internal/ads/THEOplayerNativeGoogleDAI.js +24 -0
- package/lib/module/internal/ads/THEOplayerNativeGoogleDAI.js.map +1 -0
- package/lib/module/internal/ads/THEOplayerWebAdsAPI.js +68 -0
- package/lib/module/internal/ads/THEOplayerWebAdsAPI.js.map +1 -0
- package/lib/module/internal/ads/THEOplayerWebGoogleDAI.js +23 -0
- package/lib/module/internal/ads/THEOplayerWebGoogleDAI.js.map +1 -0
- package/lib/module/internal/drm/ContentProtectionRegistry.js +188 -0
- package/lib/module/internal/drm/ContentProtectionRegistry.js.map +1 -0
- package/lib/module/internal/drm/ContentProtectionRegistry.web.js +9 -0
- package/lib/module/internal/drm/ContentProtectionRegistry.web.js.map +1 -0
- package/lib/module/internal/drm/NativeCertificateRequest.js +31 -0
- package/lib/module/internal/drm/NativeCertificateRequest.js.map +1 -0
- package/lib/module/internal/drm/NativeCertificateResponse.js +30 -0
- package/lib/module/internal/drm/NativeCertificateResponse.js.map +1 -0
- package/lib/module/internal/drm/NativeContentProtectionEvent.js +2 -0
- package/lib/module/internal/drm/NativeContentProtectionEvent.js.map +1 -0
- package/lib/module/internal/drm/NativeLicenseRequest.js +34 -0
- package/lib/module/internal/drm/NativeLicenseRequest.js.map +1 -0
- package/lib/module/internal/drm/NativeLicenseResponse.js +30 -0
- package/lib/module/internal/drm/NativeLicenseResponse.js.map +1 -0
- package/lib/module/internal/utils/TypeUtils.js +24 -0
- package/lib/module/internal/utils/TypeUtils.js.map +1 -0
- package/lib/module/internal/web/TrackUtils.js +15 -0
- package/lib/module/internal/web/TrackUtils.js.map +1 -1
- package/lib/typescript/lib/commonjs/api/abr/ABRConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/abr/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/ads/Ad.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/ads/AdBreak.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/ads/AdsAPI.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/ads/AdsConfiguration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/ads/CompanionAd.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/ads/GoogleDai.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/ads/GoogleImaAd.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/ads/GoogleImaConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/ads/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/config/PlayerConfiguration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionAPI.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionIntegration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionRequest.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionResponse.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/drm/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/event/AdEvent.d.ts +2 -0
- package/lib/typescript/lib/commonjs/api/source/ads/FreeWheelAdDescription.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/IMAAdDescription.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/SpotXAdDescription.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/THEOplayerAdDescription.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/track/MediaTrack.d.ts +8 -0
- package/lib/typescript/lib/commonjs/api/utils/TypeUtils.d.ts +13 -0
- package/lib/typescript/lib/commonjs/api/utils/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.d.ts +5 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.web.d.ts +4 -0
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.d.ts +14 -0
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.d.ts +9 -0
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.d.ts +14 -0
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.d.ts +9 -0
- package/lib/typescript/lib/commonjs/internal/drm/ContentProtectionRegistry.d.ts +14 -0
- package/lib/typescript/lib/commonjs/internal/drm/ContentProtectionRegistry.web.d.ts +5 -0
- package/lib/typescript/lib/commonjs/internal/drm/NativeCertificateRequest.d.ts +18 -0
- package/lib/typescript/lib/commonjs/internal/drm/NativeCertificateResponse.d.ts +21 -0
- package/lib/typescript/lib/commonjs/internal/drm/NativeContentProtectionEvent.d.ts +0 -0
- package/lib/typescript/lib/commonjs/internal/drm/NativeLicenseRequest.d.ts +20 -0
- package/lib/typescript/lib/commonjs/internal/drm/NativeLicenseResponse.d.ts +22 -0
- package/lib/typescript/lib/commonjs/internal/utils/TypeUtils.d.ts +6 -0
- package/lib/typescript/lib/commonjs/internal/web/TrackUtils.d.ts +2 -0
- package/lib/typescript/lib/module/api/abr/ABRConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/abr/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/ads/Ad.d.ts +1 -0
- package/lib/typescript/lib/module/api/ads/AdBreak.d.ts +1 -0
- package/lib/typescript/lib/module/api/ads/AdsAPI.d.ts +1 -0
- package/lib/typescript/lib/module/api/ads/AdsConfiguration.d.ts +1 -0
- package/lib/typescript/lib/module/api/ads/CompanionAd.d.ts +0 -0
- package/lib/typescript/lib/module/api/ads/GoogleDai.d.ts +0 -0
- package/lib/typescript/lib/module/api/ads/GoogleImaAd.d.ts +1 -0
- package/lib/typescript/lib/module/api/ads/GoogleImaConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/ads/barrel.d.ts +5 -0
- package/lib/typescript/lib/module/api/barrel.d.ts +5 -1
- package/lib/typescript/lib/module/api/config/PlayerConfiguration.d.ts +1 -0
- package/lib/typescript/lib/module/api/config/barrel.d.ts +1 -1
- package/lib/typescript/lib/module/api/drm/ContentProtectionAPI.d.ts +1 -0
- package/lib/typescript/lib/module/api/drm/ContentProtectionIntegration.d.ts +1 -0
- package/lib/typescript/lib/module/api/drm/ContentProtectionIntegrationFactory.d.ts +1 -0
- package/lib/typescript/lib/module/api/drm/ContentProtectionRequest.d.ts +0 -0
- package/lib/typescript/lib/module/api/drm/ContentProtectionResponse.d.ts +1 -0
- package/lib/typescript/lib/module/api/drm/barrel.d.ts +4 -0
- package/lib/typescript/lib/module/api/event/AdEvent.d.ts +1 -0
- package/lib/typescript/lib/module/api/event/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/FreeWheelAdDescription.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/IMAAdDescription.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/SpotXAdDescription.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/THEOplayerAdDescription.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/barrel.d.ts +5 -0
- package/lib/typescript/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/ssai/barrel.d.ts +4 -0
- package/lib/typescript/lib/module/api/source/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/track/MediaTrack.d.ts +8 -1
- package/lib/typescript/lib/module/api/utils/TypeUtils.d.ts +12 -0
- package/lib/typescript/lib/module/api/utils/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/index.d.ts +1 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.d.ts +8 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.web.d.ts +4 -0
- package/lib/typescript/lib/module/internal/ads/THEOplayerNativeAdsAPI.d.ts +13 -0
- package/lib/typescript/lib/module/internal/ads/THEOplayerNativeGoogleDAI.d.ts +8 -0
- package/lib/typescript/lib/module/internal/ads/THEOplayerWebAdsAPI.d.ts +13 -0
- package/lib/typescript/lib/module/internal/ads/THEOplayerWebGoogleDAI.d.ts +8 -0
- package/lib/typescript/lib/module/internal/drm/ContentProtectionRegistry.d.ts +13 -0
- package/lib/typescript/lib/module/internal/drm/ContentProtectionRegistry.web.d.ts +4 -0
- package/lib/typescript/lib/module/internal/drm/NativeCertificateRequest.d.ts +17 -0
- package/lib/typescript/lib/module/internal/drm/NativeCertificateResponse.d.ts +20 -0
- package/lib/typescript/lib/module/internal/drm/NativeContentProtectionEvent.d.ts +0 -0
- package/lib/typescript/lib/module/internal/drm/NativeLicenseRequest.d.ts +19 -0
- package/lib/typescript/lib/module/internal/drm/NativeLicenseResponse.d.ts +21 -0
- package/lib/typescript/lib/module/internal/utils/TypeUtils.d.ts +5 -0
- package/lib/typescript/lib/module/internal/web/TrackUtils.d.ts +2 -0
- package/lib/typescript/src/api/THEOplayerView.d.ts +25 -4
- package/lib/typescript/src/api/abr/ABRConfiguration.d.ts +95 -0
- package/lib/typescript/src/api/abr/barrel.d.ts +1 -0
- package/lib/typescript/src/api/ads/Ad.d.ts +238 -0
- package/lib/typescript/src/api/ads/AdBreak.d.ts +39 -0
- package/lib/typescript/src/api/ads/AdsAPI.d.ts +46 -0
- package/lib/typescript/src/api/ads/AdsConfiguration.d.ts +69 -0
- package/lib/typescript/src/api/ads/CompanionAd.d.ts +59 -0
- package/lib/typescript/src/api/ads/GoogleDai.d.ts +29 -0
- package/lib/typescript/src/api/ads/GoogleImaAd.d.ts +78 -0
- package/lib/typescript/src/api/ads/GoogleImaConfiguration.d.ts +13 -0
- package/lib/typescript/src/api/ads/barrel.d.ts +8 -0
- package/lib/typescript/src/api/barrel.d.ts +5 -1
- package/lib/typescript/src/api/config/PlayerConfiguration.d.ts +5 -0
- package/lib/typescript/src/api/drm/ContentProtectionAPI.d.ts +5 -0
- package/lib/typescript/src/api/drm/ContentProtectionIntegration.d.ts +86 -0
- package/lib/typescript/src/api/drm/ContentProtectionIntegrationFactory.d.ts +15 -0
- package/lib/typescript/src/api/drm/ContentProtectionRequest.d.ts +56 -0
- package/lib/typescript/src/api/drm/ContentProtectionResponse.d.ts +56 -0
- package/lib/typescript/src/api/drm/barrel.d.ts +5 -0
- package/lib/typescript/src/api/event/AdEvent.d.ts +13 -0
- package/lib/typescript/src/api/event/barrel.d.ts +1 -0
- package/lib/typescript/src/api/source/SourceDescription.d.ts +8 -0
- package/lib/typescript/src/api/source/ads/FreeWheelAdDescription.d.ts +85 -0
- package/lib/typescript/src/api/source/ads/IMAAdDescription.d.ts +25 -0
- package/lib/typescript/src/api/source/ads/SpotXAdDescription.d.ts +115 -0
- package/lib/typescript/src/api/source/ads/THEOplayerAdDescription.d.ts +32 -0
- package/lib/typescript/src/api/source/ads/barrel.d.ts +6 -0
- package/lib/typescript/src/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +130 -0
- package/lib/typescript/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +27 -0
- package/lib/typescript/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +26 -0
- package/lib/typescript/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +46 -0
- package/lib/typescript/src/api/source/ads/ssai/barrel.d.ts +4 -0
- package/lib/typescript/src/api/source/barrel.d.ts +1 -0
- package/lib/typescript/src/api/source/drm/DRMConfiguration.d.ts +0 -30
- package/lib/typescript/src/api/track/MediaTrack.d.ts +5 -2
- package/lib/typescript/src/api/utils/TypeUtils.d.ts +20 -0
- package/lib/typescript/src/api/utils/barrel.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/internal/THEOplayerView.d.ts +10 -4
- package/lib/typescript/src/internal/THEOplayerView.web.d.ts +7 -2
- package/lib/typescript/src/internal/ads/THEOplayerNativeAdsAPI.d.ts +17 -0
- package/lib/typescript/src/internal/ads/THEOplayerNativeGoogleDAI.d.ts +10 -0
- package/lib/typescript/src/internal/ads/THEOplayerWebAdsAPI.d.ts +15 -0
- package/lib/typescript/src/internal/ads/THEOplayerWebGoogleDAI.d.ts +10 -0
- package/lib/typescript/src/internal/drm/ContentProtectionRegistry.d.ts +19 -0
- package/lib/typescript/src/internal/drm/ContentProtectionRegistry.web.d.ts +5 -0
- package/lib/typescript/src/internal/drm/NativeCertificateRequest.d.ts +13 -0
- package/lib/typescript/src/internal/drm/NativeCertificateResponse.d.ts +18 -0
- package/lib/typescript/src/internal/drm/NativeContentProtectionEvent.d.ts +5 -0
- package/lib/typescript/src/internal/drm/NativeLicenseRequest.d.ts +14 -0
- package/lib/typescript/src/internal/drm/NativeLicenseResponse.d.ts +18 -0
- package/lib/typescript/src/internal/utils/TypeUtils.d.ts +5 -0
- package/lib/typescript/src/internal/web/TrackUtils.d.ts +3 -1
- package/package.json +4 -3
- package/src/api/THEOplayerView.ts +29 -4
- package/src/api/abr/ABRConfiguration.ts +103 -0
- package/src/api/abr/barrel.ts +1 -0
- package/src/api/ads/Ad.ts +267 -0
- package/src/api/ads/AdBreak.ts +44 -0
- package/src/api/ads/AdsAPI.ts +53 -0
- package/src/api/ads/AdsConfiguration.ts +76 -0
- package/src/api/ads/CompanionAd.ts +65 -0
- package/src/api/ads/GoogleDai.ts +32 -0
- package/src/api/ads/GoogleImaAd.ts +86 -0
- package/src/api/ads/GoogleImaConfiguration.ts +13 -0
- package/src/api/ads/barrel.ts +8 -0
- package/src/api/barrel.ts +5 -1
- package/src/api/config/PlayerConfiguration.ts +7 -0
- package/src/api/drm/ContentProtectionAPI.ts +6 -0
- package/src/api/drm/ContentProtectionIntegration.ts +93 -0
- package/src/api/drm/ContentProtectionIntegrationFactory.ts +16 -0
- package/src/api/drm/ContentProtectionRequest.ts +60 -0
- package/src/api/drm/ContentProtectionResponse.ts +62 -0
- package/src/api/drm/barrel.ts +5 -0
- package/src/api/event/AdEvent.ts +117 -0
- package/src/api/event/barrel.ts +1 -0
- package/src/api/source/SourceDescription.ts +9 -0
- package/src/api/source/ads/FreeWheelAdDescription.ts +97 -0
- package/src/api/source/ads/IMAAdDescription.ts +26 -0
- package/src/api/source/ads/SpotXAdDescription.ts +126 -0
- package/src/api/source/ads/THEOplayerAdDescription.ts +34 -0
- package/src/api/source/ads/barrel.ts +6 -0
- package/src/api/source/ads/ssai/GoogleDAIConfiguration.ts +145 -0
- package/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.ts +30 -0
- package/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts +28 -0
- package/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.ts +51 -0
- package/src/api/source/ads/ssai/barrel.ts +4 -0
- package/src/api/source/barrel.ts +1 -0
- package/src/api/source/drm/DRMConfiguration.ts +0 -35
- package/src/api/track/MediaTrack.ts +22 -2
- package/src/api/utils/TypeUtils.ts +39 -0
- package/src/api/utils/barrel.ts +1 -0
- package/src/index.tsx +1 -0
- package/src/internal/THEOplayerView.tsx +49 -8
- package/src/internal/THEOplayerView.web.tsx +37 -7
- package/src/internal/ads/THEOplayerNativeAdsAPI.ts +44 -0
- package/src/internal/ads/THEOplayerNativeGoogleDAI.ts +23 -0
- package/src/internal/ads/THEOplayerWebAdsAPI.ts +51 -0
- package/src/internal/ads/THEOplayerWebGoogleDAI.ts +22 -0
- package/src/internal/drm/ContentProtectionRegistry.ts +173 -0
- package/src/internal/drm/ContentProtectionRegistry.web.ts +10 -0
- package/src/internal/drm/NativeCertificateRequest.ts +41 -0
- package/src/internal/drm/NativeCertificateResponse.ts +45 -0
- package/src/internal/drm/NativeContentProtectionEvent.ts +5 -0
- package/src/internal/drm/NativeLicenseRequest.ts +39 -0
- package/src/internal/drm/NativeLicenseResponse.ts +45 -0
- package/src/internal/utils/TypeUtils.ts +39 -0
- package/src/internal/web/TrackUtils.ts +22 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a companion ad which is displayed near the video player.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface CompanionAd {
|
|
7
|
+
/**
|
|
8
|
+
* The identifier of the element in which the companion ad should be appended, if available.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* <br/> Only available for Google DAI and THEO ads if provided in the VAST.
|
|
12
|
+
*/
|
|
13
|
+
adSlotId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The alternative description for the ad.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* <br/> - Returns value as reported in the VAST StaticResource. If not specified, it returns an empty string.
|
|
19
|
+
* <br/> - Returns an empty string for THEO ads if not available.
|
|
20
|
+
* <br/> - Returns an empty string for Google IMA / Google DAI integrations.
|
|
21
|
+
*/
|
|
22
|
+
altText: string;
|
|
23
|
+
/**
|
|
24
|
+
* The content of the ad, as HTML.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* <br/> - Available for StaticResource and HTMLResource in THEO ad system.
|
|
28
|
+
* <br/> - Available in the DAI ad system.
|
|
29
|
+
*/
|
|
30
|
+
contentHTML: string;
|
|
31
|
+
/**
|
|
32
|
+
* The website of the advertisement.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* <br/> - Only available for StaticResource if specified by the VAST. Otherwise returns an empty string.
|
|
36
|
+
*/
|
|
37
|
+
clickThrough?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The height of the ad, in pixels.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* <br/> - Only available for IMA ad system and THEO ad system.
|
|
43
|
+
*/
|
|
44
|
+
height: number;
|
|
45
|
+
/**
|
|
46
|
+
* The URI of the ad content as specified in the VAST file.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* <br/> - Only available in the THEO ad system for StaticResource. Otherwise returns an empty string.
|
|
50
|
+
*/
|
|
51
|
+
resourceURI: string;
|
|
52
|
+
/**
|
|
53
|
+
* The width of the ad, in pixels.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* <br/> - Only available for IMA ad system and THEO ad system.
|
|
57
|
+
*/
|
|
58
|
+
width: number;
|
|
59
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Google DAI API.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface GoogleDAI {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the content time without ads for a given stream time. Returns the given stream time for live streams.
|
|
9
|
+
*
|
|
10
|
+
* @param time - The stream time with inserted ads (in seconds).
|
|
11
|
+
*/
|
|
12
|
+
contentTimeForStreamTime(time: number): Promise<number>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the stream time with ads for a given content time. Returns the given content time for live streams.
|
|
15
|
+
*
|
|
16
|
+
* @param time - The content time without any ads (in seconds).
|
|
17
|
+
*/
|
|
18
|
+
streamTimeForContentTime(time: number): Promise<number>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether snapback is enabled. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue `true`
|
|
23
|
+
*/
|
|
24
|
+
readonly snapback: Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Set snapback value. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.
|
|
27
|
+
*/
|
|
28
|
+
setSnapback(enabled: boolean): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a Google IMA creative compliant to the VAST specification.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* <br/> - Available since v2.60.0.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
import type { Ad } from './Ad';
|
|
10
|
+
export interface GoogleImaAd extends Ad {
|
|
11
|
+
/**
|
|
12
|
+
* The bitrate of the currently playing creative as listed in the VAST response or 0.
|
|
13
|
+
*/
|
|
14
|
+
readonly bitrate: number;
|
|
15
|
+
/**
|
|
16
|
+
* Record of custom parameters for the ad at the time of ad trafficking.
|
|
17
|
+
* Each entry contains a parameter name with associated value.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
21
|
+
*/
|
|
22
|
+
traffickingParameters: {
|
|
23
|
+
[parameterKey: string]: string;
|
|
24
|
+
} | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Return title of the advertisement.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
30
|
+
*/
|
|
31
|
+
title: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The custom parameters for the ad at the time of ad trafficking, as a string.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* <br/> - A parsed version is available as {@link GoogleImaAd.traffickingParameters}.
|
|
37
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
38
|
+
*/
|
|
39
|
+
traffickingParametersString: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* List of wrapper ad identifiers as specified in the VAST response.
|
|
42
|
+
*/
|
|
43
|
+
wrapperAdIds: string[];
|
|
44
|
+
/**
|
|
45
|
+
* List of wrapper ad systems as specified in the VAST response.
|
|
46
|
+
*/
|
|
47
|
+
wrapperAdSystems: string[];
|
|
48
|
+
/**
|
|
49
|
+
* List of wrapper creative identifiers.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* <br/> - Starts with the first wrapper ad.
|
|
53
|
+
*/
|
|
54
|
+
wrapperCreativeIds: string[];
|
|
55
|
+
/**
|
|
56
|
+
* The url of the chosen media file.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
60
|
+
*/
|
|
61
|
+
mediaUrl: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The content type of the ad.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
67
|
+
* <br/> - For linear ads, the content type is only going to be available after the `'adbegin'` event, when the media file is selected.
|
|
68
|
+
*/
|
|
69
|
+
contentType: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The identifier of the API framework needed to execute the ad.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
75
|
+
* <br/> - This corresponds with the apiFramework specified in vast.
|
|
76
|
+
*/
|
|
77
|
+
apiFramework: string | undefined;
|
|
78
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
export * from './abr/barrel';
|
|
2
|
+
export * from './ads/barrel';
|
|
3
|
+
export * from './config/barrel';
|
|
1
4
|
export * from './error/barrel';
|
|
2
5
|
export * from './event/barrel';
|
|
6
|
+
export * from './drm/barrel';
|
|
3
7
|
export * from './source/barrel';
|
|
4
8
|
export * from './timeranges/barrel';
|
|
5
9
|
export * from './track/barrel';
|
|
6
|
-
export * from './
|
|
10
|
+
export * from './utils/barrel';
|
|
7
11
|
export * from './THEOplayerView';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { KeySystemId } from 'react-native-theoplayer';
|
|
2
|
+
import type { ContentProtectionIntegrationFactory } from './ContentProtectionIntegrationFactory';
|
|
3
|
+
export interface ContentProtectionAPI {
|
|
4
|
+
registerContentProtectionIntegration(integrationId: string, keySystem: KeySystemId, integrationFactory: ContentProtectionIntegrationFactory): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { CertificateRequest, LicenseRequest } from './ContentProtectionRequest';
|
|
2
|
+
import type { CertificateResponse, LicenseResponse } from './ContentProtectionResponse';
|
|
3
|
+
/**
|
|
4
|
+
* A synchronous or asynchronous return type
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare type MaybeAsync<T> = T | PromiseLike<T>;
|
|
9
|
+
export declare type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
10
|
+
/**
|
|
11
|
+
* This ContentProtectionIntegration defines some methods to alter license and certificate requests and responses.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface ContentProtectionIntegration {
|
|
16
|
+
/**
|
|
17
|
+
* Handler which will be called when a HTTP request for a new certificate is about to be sent.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* If a valid certificate was provided as part of the {@link KeySystemConfiguration.certificate}, this handler will not be called.
|
|
21
|
+
* The handler must return either a request or a raw certificate. When a (possibly modified) request is returned,
|
|
22
|
+
* the player will send that request instead of the original request. When a raw certificate is returned,
|
|
23
|
+
* the request is skipped entirely and the certificate is used directly. If no handler is provided, the player sends the original request.
|
|
24
|
+
*
|
|
25
|
+
* For example, an integration may want to “wrap” the request body in a different format (e.g. JSON or XML) for
|
|
26
|
+
* certain DRM vendors, or add additional authentication tokens to the request.
|
|
27
|
+
* Alternatively, an integration may want to send the HTTP request using its own network stack,
|
|
28
|
+
* and return the final certificate response to the player.
|
|
29
|
+
*
|
|
30
|
+
* @param request - The {@link CertificateRequest} that is about to be sent.
|
|
31
|
+
*/
|
|
32
|
+
onCertificateRequest?(request: CertificateRequest): MaybeAsync<Partial<CertificateRequest> | BufferSource>;
|
|
33
|
+
/**
|
|
34
|
+
* Handler which will be called when a HTTP request for a certificate returns a response.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* The handler will be called regardless of the HTTP status code on the response (i.e. also for unsuccessful statuses outside of the 200-299 range).
|
|
38
|
+
* The handler must return the raw certificate, in a manner suitable for further processing by the CDM.
|
|
39
|
+
* If no handler is provided, the player uses the response body as raw certificate, but only if the response’s status indicates success.
|
|
40
|
+
*
|
|
41
|
+
* For example, an integration may want to “unwrap” a wrapped JSON or XML response body, turning it into a raw certificate.
|
|
42
|
+
*
|
|
43
|
+
* @param response - The {@link CertificateResponse} that was returned from the certificate request.
|
|
44
|
+
*/
|
|
45
|
+
onCertificateResponse?(response: CertificateResponse): MaybeAsync<BufferSource>;
|
|
46
|
+
/**
|
|
47
|
+
* Handler which will be called when a HTTP request for a new license is about to be sent.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* The handler must return either a request or a raw license. When a (possibly modified) request is returned,
|
|
51
|
+
* the player will send that request instead of the original request. When a raw license is returned,
|
|
52
|
+
* the request is skipped entirely and the license is used directly. If no handler is provided, the player sends the original request.
|
|
53
|
+
*
|
|
54
|
+
* For example, an integration may want to “wrap” the request body in a different format (e.g. JSON or XML) for certain DRM vendors,
|
|
55
|
+
* or add additional authentication tokens to the request. Alternatively, an integration may want to send the HTTP request using its own network stack,
|
|
56
|
+
* and return the final license response to the player.
|
|
57
|
+
*
|
|
58
|
+
* @param request - The {@link LicenseRequest} that is about to be sent.
|
|
59
|
+
*/
|
|
60
|
+
onLicenseRequest?(request: LicenseRequest): MaybeAsync<Partial<LicenseRequest> | BufferSource>;
|
|
61
|
+
/**
|
|
62
|
+
* Handler which will be called when a HTTP request for a license returns an response.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* The handler will be called regardless of the HTTP status code on the response (i.e. also for unsuccessful statuses outside of the 200-299 range).
|
|
66
|
+
* The handler must return the raw license, in a manner suitable for further processing by the CDM.
|
|
67
|
+
* If no handler is provided, the player uses the response body as raw license, but only if the response’s status indicates success.
|
|
68
|
+
*
|
|
69
|
+
* For example, an integration may want to “unwrap” a wrapped JSON or XML response body, turning it into a raw license.
|
|
70
|
+
*
|
|
71
|
+
* @param response - The {@link LicenseResponse} that was returned from the license request.
|
|
72
|
+
*/
|
|
73
|
+
onLicenseResponse?(response: LicenseResponse): MaybeAsync<BufferSource>;
|
|
74
|
+
/**
|
|
75
|
+
* A function to extract the Fairplay content ID from the key URI, as given by the URI attribute of the `#EXT-X-KEY` tag in the HLS playlist (m3u8).
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* In order to start a Fairplay license request, the player must provide the initialization data, the content ID and the certificate to the CDM.
|
|
79
|
+
* The content ID is usually contained in the key URI in some vendor-specific way, for example in the host name (e.g. `skd://123456789`)
|
|
80
|
+
* or in the URL query (e.g. `skd://vendor?123456789`). This function should extract this content ID from the key URI.
|
|
81
|
+
* This method is required only for Fairplay integrations. It is ignored for other key systems.
|
|
82
|
+
*
|
|
83
|
+
* @param skdUrl - The key URI.
|
|
84
|
+
*/
|
|
85
|
+
extractFairplayContentId?(skdUrl: string): MaybeAsync<string>;
|
|
86
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContentProtectionIntegration } from './ContentProtectionIntegration';
|
|
2
|
+
import type { DRMConfiguration } from 'react-native-theoplayer';
|
|
3
|
+
/**
|
|
4
|
+
* Factory pattern to create {@link ContentProtectionIntegration}s.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface ContentProtectionIntegrationFactory {
|
|
9
|
+
/**
|
|
10
|
+
* Build a new {@link ContentProtectionIntegration} based on the given {@link DRMConfiguration}.
|
|
11
|
+
*
|
|
12
|
+
* @param configuration - The {@link DRMConfiguration} of the currently loading source.
|
|
13
|
+
*/
|
|
14
|
+
build(configuration: DRMConfiguration): ContentProtectionIntegration;
|
|
15
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A request, either for a certificate or a license.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface ContentProtectionRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The URL for the certificate server. By default, this will equal the certificate URL configured in the
|
|
8
|
+
* `{@link KeySystemConfiguration}`.
|
|
9
|
+
*/
|
|
10
|
+
url: string;
|
|
11
|
+
/**
|
|
12
|
+
* The method of the HTTP request, for example: GET, POST or PUT.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* <br/> - Will be equal to GET for Fairplay certificate requests and POST for Widevine certificate requests.
|
|
16
|
+
* <br/> - Will be equal to POST for all license requests.
|
|
17
|
+
*/
|
|
18
|
+
method: string;
|
|
19
|
+
/**
|
|
20
|
+
* The HTTP request headers to be sent to the server.
|
|
21
|
+
*/
|
|
22
|
+
headers: {
|
|
23
|
+
[headerName: string]: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The body of the certificate request.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* <br/> - For GET requests (such as with Fairplay), the body will be empty (null).
|
|
30
|
+
* <br/> - For POST requests (such as with Widevine): the body will contain the two bytes in an array as specified in the certificate request protocol.
|
|
31
|
+
*/
|
|
32
|
+
body: Uint8Array | null;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the player is allowed to use credentials for cross-origin requests.
|
|
35
|
+
*/
|
|
36
|
+
useCredentials: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A request for a certificate.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare type CertificateRequest = ContentProtectionRequest;
|
|
44
|
+
/**
|
|
45
|
+
* A request for a license.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export interface LicenseRequest extends ContentProtectionRequest {
|
|
49
|
+
/**
|
|
50
|
+
* The SKD URL (for example skd://fb64ba7c5bd34bf188cf9ba76ab8370e) as extracted from the #EXT-X-KEY tag in the HLS playlist.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* <br/> - Only available for Fairplay license requests. The value will be `undefined` otherwise.
|
|
54
|
+
*/
|
|
55
|
+
fairplaySkdUrl: string | undefined;
|
|
56
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CertificateRequest, ContentProtectionRequest, LicenseRequest } from './ContentProtectionRequest';
|
|
2
|
+
/**
|
|
3
|
+
* The response, either of a license or for a certificate request.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface ContentProtectionResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The request for which the response is being returned.
|
|
9
|
+
*/
|
|
10
|
+
request: ContentProtectionRequest;
|
|
11
|
+
/**
|
|
12
|
+
* The URL from which the response was returned. This might have been redirected transparently.
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* The status code as returned in the HTTP response.
|
|
17
|
+
*/
|
|
18
|
+
status: number;
|
|
19
|
+
/**
|
|
20
|
+
* The status text as returned in the HTTP response.
|
|
21
|
+
*/
|
|
22
|
+
statusText: string;
|
|
23
|
+
/**
|
|
24
|
+
* The HTTP headers as returned by the server.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* <br/> - On web not all headers might be shown due to Cross Origin Resource Sharing restrictions.
|
|
28
|
+
*/
|
|
29
|
+
headers: {
|
|
30
|
+
[headerName: string]: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The body of the response.
|
|
34
|
+
*/
|
|
35
|
+
body: Uint8Array;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The response of a certificate request.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export interface CertificateResponse extends ContentProtectionResponse {
|
|
42
|
+
/**
|
|
43
|
+
* The request for which the response is being returned.
|
|
44
|
+
*/
|
|
45
|
+
request: CertificateRequest;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The response of a license request.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export interface LicenseResponse extends ContentProtectionResponse {
|
|
52
|
+
/**
|
|
53
|
+
* The request for which the response is being returned.
|
|
54
|
+
*/
|
|
55
|
+
request: LicenseRequest;
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Ad, AdBreak } from 'react-native-theoplayer';
|
|
2
|
+
export interface AdEvent {
|
|
3
|
+
/**
|
|
4
|
+
* Type of ad event.
|
|
5
|
+
*/
|
|
6
|
+
type: AdEventType;
|
|
7
|
+
/**
|
|
8
|
+
* The ad or adbreak for which the event was dispatched.
|
|
9
|
+
*/
|
|
10
|
+
ad: Ad | AdBreak;
|
|
11
|
+
}
|
|
12
|
+
export declare const AdEventNames: readonly ["addadbreak", "removeadbreak", "adloaded", "adbreakbegin", "adbreakend", "adbreakchange", "updateadbreak", "addad", "adbegin", "adend", "updatead", "adloaded", "adfirstquartile", "admidpoint", "adthirdquartile", "adskip", "adimpression", "aderror", "admetadata", "adbuffering"];
|
|
13
|
+
export declare type AdEventType = typeof AdEventNames[number];
|
|
@@ -10,6 +10,7 @@ import type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration
|
|
|
10
10
|
import type { DRMConfiguration } from './drm/DRMConfiguration';
|
|
11
11
|
import type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';
|
|
12
12
|
import type { AdDescription } from './ads/Ads';
|
|
13
|
+
import type { ServerSideAdInsertionConfiguration } from "./ads/ssai/ServerSideAdInsertionConfiguration";
|
|
13
14
|
export declare type Source = TypedSource;
|
|
14
15
|
/**
|
|
15
16
|
* A media resource or list of media resources.
|
|
@@ -265,4 +266,11 @@ export interface TypedSource extends BaseSource {
|
|
|
265
266
|
* <br/> - Available since v2.15.0.
|
|
266
267
|
*/
|
|
267
268
|
contentProtection?: DRMConfiguration;
|
|
269
|
+
/**
|
|
270
|
+
* The Server-side Ad Insertion parameters for the media resource.
|
|
271
|
+
*
|
|
272
|
+
* @remarks
|
|
273
|
+
* <br/> - Available since v2.12.0.
|
|
274
|
+
*/
|
|
275
|
+
ssai?: ServerSideAdInsertionConfiguration;
|
|
268
276
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { AdDescription } from "./Ads";
|
|
2
|
+
/**
|
|
3
|
+
* The possible ad unit types, represented by a value from the following list:
|
|
4
|
+
* <br/> - `'preroll'`: The linear ad will play before the content started.
|
|
5
|
+
* <br/> - `'midroll'`: The linear ad will play at a time offset during the content.
|
|
6
|
+
* <br/> - `'postroll'`: The linear ad will play after the content ended.
|
|
7
|
+
* <br/> - `'overlay'`: The non-linear ad.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare type FreeWheelAdUnitType = 'preroll' | 'midroll' | 'postroll' | 'overlay';
|
|
12
|
+
/**
|
|
13
|
+
* Represents a FreeWheel cue.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface FreeWheelCue {
|
|
18
|
+
/**
|
|
19
|
+
* The ad unit type.
|
|
20
|
+
*/
|
|
21
|
+
adUnit: FreeWheelAdUnitType;
|
|
22
|
+
/**
|
|
23
|
+
* Offset after which the ad break will start, in seconds.
|
|
24
|
+
*/
|
|
25
|
+
timeOffset: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Describes a FreeWheel ad break request.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* <br/> - Available since v2.42.0.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface FreeWheelAdDescription extends AdDescription {
|
|
36
|
+
/**
|
|
37
|
+
* The integration of this ad break.
|
|
38
|
+
*/
|
|
39
|
+
integration: 'freewheel';
|
|
40
|
+
/**
|
|
41
|
+
* The FreeWheel ad server URL.
|
|
42
|
+
*/
|
|
43
|
+
adServerUrl: string;
|
|
44
|
+
/**
|
|
45
|
+
* The duration of the asset, in seconds.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* <br/> - Optional for live assets.
|
|
49
|
+
*/
|
|
50
|
+
assetDuration?: number;
|
|
51
|
+
/**
|
|
52
|
+
* The identifier of the asset.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* <br/> - Generated by FreeWheel CMS when an asset is uploaded.
|
|
56
|
+
*/
|
|
57
|
+
assetId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The network identifier which is associated with a FreeWheel customer.
|
|
60
|
+
*/
|
|
61
|
+
networkId: number;
|
|
62
|
+
/**
|
|
63
|
+
* The server side configuration profile.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* <br/> - Used to indicate desired player capabilities.
|
|
67
|
+
*/
|
|
68
|
+
profile: string;
|
|
69
|
+
/**
|
|
70
|
+
* The identifier of the video player's location.
|
|
71
|
+
*/
|
|
72
|
+
siteSectionId?: string;
|
|
73
|
+
/**
|
|
74
|
+
* List of cue points.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* <br/> - Not available in all FreeWheel modes.
|
|
78
|
+
*/
|
|
79
|
+
cuePoints?: FreeWheelCue[];
|
|
80
|
+
/**
|
|
81
|
+
* A record of query string parameters added to the FreeWheel ad break request.
|
|
82
|
+
* Each entry contains the parameter name with associated value.
|
|
83
|
+
*/
|
|
84
|
+
customData?: Record<string, string>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AdDescription, AdSource } from "./Ads";
|
|
2
|
+
/**
|
|
3
|
+
* Describes a Google IMA ad break request.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IMAAdDescription extends AdDescription {
|
|
8
|
+
/**
|
|
9
|
+
* The integration of this ad break.
|
|
10
|
+
*/
|
|
11
|
+
integration: 'google-ima';
|
|
12
|
+
/**
|
|
13
|
+
* The source of the ad
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* <br/> - VAST, VMAP and VPAID are supported.
|
|
17
|
+
*/
|
|
18
|
+
sources: string | AdSource;
|
|
19
|
+
/**
|
|
20
|
+
* Optional settings object for mapping verification vendors (google.ima.OmidVerificationVendor) to OMID Access Modes (google.ima.OmidAccessMode).
|
|
21
|
+
*/
|
|
22
|
+
omidAccessModeRules?: {
|
|
23
|
+
[key: number]: string;
|
|
24
|
+
};
|
|
25
|
+
}
|