Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

byteark-player-react

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byteark-player-react - npm Package Compare versions

Comparing version 2.1.0-rc.1 to 2.1.0-rc.2

86

dist/types.d.ts

@@ -1,80 +0,8 @@

import type { ReactNode } from 'react';
import videojs from 'video.js';
export interface AutoplayResult {
autoplay: boolean;
muted: boolean;
declare module 'byteark-player-react' {
import { ComponentType } from 'react'
import type { ByteArkPlayerOptions } from './src/types'
const ByteArkPlayerContainer: ComponentType<ByteArkPlayerOptions & Record<string, any>>
export { ByteArkPlayerContainer }
}
export interface ByteArkPlayer extends videojs.Player {
autoplayResult_: AutoplayResult;
canAutoplay(props: ByteArkPlayerOptions): Promise<AutoplayResult>;
init: DefaultCreatePlayerFunction;
initAsync: DefaultCreatePlayerFunction;
isBrowserSupportDrm(): Promise<{
widevine: boolean;
fairplay: boolean;
}>;
seekButtons?: boolean;
setup: DefaultSetupPlayerFunction;
sources: Array<ByteArkPlayerSource & Record<string, any>>;
}
type ByteArkPlayerPluginName = 'ads' | 'bytearkAds' | 'bytearkFirework' | 'bytearkHls' | 'bytearkLighthouse' | 'contextmenuUI' | 'seekButtons' | 'bytearkVolumeBooster' | 'bytearkRetentionChart';
export interface ByteArkPlayerSource {
/** The url to the source */
src: string;
/** The MIME type of the source */
type?: string | undefined;
/** The video title text */
title?: string;
/** The video ID for ByteArk Lighthouse implementation */
videoId?: string;
/** The url of an image to be displayed before the video starts */
poster?: string;
}
export interface ByteArkPlayerOptions extends videojs.PlayerOptions {
autoplayadsmuted?: boolean;
className?: string;
createPlaceholderFunction?: DefaultCreatePlaceholderFunction;
createPlayerFunction?: DefaultCreatePlayerFunction;
lazyload?: boolean;
onPlayerCreated?: (player: ByteArkPlayer) => any;
onPlayerLoaded?: () => any;
onPlayerLoadError?: (error: LoadErrorMessageProps, originalError: any) => any;
onReady?: (player: ByteArkPlayer) => any;
onPlayerSetup?: () => any;
onPlayerSetupError?: (error: LoadErrorMessageProps, originalError: any) => any;
playerEndpoint?: string;
playerServerEndpoint?: string;
playerSlugId?: string;
playerVersion?: string;
playerJsFileName?: string;
playerCssFileName?: string;
plugins?: Record<ByteArkPlayerPluginName | string, any>[];
seekButtons?: boolean;
sources: Array<ByteArkPlayerSource & Record<string, any>>;
setupPlayerFunction?: DefaultSetupPlayerFunction;
techCanOverridePoster?: boolean;
}
export type ByteArkPlayerWithAutoplayResult = ByteArkPlayerOptions & {
autoplayResult_: AutoplayResult;
};
export interface LoadErrorMessageProps {
message?: string;
messageSecondary?: string;
code?: string;
}
export interface PlayerPlaceholderProps {
aspectRatio: string | undefined;
onClick: () => void;
className?: string;
error: LoadErrorMessageProps | null;
loaded: boolean;
playerOptions: ByteArkPlayerOptions;
}
export type DefaultCreatePlaceholderFunction = (props: ByteArkPlayerOptions, state: {
error: LoadErrorMessageProps | null;
loaded: boolean;
}, onClickPlaceholder: () => void) => ReactNode;
export type DefaultCreatePlayerFunction = (videoNode: HTMLVideoElement | HTMLAudioElement, options: ByteArkPlayerOptions | ByteArkPlayerWithAutoplayResult, onReady: () => any) => Promise<ByteArkPlayer>;
export type DefaultSetupPlayerFunction = (options: ByteArkPlayerOptions, loadScriptOrStyleFunction: (id: string, url: string, type: string) => any, customOptions?: Record<string, string | Record<string, any>>) => Promise<void>;
export {};
//# sourceMappingURL=types.d.ts.map

4

package.json
{
"name": "byteark-player-react",
"version": "2.1.0-rc.1",
"version": "2.1.0-rc.2",
"description": "ByteArk Player Container for React",

@@ -16,3 +16,3 @@ "author": "byteark",

"scripts": {
"build": "microbundle --no-compress --format modern,cjs --jsx React.createElement",
"build": "microbundle --no-compress --format modern,cjs --jsx React.createElement && cp ./types.d.ts dist/",
"start": "microbundle watch --no-compress --format modern,cjs --jsx React.createElement",

@@ -19,0 +19,0 @@ "prepublish": "run-s build",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc