diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-11-18 11:36:21 +0100 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-11-20 13:34:31 +0100 |
commit | 35c4c354164b7526fb77fc315846a0338f66cd81 (patch) | |
tree | 4a7f513f057da228e563f79c0b809bec668c7059 /components/embedder_traits/lib.rs | |
parent | f65c4008287d6c71b6d3c94183139b16b170b5ca (diff) | |
download | servo-35c4c354164b7526fb77fc315846a0338f66cd81.tar.gz servo-35c4c354164b7526fb77fc315846a0338f66cd81.zip |
Fix metadata update
Diffstat (limited to 'components/embedder_traits/lib.rs')
-rw-r--r-- | components/embedder_traits/lib.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/components/embedder_traits/lib.rs b/components/embedder_traits/lib.rs index f65ed514f4d..9d4e56dd297 100644 --- a/components/embedder_traits/lib.rs +++ b/components/embedder_traits/lib.rs @@ -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 |