Reputation: 4206
I'm trying to build a Spotify app that displays a Youtube video in an iFrame. I've done this and it works in a normal browser. However, when I attempt to run it in Spotify, I get an error in the iFrame saying The Adobe Flash Player or an HTML5 supported browser is required for video playback.
I've installed Flash manually, outside of Google Chrome, so I know that it's there. I was wondering if there was anything else I needed to do in order to enable Flash in a Spotify app. Perhaps something in the manifest.json
?
Here is my source for my player
, which is almost straight from the Youtube demo:
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '390',
width: '640',
videoId: 'Gz2GVlQkn4Q',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerReady(event) {
event.target.playVideo();
}
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
done = true;
}
}
function stopVideo() {
player.stopVideo();
}
Upvotes: 0
Views: 132
Reputation: 3279
Flash is not supported in the built-in browser used by Spotify Apps on the Spotify Desktop Client. You can find a information about the supported capabilities in the Spotify Developer Guidelines.
Upvotes: 1