Security News
Supply Chain Attack Detected in @solana/web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
media-tracks
Advanced tools
Polyfills the media elements (<audio>
or <video>
) adding audio and video tracks (as specced) and with renditions as proposed in media-ui-extensions.
declare global {
interface HTMLMediaElement {
audioTracks: AudioTrackList;
videoTracks: VideoTrackList;
addAudioTrack(kind: string, label?: string, language?: string): AudioTrack;
addVideoTrack(kind: string, label?: string, language?: string): VideoTrack;
}
}
declare const VideoTrackKind: {
alternative: string;
captions: string;
main: string;
sign: string;
subtitles: string;
commentary: string;
};
declare class VideoTrack {
id?: string;
kind?: string;
label: string;
language: string;
sourceBuffer?: SourceBuffer;
addRendition(src: string, width?: number, height?: number, codec?: string, bitrate?: number, frameRate?: number): VideoRendition;
get renditions(): VideoRenditionList;
get selected(): boolean;
set selected(val: boolean);
}
declare class VideoRenditionList extends EventTarget {
[Symbol.iterator](): IterableIterator<VideoRendition>;
get length(): number;
add(rendition: VideoRendition): void;
remove(rendition: VideoRendition): void;
getRenditionById(id: string): VideoRendition | null;
get activeIndex(): number;
get onaddrendition(): (() => void) | undefined;
set onaddrendition(callback: (() => void) | undefined);
get onremoverendition(): (() => void) | undefined;
set onremoverendition(callback: (() => void) | undefined);
get onchange(): (() => void) | undefined;
set onchange(callback: (() => void) | undefined);
}
export declare class VideoRendition {
src?: string;
id?: string;
width?: number;
height?: number;
bitrate?: number;
frameRate?: number;
codec?: string;
get enabled(): boolean;
set enabled(val: boolean);
get active(): boolean;
set active(val: boolean);
}
FAQs
Polyfill audio and video tracks with renditions.
The npm package media-tracks receives a total of 83,818 weekly downloads. As such, media-tracks popularity was classified as popular.
We found that media-tracks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.