Announcements

Help Wizard

Step 1

NEXT STEP

duration_ms is missing in WebPlaybackTrack object

duration_ms is missing in WebPlaybackTrack object

Plan

Premium

Country

Japan

 

My Question or Issue

 

Hello.

I develop a web client app of Spotify using Web Playback SDK.

 

There seems to be duration_ms prop in WebPlaybackObject. (green underlined part of the image below)

 

WebPlaybackTrack objectWebPlaybackTrack object

 

But, in Web Playback SDK Referenceduration_ms prop isn't listed. I think the reference is missing duration_ms prop.

 

 

 

 

 

Reply
2 Replies

Hey @nokazn, thanks for letting me know about this!

I'd love to take a closer look here. Just to confirm, when you make a request, you do get the duration_ms prop? It's only the website that doesn't show this in the reference? Let me know and I'd be happy to pass that on to the right folks.

 

Thanks, have a good one,

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Hello, @Hubo.

I'm so sorry for the late replay.

 

I can recieve duration_ms prop in track objects when playback state has changed.

As far as I can see, the link above is the only reference about WebPlaybackTrack object.

 

Thank you.

 

Edit:

There is a type declaration package for TypeScript in @types/spotify-web-playback-sdk, and this also doesn't include duration_ms field in Track interface. 

Additionally, the track object in the image above contains linked_from & linkd_from_uri field, but these seem to always return null at present.

 

Suggested posts