@wscsports/blaze-rtn-sdk
Version:
WSC Sports Blaze SDK component for React Native
44 lines • 1.71 kB
TypeScript
import { IBlazeAnalytics, BlazeError } from '../interfaces';
export interface BlazeGlobalDelegate {
/**
* Called when an analytics event is triggered by the SDK.
*
* @param params - Contains the analytics event data.
*/
onEventTriggered?: (params: BlazeOnEventTriggeredParams) => void;
/**
* Called when an error is thrown by the SDK.
*
* @param params - Contains the error details.
*/
onErrorThrown?: (params: BlazeOnErrorThrownParams) => void;
/**
* Called before playing HLS or MP4 content to allow playback modification (e.g., URL tokenization, header modification).
* If not implemented, the original content will be used without modification.
*
* Unlike on Native, this can't be async because on Android our full screen player stop the JS thread from executing (ReactNative limitation).
*
* @param request - Contains the original URL.
* @returns the modified playback response.
*/
playbackModificationHandler?: (request: BlazePlaybackModificationRequest) => BlazePlaybackModificationResponse;
}
export interface BlazeOnEventTriggeredParams {
event: IBlazeAnalytics;
}
export interface BlazeOnErrorThrownParams {
error: BlazeError;
}
export interface BlazePlaybackModificationRequest {
originalURL: string;
}
export interface BlazePlaybackModificationResponse {
modifiedURL: string;
}
export declare class BlazeGlobalDelegateHelper {
static registerGlobalDelegate(globalDelegate?: BlazeGlobalDelegate | null): void;
private static playbackModificationHandler;
private static onEventTriggered;
private static onErrorThrown;
}
//# sourceMappingURL=global-delegate.d.ts.map