Can't play sound, http request is always canceled

81 views
Skip to first unread message

July G

unread,
Aug 9, 2012, 12:05:15 PM8/9/12
to gwt-v...@googlegroups.com
hi:
I wan't to play sound located at another site,  i set the crossOrigin=true:
```java
Sound sound =
                    soundController.createSound( Sound.MIME_TYPE_AUDIO_MPEG_MP3, proxy.getFileUrl(), false, true );
                sound.play();
```

play sound failed, below is the http request captured by Chrome debug view:

  1. Request URL:
  2. Request Headersview source
    1. Origin:
    2. Referer:
    3. User-Agent:
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1

when i click view source, it shows:
From the chrome debug view, under "network" tab, i can see the http status for the request is always "canceled" and Type is always "Pending".

I don't know where to start to trace this bug.
Any ideas?
Many thanks.



Fred Sauer

unread,
Aug 9, 2012, 1:21:38 PM8/9/12
to gwt-v...@googlegroups.com
If you're using Web Audio be sure to set the CORS (http://www.w3.org/TR/cors/) headers




--
You received this message because you are subscribed to the Google Groups "gwt-voices" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gwt-voices/-/xAB0n5y1NukJ.
To post to this group, send email to gwt-v...@googlegroups.com.
To unsubscribe from this group, send email to gwt-voices+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-voices?hl=en.



--
Fred Sauer
fr...@allen-sauer.com

July G

unread,
Aug 10, 2012, 12:31:04 AM8/10/12
to gwt-v...@googlegroups.com, fr...@allen-sauer.com
Thank you Fred, i use flash sound and it works!
Reply all
Reply to author
Forward
0 new messages