Playerビューをアプリケーションに追加しようとしていますので、カバーアートと再生/一時停止ボタンが表示されます。私は再生ボタンをクリックしようとすると、しかし、APIは例外TypeError:Spotify APIがPlayerビューでTypeErrorをスローする
Uncaught TypeError: Cannot read property 'length' of undefined
Album.get
Object.defineProperties.playing.set
Player.play.context
フォルトコードがライン上に、models.jsであるように思わ:641:
Album.prototype.get = function(index) {
if (index >= this.data.tracks.length) {
throw new RangeError("Index out of range");
}
return new Track(this.data.tracks[index]);
};
私のコードのルックスこのように:
var p = new views.Player();
p.context = track.album;
document.getElementById('album-element').appendChild (p.node);
これは、SpotifyはAPIのバグ、またはいくつかの文書化されていないイベントですか?