Fix metadata update

This commit is contained in:
Fernando Jiménez Moreno 2019-11-18 11:36:21 +01:00
parent f65c400828
commit 35c4c35416
5 changed files with 62 additions and 29 deletions

View file

@ -213,9 +213,19 @@ pub struct MediaMetadata {
/// Title
pub title: String,
/// Artist
pub artist: Option<String>,
pub artist: String,
/// Album
pub album: Option<String>,
pub album: String,
}
impl MediaMetadata {
pub fn new(title: String) -> Self {
Self {
title,
artist: "".to_owned(),
album: "".to_owned(),
}
}
}
/// https://w3c.github.io/mediasession/#enumdef-mediasessionplaybackstate