duration_ms is missing in WebPlaybackTrack object

Reply
Highlighted

duration_ms is missing in WebPlaybackTrack object

Casual Listener

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.

 

 

 

 

 

2 Replies
Highlighted

Re: duration_ms is missing in WebPlaybackTrack object

Rock Star 16
Rock Star 16

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

HuboRock Star 16
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.
Highlighted

Re: duration_ms is missing in WebPlaybackTrack object

Casual Listener

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