Created
March 17, 2014 02:06
-
-
Save KevinTCoughlin/9592738 to your computer and use it in GitHub Desktop.
Windows 8.1 JavaScript SystemMediaControls.displayUpdater Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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