Skip to content

comfortme/spotify-web-helper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Web Helper for node.js

This is a rewrite of the excellent node-spotify-webhelper, but with support for events, so you don't have to do getStatus() all the time. It also is faster, and starts SpotifyWebHelper on OS X, not just on Windows.

This module is being used on the upcoming new version of onetune.fm!

var SpotifyWebHelper = require('@jonny/spotify-web-helper')

var helper = SpotifyWebHelper()

helper.player.on('ready', function() {

	helper.player.on('play', function() {})
	helper.player.on('pause', function() {})
	helper.player.on('end', function() {})
	helper.player.on('track-change', function (track) {})

	helper.player.on('error', function(err) {})

	// These methods return promises
	helper.player.play('spotify:track:213342152345')
	helper.player.pause()
	helper.player.seek()


	console.log(helper.status)
	// 'status': {
	//  	'track': ...,
	//		'shuffle': ...,
	//		'playing_position': ...
	//  }
});

About

Control Spotify from node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%