Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 135700ce02 |
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-player"
|
||||
version = "0.1.15"
|
||||
version = "0.1.16"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -249,13 +249,6 @@ impl Player {
|
||||
self.is_idle = idle;
|
||||
}
|
||||
}
|
||||
|
||||
// Update cache duration (how many seconds are buffered ahead)
|
||||
if let Some(val) = self.get_property("demuxer-cache-duration") {
|
||||
self.cache_duration = val.as_f64();
|
||||
} else {
|
||||
self.cache_duration = None;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_metadata(&mut self) {
|
||||
@@ -313,6 +306,13 @@ impl Player {
|
||||
if let Some(val) = self.get_property("audio-params/samplerate") {
|
||||
self.sample_rate = val.as_i64();
|
||||
}
|
||||
|
||||
// Update cache duration (how many seconds are buffered ahead)
|
||||
if let Some(val) = self.get_property("demuxer-cache-duration") {
|
||||
self.cache_duration = val.as_f64();
|
||||
} else {
|
||||
self.cache_duration = None;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_position(&self) -> Option<f64> {
|
||||
|
||||
Reference in New Issue
Block a user