pub struct Video(/* private fields */);
Expand description
A synchronous wrapper around Video
.
Implementations§
Source§impl Video
impl Video
Sourcepub fn from_url(url: &Url) -> Result<Self>
pub fn from_url(url: &Url) -> Result<Self>
A synchronous wrapper around Video::form_url
.
§Errors
- When
VideoFetcher::from_url
fails. - When
VideoFetcher::fetch
fails. - When
VideoDescrambler::descramble
fails.
Sourcepub fn from_id(id: IdBuf) -> Result<Self>
pub fn from_id(id: IdBuf) -> Result<Self>
A synchronous wrapper around Video::form_id
.
§Errors
- When
VideoFetcher::fetch
fails. - When
VideoDescrambler::descramble
fails.
Sourcepub fn into_streams(self) -> Vec<Stream>
pub fn into_streams(self) -> Vec<Stream>
Takes all Stream
s of the video.
Methods from Deref<Target = AsyncVideo>§
Sourcepub fn video_info(&self) -> &VideoInfo
pub fn video_info(&self) -> &VideoInfo
The VideoInfo
of the video.
Sourcepub fn video_details(&self) -> Arc<VideoDetails>
pub fn video_details(&self) -> Arc<VideoDetails>
The VideoDetails
s of the video.
Sourcepub fn is_age_restricted(&self) -> bool
pub fn is_age_restricted(&self) -> bool
Whether or not the video is age restricted.
Sourcepub fn best_quality(&self) -> Option<&Stream>
pub fn best_quality(&self) -> Option<&Stream>
The Stream
with the best quality.
This stream is guaranteed to contain both a video as well as an audio track.
Sourcepub fn worst_quality(&self) -> Option<&Stream>
pub fn worst_quality(&self) -> Option<&Stream>
The Stream
with the worst quality.
This stream is guaranteed to contain both a video as well as an audio track.
Sourcepub fn best_video(&self) -> Option<&Stream>
pub fn best_video(&self) -> Option<&Stream>
The Stream
with the best video quality.
This stream is guaranteed to contain only a video but no audio track.
Sourcepub fn worst_video(&self) -> Option<&Stream>
pub fn worst_video(&self) -> Option<&Stream>
The Stream
with the worst video quality.
This stream is guaranteed to contain only a video but no audio track.
Sourcepub fn best_audio(&self) -> Option<&Stream>
pub fn best_audio(&self) -> Option<&Stream>
The Stream
with the best audio quality.
This stream is guaranteed to contain only a audio but no video track.
Sourcepub fn worst_audio(&self) -> Option<&Stream>
pub fn worst_audio(&self) -> Option<&Stream>
The Stream
with the worst audio quality.
This stream is guaranteed to contain only a audio but no video track.