Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@eduardoroth/media-player
Advanced tools
Native Media Player for iOS, Android and Browser. Based on the great work of @jepiqueau
npm install @eduardoroth/media-player
npx cap sync
create(...)
play(...)
pause(...)
getDuration(...)
getCurrentTime(...)
setCurrentTime(...)
isPlaying(...)
isMuted(...)
mute(...)
getVolume(...)
setVolume(...)
getRate(...)
setRate(...)
remove(...)
removeAll()
addListener('MediaPlayer:Ready', ...)
addListener('MediaPlayer:Play', ...)
addListener('MediaPlayer:Pause', ...)
addListener('MediaPlayer:Ended', ...)
addListener('MediaPlayer:Removed', ...)
addListener('MediaPlayer:Seeked', ...)
addListener('MediaPlayer:TimeUpdate', ...)
addListener('MediaPlayer:FullScreen', ...)
addListener('MediaPlayer:PictureInPicture', ...)
removeAllListeners(...)
create(options: MediaPlayerOptions) => Promise<MediaPlayerResult<string>>
Param | Type |
---|---|
options | MediaPlayerOptions |
Returns: Promise<MediaPlayerResult<string>>
play(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<string>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<string>>
pause(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<string>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<string>>
getDuration(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<number>>
getCurrentTime(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<number>>
setCurrentTime(options: MediaPlayerSetCurrentTimeOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerSetCurrentTimeOptions |
Returns: Promise<MediaPlayerResult<number>>
isPlaying(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<boolean>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<boolean>>
isMuted(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<boolean>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<boolean>>
mute(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<boolean>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<boolean>>
getVolume(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<number>>
setVolume(options: MediaPlayerSetVolumeOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerSetVolumeOptions |
Returns: Promise<MediaPlayerResult<number>>
getRate(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<number>>
setRate(options: MediaPlayerSetRateOptions) => Promise<MediaPlayerResult<number>>
Param | Type |
---|---|
options | MediaPlayerSetRateOptions |
Returns: Promise<MediaPlayerResult<number>>
remove(options: MediaPlayerIdOptions) => Promise<MediaPlayerResult<string>>
Param | Type |
---|---|
options | MediaPlayerIdOptions |
Returns: Promise<MediaPlayerResult<string>>
removeAll() => Promise<MediaPlayerResult<string[]>>
Returns: Promise<MediaPlayerResult<string[]>>
addListener(event: 'MediaPlayer:Ready', listener: (event: { playerId: string; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:Ready' |
listener | (event: { playerId: string; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:Play', listener: (event: { playerId: string; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:Play' |
listener | (event: { playerId: string; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:Pause', listener: (event: { playerId: string; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:Pause' |
listener | (event: { playerId: string; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:Ended', listener: (event: { playerId: string; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:Ended' |
listener | (event: { playerId: string; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:Removed', listener: (event: { playerId: string; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:Removed' |
listener | (event: { playerId: string; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:Seeked', listener: (event: { playerId: string; previousTime: number | undefined; newTime: number; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:Seeked' |
listener | (event: { playerId: string; previousTime: number; newTime: number; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:TimeUpdate', listener: (event: { playerId: string; currentTime: number; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:TimeUpdate' |
listener | (event: { playerId: string; currentTime: number; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:FullScreen', listener: (event: { playerId: string; isInFullScreen: boolean; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:FullScreen' |
listener | (event: { playerId: string; isInFullScreen: boolean; }) => void |
Returns: Promise<PluginListenerHandle>
addListener(event: 'MediaPlayer:PictureInPicture', listener: (event: { playerId: string; isInPictureInPicture: boolean; }) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
event | 'MediaPlayer:PictureInPicture' |
listener | (event: { playerId: string; isInPictureInPicture: boolean; }) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners(playerId: string) => Promise<void>
Param | Type |
---|---|
playerId | string |
Prop | Type |
---|---|
name | string |
message | string |
stack | string |
Prop | Type |
---|---|
remove | () => Promise<void> |
{ method: string; result: boolean; value?: ResultValueType; error?: Error; message?: string; }
{ playerId: string; url: string; ios?: MediaPlayerIosOptions; android?: MediaPlayerAndroidOptions; web?: MediaPlayerWebOptions; extra?: { title?: string; subtitle?: string; poster?: string; artist?: string; rate?: number; subtitles?: MediaPlayerSubtitleOptions; loopOnEnd?: boolean; showControls?: boolean; headers?: { [key: string]: string; }; }; }
{ enableExternalPlayback?: boolean; enablePiP?: boolean; enableBackgroundPlay?: boolean; openInFullscreen?: boolean; automaticallyEnterPiP?: boolean; fullscreenOnLandscape?: boolean; top?: number; left?: number; height?: number; width?: number; }
{ enableChromecast?: boolean; enablePiP?: boolean; enableBackgroundPlay?: boolean; openInFullscreen?: boolean; automaticallyEnterPiP?: boolean; fullscreenOnLandscape?: boolean; top?: number; left?: number; height?: number; width?: number; }
{ enableChromecast?: boolean; }
{ url: string; options?: { language?: string; foregroundColor?: string; backgroundColor?: string; fontSize?: number; }; }
{ playerId: string; }
{ playerId: string; time: number; }
{ playerId: string; volume: number; }
{ playerId: string; rate: number; }
FAQs
Updated Media Player for iOS, Android and Web
We found that @eduardoroth/media-player demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.