0

In Chrome

  • I can't seek / skip ahead in an audio track when played from my localhost.
  • I can skip head when the src mp3 is on a remote server.

Both play and seek in FireFox and IE. I'm using Java Spring MVC with Apache Tomcat 7.

From other posts I thought perhaps this was a header byte range issue so I added useAcceptRanges = 1 to my servlets web.xml.

<servlet>
    <servlet-name>default</servlet-name>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
    <init-param>
        <param-name>useAcceptRanges</param-name>
        <param-value>1</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

Here is my Spring security XML

<security:intercept-url pattern="/static/**" access="permitAll" />

Here is the html code in my JSP page which plays the same mp3 from a remote server and my localhost. Again both play but in Chrome I can't seek / skip head in the audio track.

<audio controls>
    <source src="http://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"</source>
</audio>

<audio controls>
    <source src="http://localhost:8080/MyProject/static/music/SoundHelix-Song-1.mp3"></source>
</audio>

Hoping this is a configuration issue.

Community
  • 1
  • 1
Conor
  • 85
  • 1
  • 10
  • Looks like a similar question has been asked before by user sabbir. It also has no answers. https://stackoverflow.com/questions/33261640/unable-to-seek-audio-file-in-chrome-served-by-my-own-server – Conor Jul 27 '17 at 15:13
  • Only work around I can think of is serving up my music files via a different web app that's completely independent of Spring. – Conor Jul 27 '17 at 21:50

0 Answers0