Commit ee0070a6 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Make media session property setter more resilient

Don't break when it's set to null to unset metadata.

BUG: 401636

Differential Revision: https://phabricator.kde.org/D17326
parent 4944ef98
......@@ -588,7 +588,7 @@ function loadMediaSessionsShim() {
get: function() { return ${mediaSessionsClassName}.metadata; },
set: function(newValue) {
${mediaSessionsClassName}.metadata = newValue;
${mediaSessionsClassName}.sendMessage("metadata", newValue.data);
${mediaSessionsClassName}.sendMessage("metadata", newValue ? newValue.data : null);
}
});
Object.defineProperty(navigator.mediaSession, "playbackState", {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment