react-native-theoplayer 1.6.1 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/android/build.gradle +76 -33
- 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 +273 -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,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the configuration of advertisement.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
import type { GoogleImaConfiguration } from './GoogleImaConfiguration';
|
|
7
|
+
|
|
8
|
+
export interface AdsConfiguration {
|
|
9
|
+
/**
|
|
10
|
+
* Allows configuring which mime types are allowed during ad playback.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* <br/> - This feature is only available for Google IMA.
|
|
14
|
+
* <br/> - If set to an array, all ads with another mime types will be ignored.
|
|
15
|
+
* <br/> - If set to `undefined` the ad system will pick media based on the browser's capabilities.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `undefined`
|
|
18
|
+
*/
|
|
19
|
+
allowedMimeTypes?: string[];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Whether an advertisement UI is shown.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue `true`
|
|
25
|
+
*/
|
|
26
|
+
uiEnabled?: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether media files of mid- and postrolls are preloaded.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* <br/> - This feature is only available for Google IMA.
|
|
33
|
+
*
|
|
34
|
+
* @defaultValue `'midroll-and-postroll'`
|
|
35
|
+
*/
|
|
36
|
+
preload?: AdPreloadType;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The iframe policy for VPAID ads.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* <br/> - This feature is only available for Google IMA and SpotX.
|
|
43
|
+
*
|
|
44
|
+
* @defaultValue `'enabled'`
|
|
45
|
+
*/
|
|
46
|
+
vpaidMode?: VPAIDMode;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The Google IMA configuration.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
googleImaConfiguration?: GoogleImaConfiguration;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The ad preloading strategy, represented by a value from the following list:
|
|
58
|
+
* <br/> - `'none'`: Ads are not preloaded.
|
|
59
|
+
* <br/> - `'midroll-and-postroll'`: Mid- and postrolls are preloaded.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* <br/> - For Google IMA, preloading starts 4 seconds before ad playback.
|
|
63
|
+
*
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export type AdPreloadType = 'none' | 'midroll-and-postroll';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The iframe policies for VPAID ads, represented by a value from the following list:
|
|
70
|
+
* <br/> - `'enabled'`: Ads will load in a cross domain iframe. This disables access to the site via JavaScript. Ads that require a friendly iframe will fail to play.
|
|
71
|
+
* <br/> - `'insecure'`: Ads will load in a friendly iframe. This allows access to the site via JavaScript.
|
|
72
|
+
* <br/> - `'disabled'`: Ads will error when requested.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export type VPAIDMode = 'enabled' | 'insecure' | 'disabled';
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/**
|
|
16
|
+
* The alternative description for the ad.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* <br/> - Returns value as reported in the VAST StaticResource. If not specified, it returns an empty string.
|
|
20
|
+
* <br/> - Returns an empty string for THEO ads if not available.
|
|
21
|
+
* <br/> - Returns an empty string for Google IMA / Google DAI integrations.
|
|
22
|
+
*/
|
|
23
|
+
altText: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The content of the ad, as HTML.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* <br/> - Available for StaticResource and HTMLResource in THEO ad system.
|
|
30
|
+
* <br/> - Available in the DAI ad system.
|
|
31
|
+
*/
|
|
32
|
+
contentHTML: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The website of the advertisement.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* <br/> - Only available for StaticResource if specified by the VAST. Otherwise returns an empty string.
|
|
39
|
+
*/
|
|
40
|
+
clickThrough?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The height of the ad, in pixels.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* <br/> - Only available for IMA ad system and THEO ad system.
|
|
47
|
+
*/
|
|
48
|
+
height: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The URI of the ad content as specified in the VAST file.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* <br/> - Only available in the THEO ad system for StaticResource. Otherwise returns an empty string.
|
|
55
|
+
*/
|
|
56
|
+
resourceURI: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The width of the ad, in pixels.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* <br/> - Only available for IMA ad system and THEO ad system.
|
|
63
|
+
*/
|
|
64
|
+
width: number;
|
|
65
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
/**
|
|
15
|
+
* Returns the stream time with ads for a given content time. Returns the given content time for live streams.
|
|
16
|
+
*
|
|
17
|
+
* @param time - The content time without any ads (in seconds).
|
|
18
|
+
*/
|
|
19
|
+
streamTimeForContentTime(time: number): Promise<number>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue `true`
|
|
25
|
+
*/
|
|
26
|
+
readonly snapback: Promise<boolean>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Set snapback value. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.
|
|
30
|
+
*/
|
|
31
|
+
setSnapback(enabled: boolean): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
|
|
11
|
+
export interface GoogleImaAd extends Ad {
|
|
12
|
+
/**
|
|
13
|
+
* The bitrate of the currently playing creative as listed in the VAST response or 0.
|
|
14
|
+
*/
|
|
15
|
+
readonly bitrate: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Record of custom parameters for the ad at the time of ad trafficking.
|
|
19
|
+
* Each entry contains a parameter name with associated value.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
23
|
+
*/
|
|
24
|
+
traffickingParameters: { [parameterKey: string]: string } | undefined;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Return title of the advertisement.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
31
|
+
*/
|
|
32
|
+
title: string | undefined;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The custom parameters for the ad at the time of ad trafficking, as a string.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* <br/> - A parsed version is available as {@link GoogleImaAd.traffickingParameters}.
|
|
39
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
40
|
+
*/
|
|
41
|
+
traffickingParametersString: string | undefined;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* List of wrapper ad identifiers as specified in the VAST response.
|
|
45
|
+
*/
|
|
46
|
+
wrapperAdIds: string[];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* List of wrapper ad systems as specified in the VAST response.
|
|
50
|
+
*/
|
|
51
|
+
wrapperAdSystems: string[];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* List of wrapper creative identifiers.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* <br/> - Starts with the first wrapper ad.
|
|
58
|
+
*/
|
|
59
|
+
wrapperCreativeIds: string[];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The url of the chosen media file.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
66
|
+
*/
|
|
67
|
+
mediaUrl: string | undefined;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The content type of the ad.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
74
|
+
* <br/> - For linear ads, the content type is only going to be available after the `'adbegin'` event, when the media file is selected.
|
|
75
|
+
*/
|
|
76
|
+
contentType: string | undefined;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The identifier of the API framework needed to execute the ad.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* <br/> - Available when the {@link Ad.readyState} is `'ready'`.
|
|
83
|
+
* <br/> - This corresponds with the apiFramework specified in vast.
|
|
84
|
+
*/
|
|
85
|
+
apiFramework: string | undefined;
|
|
86
|
+
}
|
package/src/api/barrel.ts
CHANGED
|
@@ -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,6 @@
|
|
|
1
|
+
import type { KeySystemId } from 'react-native-theoplayer';
|
|
2
|
+
import type { ContentProtectionIntegrationFactory } from './ContentProtectionIntegrationFactory';
|
|
3
|
+
|
|
4
|
+
export interface ContentProtectionAPI {
|
|
5
|
+
registerContentProtectionIntegration(integrationId: string, keySystem: KeySystemId, integrationFactory: ContentProtectionIntegrationFactory): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { CertificateRequest, LicenseRequest } from './ContentProtectionRequest';
|
|
2
|
+
import type { CertificateResponse, LicenseResponse } from './ContentProtectionResponse';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A synchronous or asynchronous return type
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type MaybeAsync<T> = T | PromiseLike<T>;
|
|
10
|
+
|
|
11
|
+
export type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This ContentProtectionIntegration defines some methods to alter license and certificate requests and responses.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface ContentProtectionIntegration {
|
|
19
|
+
/**
|
|
20
|
+
* Handler which will be called when a HTTP request for a new certificate is about to be sent.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* If a valid certificate was provided as part of the {@link KeySystemConfiguration.certificate}, this handler will not be called.
|
|
24
|
+
* The handler must return either a request or a raw certificate. When a (possibly modified) request is returned,
|
|
25
|
+
* the player will send that request instead of the original request. When a raw certificate is returned,
|
|
26
|
+
* the request is skipped entirely and the certificate is used directly. If no handler is provided, the player sends the original request.
|
|
27
|
+
*
|
|
28
|
+
* For example, an integration may want to “wrap” the request body in a different format (e.g. JSON or XML) for
|
|
29
|
+
* certain DRM vendors, or add additional authentication tokens to the request.
|
|
30
|
+
* Alternatively, an integration may want to send the HTTP request using its own network stack,
|
|
31
|
+
* and return the final certificate response to the player.
|
|
32
|
+
*
|
|
33
|
+
* @param request - The {@link CertificateRequest} that is about to be sent.
|
|
34
|
+
*/
|
|
35
|
+
onCertificateRequest?(request: CertificateRequest): MaybeAsync<Partial<CertificateRequest> | BufferSource>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Handler which will be called when a HTTP request for a certificate returns a response.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* 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).
|
|
42
|
+
* The handler must return the raw certificate, in a manner suitable for further processing by the CDM.
|
|
43
|
+
* If no handler is provided, the player uses the response body as raw certificate, but only if the response’s status indicates success.
|
|
44
|
+
*
|
|
45
|
+
* For example, an integration may want to “unwrap” a wrapped JSON or XML response body, turning it into a raw certificate.
|
|
46
|
+
*
|
|
47
|
+
* @param response - The {@link CertificateResponse} that was returned from the certificate request.
|
|
48
|
+
*/
|
|
49
|
+
onCertificateResponse?(response: CertificateResponse): MaybeAsync<BufferSource>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Handler which will be called when a HTTP request for a new license is about to be sent.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* The handler must return either a request or a raw license. When a (possibly modified) request is returned,
|
|
56
|
+
* the player will send that request instead of the original request. When a raw license is returned,
|
|
57
|
+
* the request is skipped entirely and the license is used directly. If no handler is provided, the player sends the original request.
|
|
58
|
+
*
|
|
59
|
+
* For example, an integration may want to “wrap” the request body in a different format (e.g. JSON or XML) for certain DRM vendors,
|
|
60
|
+
* or add additional authentication tokens to the request. Alternatively, an integration may want to send the HTTP request using its own network stack,
|
|
61
|
+
* and return the final license response to the player.
|
|
62
|
+
*
|
|
63
|
+
* @param request - The {@link LicenseRequest} that is about to be sent.
|
|
64
|
+
*/
|
|
65
|
+
onLicenseRequest?(request: LicenseRequest): MaybeAsync<Partial<LicenseRequest> | BufferSource>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Handler which will be called when a HTTP request for a license returns an response.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* 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).
|
|
72
|
+
* The handler must return the raw license, in a manner suitable for further processing by the CDM.
|
|
73
|
+
* If no handler is provided, the player uses the response body as raw license, but only if the response’s status indicates success.
|
|
74
|
+
*
|
|
75
|
+
* For example, an integration may want to “unwrap” a wrapped JSON or XML response body, turning it into a raw license.
|
|
76
|
+
*
|
|
77
|
+
* @param response - The {@link LicenseResponse} that was returned from the license request.
|
|
78
|
+
*/
|
|
79
|
+
onLicenseResponse?(response: LicenseResponse): MaybeAsync<BufferSource>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 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).
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* In order to start a Fairplay license request, the player must provide the initialization data, the content ID and the certificate to the CDM.
|
|
86
|
+
* 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`)
|
|
87
|
+
* or in the URL query (e.g. `skd://vendor?123456789`). This function should extract this content ID from the key URI.
|
|
88
|
+
* This method is required only for Fairplay integrations. It is ignored for other key systems.
|
|
89
|
+
*
|
|
90
|
+
* @param skdUrl - The key URI.
|
|
91
|
+
*/
|
|
92
|
+
extractFairplayContentId?(skdUrl: string): MaybeAsync<string>;
|
|
93
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ContentProtectionIntegration } from './ContentProtectionIntegration';
|
|
2
|
+
import type { DRMConfiguration } from 'react-native-theoplayer';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Factory pattern to create {@link ContentProtectionIntegration}s.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface ContentProtectionIntegrationFactory {
|
|
10
|
+
/**
|
|
11
|
+
* Build a new {@link ContentProtectionIntegration} based on the given {@link DRMConfiguration}.
|
|
12
|
+
*
|
|
13
|
+
* @param configuration - The {@link DRMConfiguration} of the currently loading source.
|
|
14
|
+
*/
|
|
15
|
+
build(configuration: DRMConfiguration): ContentProtectionIntegration;
|
|
16
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* The method of the HTTP request, for example: GET, POST or PUT.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* <br/> - Will be equal to GET for Fairplay certificate requests and POST for Widevine certificate requests.
|
|
17
|
+
* <br/> - Will be equal to POST for all license requests.
|
|
18
|
+
*/
|
|
19
|
+
method: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The HTTP request headers to be sent to the server.
|
|
23
|
+
*/
|
|
24
|
+
headers: { [headerName: string]: string };
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The body of the certificate request.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* <br/> - For GET requests (such as with Fairplay), the body will be empty (null).
|
|
31
|
+
* <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.
|
|
32
|
+
*/
|
|
33
|
+
body: Uint8Array | null;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Whether the player is allowed to use credentials for cross-origin requests.
|
|
37
|
+
*/
|
|
38
|
+
useCredentials: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A request for a certificate.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export type CertificateRequest = ContentProtectionRequest;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A request for a license.
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export interface LicenseRequest extends ContentProtectionRequest {
|
|
53
|
+
/**
|
|
54
|
+
* The SKD URL (for example skd://fb64ba7c5bd34bf188cf9ba76ab8370e) as extracted from the #EXT-X-KEY tag in the HLS playlist.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* <br/> - Only available for Fairplay license requests. The value will be `undefined` otherwise.
|
|
58
|
+
*/
|
|
59
|
+
fairplaySkdUrl: string | undefined;
|
|
60
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { CertificateRequest, ContentProtectionRequest, LicenseRequest } from './ContentProtectionRequest';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The response, either of a license or for a certificate request.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface ContentProtectionResponse {
|
|
8
|
+
/**
|
|
9
|
+
* The request for which the response is being returned.
|
|
10
|
+
*/
|
|
11
|
+
request: ContentProtectionRequest;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The URL from which the response was returned. This might have been redirected transparently.
|
|
15
|
+
*/
|
|
16
|
+
url: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The status code as returned in the HTTP response.
|
|
20
|
+
*/
|
|
21
|
+
status: number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The status text as returned in the HTTP response.
|
|
25
|
+
*/
|
|
26
|
+
statusText: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The HTTP headers as returned by the server.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* <br/> - On web not all headers might be shown due to Cross Origin Resource Sharing restrictions.
|
|
33
|
+
*/
|
|
34
|
+
headers: { [headerName: string]: string };
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The body of the response.
|
|
38
|
+
*/
|
|
39
|
+
body: Uint8Array;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The response of a certificate request.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface CertificateResponse extends ContentProtectionResponse {
|
|
47
|
+
/**
|
|
48
|
+
* The request for which the response is being returned.
|
|
49
|
+
*/
|
|
50
|
+
request: CertificateRequest;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The response of a license request.
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
export interface LicenseResponse extends ContentProtectionResponse {
|
|
58
|
+
/**
|
|
59
|
+
* The request for which the response is being returned.
|
|
60
|
+
*/
|
|
61
|
+
request: LicenseRequest;
|
|
62
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { Ad, AdBreak } from 'react-native-theoplayer';
|
|
2
|
+
|
|
3
|
+
export interface AdEvent {
|
|
4
|
+
/**
|
|
5
|
+
* Type of ad event.
|
|
6
|
+
*/
|
|
7
|
+
type: AdEventType;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The ad or adbreak for which the event was dispatched.
|
|
11
|
+
*/
|
|
12
|
+
ad: Ad | AdBreak;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const AdEventNames = [
|
|
16
|
+
/**
|
|
17
|
+
* Dispatched when an ad break is added.
|
|
18
|
+
*/
|
|
19
|
+
'addadbreak',
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Dispatched when an ad break is removed.
|
|
23
|
+
*/
|
|
24
|
+
'removeadbreak',
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Dispatched when an ad is loaded.
|
|
28
|
+
*/
|
|
29
|
+
'adloaded',
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Dispatched when an ad break begins.
|
|
33
|
+
*/
|
|
34
|
+
'adbreakbegin',
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Dispatched when an ad break ends.
|
|
38
|
+
*/
|
|
39
|
+
'adbreakend',
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Dispatched when an ad break changes.
|
|
43
|
+
*/
|
|
44
|
+
'adbreakchange',
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Dispatched when an ad break is updated.
|
|
48
|
+
*/
|
|
49
|
+
'updateadbreak',
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Dispatched when an ad is added.
|
|
53
|
+
*/
|
|
54
|
+
'addad',
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Dispatched when an ad begins.
|
|
58
|
+
*/
|
|
59
|
+
'adbegin',
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Dispatched when an ad ends.
|
|
63
|
+
*/
|
|
64
|
+
'adend',
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Dispatched when an ad is updated.
|
|
68
|
+
*/
|
|
69
|
+
'updatead',
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Dispatched when an ad is loaded.
|
|
73
|
+
*/
|
|
74
|
+
'adloaded',
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Dispatched when an ad reaches the first quartile.
|
|
78
|
+
*/
|
|
79
|
+
'adfirstquartile',
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Dispatched when an ad reaches the mid point.
|
|
83
|
+
*/
|
|
84
|
+
'admidpoint',
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Dispatched when an ad reaches the third quartile.
|
|
88
|
+
*/
|
|
89
|
+
'adthirdquartile',
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Dispatched when an ad is skipped.
|
|
93
|
+
*/
|
|
94
|
+
'adskip',
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Dispatched when an ad counts as an impression.
|
|
98
|
+
*/
|
|
99
|
+
'adimpression',
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Dispatched when an ad error occurs.
|
|
103
|
+
*/
|
|
104
|
+
'aderror',
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Dispatched when an ads list is loaded.
|
|
108
|
+
*/
|
|
109
|
+
'admetadata',
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Dispatched when the ad has stalled playback to buffer.
|
|
113
|
+
*/
|
|
114
|
+
'adbuffering'
|
|
115
|
+
] as const;
|
|
116
|
+
|
|
117
|
+
export type AdEventType = typeof AdEventNames[number];
|
package/src/api/event/barrel.ts
CHANGED