Mika Scraper / MediaFormat
Interface: MediaFormat
Defined in: src/youtube/ytdl.ts:7
Represents a downloadable media format, applicable to both video and audio content.
Properties
url
url:
string
Defined in:src/youtube/ytdl.ts:8
The URL of the media format, which can be used to initiate the download of the associated content.
quality
quality:
string
Defined in:src/youtube/ytdl.ts:9
Specifies the quality of the media format (e.g., β720pβ, β1080pβ, βaudioβ, etc.). This parameter is crucial for applications that require specific media quality for playback.
ext
ext:
string
Defined in:src/youtube/ytdl.ts:10
The file extension associated with the media format (e.g., β.mp4β, β.mp3β). This property helps determine how the media should be processed by the client application.
size
size:
string
Defined in:src/youtube/ytdl.ts:11
Indicates the file size of the media format. This value is essential for estimating download times and storage requirements.
hasAudio?
optional
hasAudio:boolean
Defined in:src/youtube/ytdl.ts:12
Indicates whether the media format includes an audio track. This is particularly useful for distinguishing between video formats that have separate audio.
Example
const mediaFormat: MediaFormat = {
url: "https://example.com/video.mp4",
quality: "1080p",
ext: ".mp4",
size: "500MB",
hasAudio: true,
};