import { NativeModule, requireNativeModule } from 'expo-modules-core'; import { LoadingState, SourceRemoteControlConfig } from '../source'; import { Thumbnail } from '../thumbnail'; export type SourceModuleEvents = Record; declare class SourceModule extends NativeModule { /** * Checks if the source is attached to a player. */ isAttachedToPlayer(nativeId: string): Promise; /** * Checks if the source is currently active. */ isActive(nativeId: string): Promise; /** * Initializes a source with the given nativeId, optional DRM nativeId, configuration object, * and remote control object. */ initializeWithConfig( nativeId: string, drmNativeId?: string, config?: Record, remoteControl?: SourceRemoteControlConfig ): Promise; /** * Initializes a source with the given nativeId, optional DRM nativeId, configuration object, * remote control object, and analytics source metadata. */ initializeWithAnalyticsConfig( nativeId: string, drmNativeId?: string, config?: Record, remoteControl?: SourceRemoteControlConfig, analyticsSourceMetadata?: Record ): Promise; /** * Destroys the source with the given nativeId. */ destroy(nativeId: string): Promise; /** * Returns the native DRM config reference of the source with the given nativeId. */ duration(nativeId: string): Promise; /** * Returns the current loading state of the source with the given nativeId. */ loadingState(nativeId: string): Promise; /** * Returns the metadata of the source with the given nativeId. */ getMetadata(nativeId: string): Promise | null>; /** * Sets the metadata of the source with the given nativeId. */ setMetadata( nativeId: string, metadata: Record | null ): Promise; /** * Returns a thumbnail for the specified playback time. */ getThumbnail(nativeId: string, time: number): Promise; /** * Renews an expiring FairPlay license for the given content key request. * * @platform iOS, tvOS */ drmFairplayRenewExpiringLicense( nativeId: string, skdUri: string ): Promise; } export default requireNativeModule('SourceModule');