Skip to content

Instantly share code, notes, and snippets.

@KevinTCoughlin
Created March 17, 2014 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KevinTCoughlin/9592738 to your computer and use it in GitHub Desktop.
Save KevinTCoughlin/9592738 to your computer and use it in GitHub Desktop.
Windows 8.1 JavaScript SystemMediaControls.displayUpdater Example
// Set & Update SystemMediaControls Display
var updater = systemMediaControls.displayUpdater;
updater.type = Windows.Media.MediaPlaybackType.music;
try {
if (updater !== undefined) {
updater.musicProperties.artist = "Kevin Smith & Scott Mosier";
updater.musicProperties.albumArtist = "SModcast";
updater.musicProperties.title = newEpisode.data.title;
updater.thumbnail = Windows.Storage.Streams.RandomAccessStreamReference.createFromUri(new Windows.Foundation.Uri('http://smodcast.com/wp-content/blogs.dir/1/files_mf/smodcast1400.jpg'));
updater.update();
}
}
catch (e) {
console.log(e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment