Is there a way via JavaScript to see if a person has Spotify installed on their machine. Reason being, if they do, I will share some Spotify URI's on my page (example... spotify:user:124792730:playlist:0Y2wUYw5wxMdZGCqJyqbaA). If they don't, I would prompt them to install Spotify so they can listen to the Spotify URI's instead of serving them broken links.
There is a way to do this for Spotify APPS. But What if I'm not making an app, I just want to serve Spotify URI links from web page only if they have Spotify already.
Update: The following seems to only work on Firefox. I think I'm close, though.
<script type="text/javascript">
try {
location.replace("spotify:user:124792730:playlist:0Y2wUYw5wxMdZGCqJyqbaA");
} catch (e) {
alert("You don't have spotify Installed.");
}
</script>