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
|
@@ -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
|
|
|
14
15
|
export type Source = TypedSource;
|
|
15
16
|
|
|
@@ -289,4 +290,12 @@ export interface TypedSource extends BaseSource {
|
|
|
289
290
|
* <br/> - Available since v2.15.0.
|
|
290
291
|
*/
|
|
291
292
|
contentProtection?: DRMConfiguration;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* The Server-side Ad Insertion parameters for the media resource.
|
|
296
|
+
*
|
|
297
|
+
* @remarks
|
|
298
|
+
* <br/> - Available since v2.12.0.
|
|
299
|
+
*/
|
|
300
|
+
ssai?: ServerSideAdInsertionConfiguration;
|
|
292
301
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { AdDescription } from "./Ads";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The possible ad unit types, represented by a value from the following list:
|
|
5
|
+
* <br/> - `'preroll'`: The linear ad will play before the content started.
|
|
6
|
+
* <br/> - `'midroll'`: The linear ad will play at a time offset during the content.
|
|
7
|
+
* <br/> - `'postroll'`: The linear ad will play after the content ended.
|
|
8
|
+
* <br/> - `'overlay'`: The non-linear ad.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type FreeWheelAdUnitType = 'preroll' | 'midroll' | 'postroll' | 'overlay';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents a FreeWheel cue.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface FreeWheelCue {
|
|
20
|
+
/**
|
|
21
|
+
* The ad unit type.
|
|
22
|
+
*/
|
|
23
|
+
adUnit: FreeWheelAdUnitType;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Offset after which the ad break will start, in seconds.
|
|
27
|
+
*/
|
|
28
|
+
timeOffset: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Describes a FreeWheel ad break request.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* <br/> - Available since v2.42.0.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export interface FreeWheelAdDescription extends AdDescription {
|
|
40
|
+
/**
|
|
41
|
+
* The integration of this ad break.
|
|
42
|
+
*/
|
|
43
|
+
integration: 'freewheel';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The FreeWheel ad server URL.
|
|
47
|
+
*/
|
|
48
|
+
adServerUrl: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The duration of the asset, in seconds.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* <br/> - Optional for live assets.
|
|
55
|
+
*/
|
|
56
|
+
assetDuration?: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The identifier of the asset.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* <br/> - Generated by FreeWheel CMS when an asset is uploaded.
|
|
63
|
+
*/
|
|
64
|
+
assetId?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The network identifier which is associated with a FreeWheel customer.
|
|
68
|
+
*/
|
|
69
|
+
networkId: number;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The server side configuration profile.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* <br/> - Used to indicate desired player capabilities.
|
|
76
|
+
*/
|
|
77
|
+
profile: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The identifier of the video player's location.
|
|
81
|
+
*/
|
|
82
|
+
siteSectionId?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* List of cue points.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* <br/> - Not available in all FreeWheel modes.
|
|
89
|
+
*/
|
|
90
|
+
cuePoints?: FreeWheelCue[];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A record of query string parameters added to the FreeWheel ad break request.
|
|
94
|
+
* Each entry contains the parameter name with associated value.
|
|
95
|
+
*/
|
|
96
|
+
customData?: Record<string, string>;
|
|
97
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AdDescription, AdSource } from "./Ads";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Describes a Google IMA ad break request.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IMAAdDescription extends AdDescription {
|
|
9
|
+
/**
|
|
10
|
+
* The integration of this ad break.
|
|
11
|
+
*/
|
|
12
|
+
integration: 'google-ima';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The source of the ad
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* <br/> - VAST, VMAP and VPAID are supported.
|
|
19
|
+
*/
|
|
20
|
+
sources: string | AdSource;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional settings object for mapping verification vendors (google.ima.OmidVerificationVendor) to OMID Access Modes (google.ima.OmidAccessMode).
|
|
24
|
+
*/
|
|
25
|
+
omidAccessModeRules?: { [key: number]: string };
|
|
26
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { AdDescription } from "./Ads";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents a geographical location.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface Geo {
|
|
9
|
+
/**
|
|
10
|
+
* The latitude of this location.
|
|
11
|
+
*/
|
|
12
|
+
readonly lat: number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The longitude of this location.
|
|
16
|
+
*/
|
|
17
|
+
readonly lon: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A record of SpotX query string parameters.
|
|
22
|
+
* Each entry contains the parameter name with associated value.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export interface SpotxData {
|
|
27
|
+
[key: string]: string | number | boolean | string[] | Geo;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A record of SpotX query string parameters which can be a nested structure.
|
|
32
|
+
* Each entry contains the parameter name with associated value.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export interface SpotxQueryParameter {
|
|
37
|
+
[key: string]: string | number | boolean | string[] | Geo | SpotxData | SpotxData[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Describes a SpotX ad break request.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* <br/> - Available since v2.13.0.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```
|
|
48
|
+
* {
|
|
49
|
+
* integration: 'spotx',
|
|
50
|
+
* id: 123456,
|
|
51
|
+
* cacheBuster: true,
|
|
52
|
+
* app: {
|
|
53
|
+
* bundle: 'com.exampleapps.example',
|
|
54
|
+
* name: 'My CTV App'
|
|
55
|
+
* },
|
|
56
|
+
* device: {
|
|
57
|
+
* ifa: '38400000-8cf0-11bd-b23e-10b96e40000d',
|
|
58
|
+
* ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1',
|
|
59
|
+
* geo: {
|
|
60
|
+
* lat: -24.378528,
|
|
61
|
+
* lon: -128.325119
|
|
62
|
+
* },
|
|
63
|
+
* dnt: 1,
|
|
64
|
+
* lmt: 1,
|
|
65
|
+
* },
|
|
66
|
+
* custom: {
|
|
67
|
+
* category: ['category1', 'category2'],
|
|
68
|
+
* somekey: 'somevalue'
|
|
69
|
+
* }
|
|
70
|
+
* user: {
|
|
71
|
+
* yob: 1984,
|
|
72
|
+
* gender: 'm'
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export interface SpotXAdDescription extends AdDescription {
|
|
80
|
+
/**
|
|
81
|
+
* The identifier of the ad break requested from SpotX.
|
|
82
|
+
*/
|
|
83
|
+
id: number | string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The maximum duration of the ad, in seconds.
|
|
87
|
+
*
|
|
88
|
+
* @defaultValue No maximum duration.
|
|
89
|
+
*/
|
|
90
|
+
maximumAdDuration?: number | string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The URL of the content page.
|
|
94
|
+
*/
|
|
95
|
+
contentPageUrl?: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The IP address of the viewer.
|
|
99
|
+
*/
|
|
100
|
+
ipAddress?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Whether the ad break request should contain a cache buster.
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* <br/> - A cache buster adds a query parameter 'cb' with a random value to circumvent browser caching mechanisms.
|
|
107
|
+
*/
|
|
108
|
+
cacheBuster?: boolean;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A source URL which contains the location of ad resources to be scheduled.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* <br/> - This will override the generated URL.
|
|
115
|
+
*/
|
|
116
|
+
sources?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* A record of query string parameters added to the SpotX ad break request.
|
|
120
|
+
* Each entry contains the parameter name with associated value.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* <br/> - Available since v2.38.0.
|
|
124
|
+
*/
|
|
125
|
+
queryParameters?: SpotxQueryParameter;
|
|
126
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AdDescription, AdSource } from "./Ads";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Describes an ad break request.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface THEOplayerAdDescription extends AdDescription {
|
|
9
|
+
/**
|
|
10
|
+
* The source of the ad
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* <br/> - Only supports VAST and VMAP.
|
|
14
|
+
*/
|
|
15
|
+
sources: string | AdSource;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Offset after which the ad break can be skipped.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* <br/> - A timestamp which is not in the playback window will result in the ad break not being started.
|
|
22
|
+
* <br/> - VMAP resources will ignore this value as they contain an internal offset.
|
|
23
|
+
*
|
|
24
|
+
* Possible formats:
|
|
25
|
+
* <br/> - A number for the offset in seconds.
|
|
26
|
+
* <br/> - `'start'` for a preroll.
|
|
27
|
+
* <br/> - `'end'` for a postroll.
|
|
28
|
+
* <br/> - `'HH:MM:SS.mmm'` for a timestamp in the playback window.
|
|
29
|
+
* <br/> - A percentage string (XX%) for a proportion of the content duration.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue `'start'`
|
|
32
|
+
*/
|
|
33
|
+
skipOffset?: string | number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { TypedSource } from '../../SourceDescription';
|
|
2
|
+
import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertionConfiguration';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The identifier of the Google DAI integration.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type GoogleDAISSAIIntegrationID = 'google-dai';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The type of the stream requested from Google DAI, represented by a value from the following list:
|
|
13
|
+
* <br/> - `'live'`: The requested stream is a live stream.
|
|
14
|
+
* <br/> - `'vod'`: The requested stream is a video-on-demand stream.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type DAIAvailabilityType = 'vod' | 'live';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* <br/> - Available since v2.30.0.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export interface GoogleDAIConfiguration extends ServerSideAdInsertionConfiguration {
|
|
29
|
+
/**
|
|
30
|
+
* The type of the requested stream.
|
|
31
|
+
*/
|
|
32
|
+
readonly availabilityType?: DAIAvailabilityType;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The identifier for the SSAI pre-integration.
|
|
36
|
+
*/
|
|
37
|
+
integration: GoogleDAISSAIIntegrationID;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The authorization token for the stream request.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* <br/> - If present, this token is used instead of the API key for stricter content authorization.
|
|
44
|
+
* <br/> - The publisher can control individual content streams authorizations based on this token.
|
|
45
|
+
*/
|
|
46
|
+
authToken?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The API key for the stream request.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* <br/> - This key is used to verify applications that are attempting to access the content.
|
|
53
|
+
* <br/> - This key is configured through the Google Ad Manager UI.
|
|
54
|
+
*/
|
|
55
|
+
apiKey: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The ad tag parameters added to stream request.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* <br/> - Each entry contains the parameter name with associated value.
|
|
62
|
+
*
|
|
63
|
+
* Valid parameters:
|
|
64
|
+
* <br/> - {@link https://support.google.com/admanager/answer/7320899 | Supply targeting parameters to your stream}
|
|
65
|
+
* <br/> - {@link https://support.google.com/admanager/answer/7320898 | Override stream variant parameters}
|
|
66
|
+
*/
|
|
67
|
+
adTagParameters?: Record<string, string>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The identifier for a stream activity monitor session.
|
|
71
|
+
*/
|
|
72
|
+
streamActivityMonitorID?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a Live media stream.
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* <br/> - Available since v2.30.0.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export interface GoogleDAILiveConfiguration extends GoogleDAIConfiguration {
|
|
84
|
+
/**
|
|
85
|
+
* The type of the requested stream.
|
|
86
|
+
*/
|
|
87
|
+
readonly availabilityType: 'live';
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The identifier for the video content source for live streams.
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* <br/> - This property is required for live streams.
|
|
94
|
+
* <br/> - The asset key can be found in the Google Ad Manager UI.
|
|
95
|
+
*/
|
|
96
|
+
assetKey: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a VOD media stream.
|
|
101
|
+
*
|
|
102
|
+
* @remarks
|
|
103
|
+
* <br/> - Available since v2.30.0.
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export interface GoogleDAIVodConfiguration extends GoogleDAIConfiguration {
|
|
108
|
+
/**
|
|
109
|
+
* The type of the requested stream.
|
|
110
|
+
*/
|
|
111
|
+
readonly availabilityType: 'vod';
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The identifier for the publisher content for on-demand streams.
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* <br/> - The publisher content comes from a CMS.
|
|
118
|
+
* <br/> - This property is required for on-demand streams.
|
|
119
|
+
*/
|
|
120
|
+
contentSourceID: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The identifier for the video content source for on-demand streams.
|
|
124
|
+
*
|
|
125
|
+
* @remarks
|
|
126
|
+
* <br/> - This property is required for on-demand streams.
|
|
127
|
+
*/
|
|
128
|
+
videoID: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Represents a media resource with a Google DAI server-side ad insertion request.
|
|
133
|
+
*
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
export interface GoogleDAITypedSource extends TypedSource {
|
|
137
|
+
/**
|
|
138
|
+
* The content type (MIME type) of the media resource, represented by a value from the following list:
|
|
139
|
+
* <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.
|
|
140
|
+
* <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.
|
|
141
|
+
*/
|
|
142
|
+
type: string;
|
|
143
|
+
|
|
144
|
+
ssai: GoogleDAIVodConfiguration | GoogleDAILiveConfiguration;
|
|
145
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TypedSource } from '../../SourceDescription';
|
|
2
|
+
import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertionConfiguration';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The identifier of the Imagine integration.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type ImagineSSAIIntegrationID = 'imagine';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Describes the SSAI configuration of the Imagine integration.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export interface ImagineServerSideAdInsertionConfiguration extends ServerSideAdInsertionConfiguration {
|
|
17
|
+
/**
|
|
18
|
+
* {@inheritDoc ServerSideAdInsertionConfiguration.integration}
|
|
19
|
+
*/
|
|
20
|
+
integration: ImagineSSAIIntegrationID;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Describes a source of the Imagine integration.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export interface ImagineTypedSource extends TypedSource {
|
|
29
|
+
ssai: ImagineServerSideAdInsertionConfiguration;
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { YospaceSSAIIntegrationID } from './YospaceServerSideAdInsertionConfiguration';
|
|
2
|
+
import type { GoogleDAISSAIIntegrationID } from './GoogleDAIConfiguration';
|
|
3
|
+
import type { ImagineSSAIIntegrationID } from './ImagineServerSideAdInsertionConfiguration';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The identifier of a server-side ad insertion pre-integration, represented by a value from the following list:
|
|
7
|
+
* <br/> - `'yospace'`: The configuration with this identifier is a {@link YospaceServerSideAdInsertionConfiguration}
|
|
8
|
+
* <br/> - `'google-dai'`: The configuration with this identifier is a {@link GoogleDAIConfiguration}
|
|
9
|
+
* <br/> - `'imagine'`: The configuration with this identifier is a {@link ImagineServerSideAdInsertionConfiguration}
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type SSAIIntegrationId = YospaceSSAIIntegrationID | GoogleDAISSAIIntegrationID | ImagineSSAIIntegrationID;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents a configuration for server-side ad insertion (SSAI).
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* <br/> - Available since v2.12.0.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface ServerSideAdInsertionConfiguration {
|
|
24
|
+
/**
|
|
25
|
+
* The identifier for the SSAI integration.
|
|
26
|
+
*/
|
|
27
|
+
integration: SSAIIntegrationId;
|
|
28
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertionConfiguration';
|
|
2
|
+
import type { TypedSource } from '../../SourceDescription';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The identifier of the Yospace integration.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type YospaceSSAIIntegrationID = 'yospace';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The type of the Yospace stream, represented by a value from the following list:
|
|
13
|
+
* <br/> - `'live'`: The stream is a live stream.
|
|
14
|
+
* <br/> - `'livepause'`: The stream is a live stream with a large DVR window.
|
|
15
|
+
* <br/> - `'nonlinear'`: The stream is a Non-Linear Start-Over stream.
|
|
16
|
+
* <br/> - `'vod'`: The stream is a video-on-demand stream.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export type YospaceStreamType = 'vod' | 'live' | 'livepause' | 'nonlinear';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents a configuration for server-side ad insertion with the Yospace pre-integration.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* <br/> - Available since v2.14.7.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface YospaceServerSideAdInsertionConfiguration extends ServerSideAdInsertionConfiguration {
|
|
31
|
+
/**
|
|
32
|
+
* The identifier for the SSAI pre-integration.
|
|
33
|
+
*/
|
|
34
|
+
integration: YospaceSSAIIntegrationID;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The type of the requested stream.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `'live'`
|
|
40
|
+
*/
|
|
41
|
+
streamType?: YospaceStreamType;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Represents a media resource with a Yospace server-side ad insertion request.
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export interface YospaceTypedSource extends TypedSource {
|
|
50
|
+
ssai: YospaceServerSideAdInsertionConfiguration;
|
|
51
|
+
}
|
package/src/api/source/barrel.ts
CHANGED
|
@@ -92,34 +92,6 @@ export interface KeySystemConfiguration {
|
|
|
92
92
|
* The certificate for the key system. This can be either an ArrayBuffer or Uint8Array containing the raw certificate bytes or a base64-encoded variant of this.
|
|
93
93
|
*/
|
|
94
94
|
certificate?: string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Process the certificate's request.
|
|
98
|
-
*
|
|
99
|
-
* @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onCertificateRequest} instead.
|
|
100
|
-
*/
|
|
101
|
-
certificateRequestProcessor?: DRMProcessor;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Process the certificate's response.
|
|
105
|
-
*
|
|
106
|
-
* @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onCertificateResponse} instead.
|
|
107
|
-
*/
|
|
108
|
-
certificateResponseProcessor?: DRMProcessor;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Process the license's request.
|
|
112
|
-
*
|
|
113
|
-
* @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onLicenseRequest} instead.
|
|
114
|
-
*/
|
|
115
|
-
licenseRequestProcessor?: DRMProcessor;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Process the license's response.
|
|
119
|
-
*
|
|
120
|
-
* @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onLicenseResponse} instead.
|
|
121
|
-
*/
|
|
122
|
-
licenseResponseProcessor?: DRMProcessor;
|
|
123
95
|
}
|
|
124
96
|
|
|
125
97
|
/**
|
|
@@ -162,13 +134,6 @@ export interface PlayReadyKeySystemConfiguration extends KeySystemConfiguration
|
|
|
162
134
|
*/
|
|
163
135
|
export type WidevineKeySystemConfiguration = KeySystemConfiguration;
|
|
164
136
|
|
|
165
|
-
/**
|
|
166
|
-
* A function which processes DRM data.
|
|
167
|
-
*
|
|
168
|
-
* @public
|
|
169
|
-
*/
|
|
170
|
-
export type DRMProcessor = (arrayBuffer: ArrayBuffer) => ArrayBuffer;
|
|
171
|
-
|
|
172
137
|
/**
|
|
173
138
|
* Describes the ClearKey key system configuration.
|
|
174
139
|
*
|
|
@@ -37,7 +37,7 @@ export interface MediaTrack extends Track {
|
|
|
37
37
|
/**
|
|
38
38
|
* The label of the media track.
|
|
39
39
|
*/
|
|
40
|
-
label: string;
|
|
40
|
+
readonly label: string;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* The language of the media track.
|
|
@@ -61,5 +61,25 @@ export interface MediaTrack extends Track {
|
|
|
61
61
|
* <br/> - If desired qualities are present, the Adaptive Bitrate mechanism of the player will limit itself to these qualities.
|
|
62
62
|
* <br/> - If one desired quality is present, the Adaptive Bitrate mechanism of the player will be disabled and the desired quality will be played back.
|
|
63
63
|
*/
|
|
64
|
-
targetQuality: number | number[] | undefined;
|
|
64
|
+
readonly targetQuality: number | number[] | undefined;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function findMediaTrackByUid(mediaTracks: MediaTrack[], uid: number | undefined): MediaTrack | undefined {
|
|
68
|
+
return mediaTracks.find((track) => track.uid === uid);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function findQualityByUid(mediaTrack: MediaTrack, uid: number | undefined): Quality | undefined {
|
|
72
|
+
return mediaTrack.qualities.find((quality) => quality.uid === uid);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function findQualitiesByUid(mediaTrack: MediaTrack | undefined, uid: number | number[] | undefined): Quality[] | undefined {
|
|
76
|
+
if (uid && mediaTrack) {
|
|
77
|
+
if (Array.isArray(uid)) {
|
|
78
|
+
return mediaTrack.qualities.filter((quality) => uid.includes(quality.uid));
|
|
79
|
+
} else {
|
|
80
|
+
const quality = findQualityByUid(mediaTrack, uid);
|
|
81
|
+
return quality ? [quality] : undefined;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return undefined;
|
|
65
85
|
}
|