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