added playbackMethod to videoitem
This commit is contained in:
@@ -115,6 +115,8 @@ pub struct VideoItem {
|
|||||||
pub preview: Option<String>,
|
pub preview: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub aspectRatio: Option<f32>,
|
pub aspectRatio: Option<f32>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub playbackMethod: Option<String>,
|
||||||
}
|
}
|
||||||
impl VideoItem {
|
impl VideoItem {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
@@ -145,6 +147,7 @@ impl VideoItem {
|
|||||||
embed: None, // Placeholder for embed information
|
embed: None, // Placeholder for embed information
|
||||||
preview: None,
|
preview: None,
|
||||||
aspectRatio: None,
|
aspectRatio: None,
|
||||||
|
playbackMethod: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn from(s: String) -> Result<Self, serde_json::Error> {
|
pub fn from(s: String) -> Result<Self, serde_json::Error> {
|
||||||
@@ -194,6 +197,11 @@ impl VideoItem {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn playback_method(mut self, playback_method: String) -> Self {
|
||||||
|
self.playbackMethod = Some(playback_method);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
/// Re-applies the request host to every host-relative proxy URL on this item
|
/// Re-applies the request host to every host-relative proxy URL on this item
|
||||||
/// (its `url`, `preview`, and each format's `url`). Cached items may have been
|
/// (its `url`, `preview`, and each format's `url`). Cached items may have been
|
||||||
/// built without a host; see [`crate::providers::ensure_proxy_url_host`].
|
/// built without a host; see [`crate::providers::ensure_proxy_url_host`].
|
||||||
|
|||||||
Reference in New Issue
Block a user