Skip to content

Commit 948cb5a

Browse files
Added 'position_ms' for play() (#263)
* Added 'position_ms' for play() Users can now specify the starting position in ms as an argument to play()'s 'options' field. * removed comments
1 parent 74ec750 commit 948cb5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/spotify-web-api.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ SpotifyWebApi.prototype = {
10911091

10921092
/**
10931093
* Starts o Resumes the Current User's Playback
1094-
* @param {Object} [options] Options, being device_id, context_uri, offset, uris.
1094+
* @param {Object} [options] Options, being device_id, context_uri, offset, uris, position_ms.
10951095
* @param {requestCallback} [callback] Optional callback method to be called instead of the promise.
10961096
* @example playbackResume({context_uri: 'spotify:album:5ht7ItJgpBH7W6vJ5BqpPr'}).then(...)
10971097
* @returns {Promise|undefined} A promise that if successful, resolves into a paging object of tracks,
@@ -1104,7 +1104,7 @@ SpotifyWebApi.prototype = {
11041104
? { device_id: _options.device_id }
11051105
: null;
11061106
var postData = {};
1107-
['context_uri', 'uris', 'offset'].forEach(function(field) {
1107+
['context_uri', 'uris', 'offset', 'position_ms'].forEach(function(field) {
11081108
if (field in _options) {
11091109
postData[field] = _options[field];
11101110
}

0 commit comments

Comments
 (0)