<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IFrame API truncates milliseconds when using seek() in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/IFrame-API-truncates-milliseconds-when-using-seek/m-p/7431807#M21359</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;​This is a very solid technical analysis. You are correct that one second precision is not enough for synced transcripts.&lt;/P&gt;&lt;P&gt;​The issue with the seek method ignoring milliseconds is a known pain point for many developers. Since the internal system already uses milliseconds, it would make sense for the controller to support floating point numbers instead of rounding them down.&lt;/P&gt;&lt;P&gt;​Because you found the specific logic issue, you should definitely report this in the official Spotify Developer Issue Tracker. High quality reports like yours are the ones that actually get fixed by the engineering team.&lt;/P&gt;&lt;P&gt;​In the meantime, is it possible for you to use the Web Playback SDK instead of the Embed for your project? That might give you the precision you need.&lt;/P&gt;</description>
    <pubDate>Sun, 10 May 2026 02:47:34 GMT</pubDate>
    <dc:creator>radwan_almsora</dc:creator>
    <dc:date>2026-05-10T02:47:34Z</dc:date>
    <item>
      <title>IFrame API truncates milliseconds when using seek()</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/IFrame-API-truncates-milliseconds-when-using-seek/m-p/7408550#M21208</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Premium&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;United States&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2023 Macbook Pro&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MacOS 26.3.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;We use the Spotify Embed to play podcasts alongside synchronized, timestamped transcripts. Our sync data has millisecond precision (e.g., a lyric line starting at &lt;/SPAN&gt;&lt;SPAN class=""&gt;56.773s&lt;/SPAN&gt;&lt;SPAN class=""&gt;). When a user clicks a sentence&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;to jump to that point in the podcast, we call &lt;/SPAN&gt;&lt;SPAN class=""&gt;seek(56.773)&lt;/SPAN&gt;&lt;SPAN class=""&gt;, but the player jumps to &lt;/SPAN&gt;&lt;SPAN class=""&gt;56.000&lt;/SPAN&gt;&lt;SPAN class=""&gt; instead — nearly 800ms too early.&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;This causes the playback cursor to land in the middle of the &lt;I&gt;previous&lt;/I&gt; line's words, resulting in cut-off audio and a confusing experience for users trying to follow along.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The &lt;/SPAN&gt;&lt;SPAN class=""&gt;EmbedController.seek(seconds)&lt;/SPAN&gt;&lt;SPAN class=""&gt; method currently only accepts an integer parameter, truncating any sub-second precision. This makes it impossible to seek to a specific millisecond offset within a track.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The current 1-second granularity is too coarse for any transcript use case. This is a fully completely artificial limitation—the internal APIs accept milliseconds parameters, and there's no reason that the seek(seconds) method can't accept a floating-point parameter.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Even 100ms precision would be a significant improvement.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;This is caused by using "&lt;SPAN&gt;parseInt(event.data?.timestamp, 10)" when handling the timestamp data.&amp;nbsp;&lt;/SPAN&gt;This can be fixed very easily by changing the `SEEK` handler to use `Number` instead when handling the message from the iFrame API.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;```js&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;case&lt;/SPAN&gt; &lt;SPAN&gt;MessageType&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SEEK&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&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>
      <pubDate>Thu, 16 Apr 2026 21:15:41 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/IFrame-API-truncates-milliseconds-when-using-seek/m-p/7408550#M21208</guid>
      <dc:creator>spotify-genius</dc:creator>
      <dc:date>2026-04-16T21:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: IFrame API truncates milliseconds when using seek()</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/IFrame-API-truncates-milliseconds-when-using-seek/m-p/7431807#M21359</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;​This is a very solid technical analysis. You are correct that one second precision is not enough for synced transcripts.&lt;/P&gt;&lt;P&gt;​The issue with the seek method ignoring milliseconds is a known pain point for many developers. Since the internal system already uses milliseconds, it would make sense for the controller to support floating point numbers instead of rounding them down.&lt;/P&gt;&lt;P&gt;​Because you found the specific logic issue, you should definitely report this in the official Spotify Developer Issue Tracker. High quality reports like yours are the ones that actually get fixed by the engineering team.&lt;/P&gt;&lt;P&gt;​In the meantime, is it possible for you to use the Web Playback SDK instead of the Embed for your project? That might give you the precision you need.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2026 02:47:34 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/IFrame-API-truncates-milliseconds-when-using-seek/m-p/7431807#M21359</guid>
      <dc:creator>radwan_almsora</dc:creator>
      <dc:date>2026-05-10T02:47:34Z</dc:date>
    </item>
  </channel>
</rss>

