Question

I'm trying to write a Greasemonkey script that will convert all "Play" links on a page to embedded audio (using the <embed> tag).

When I use a link that I get from a GMail attachment, it works like a charm.

When I use a link from another site (Digium Switchvox), the HTTP response header has ContentType set to "application/octet-stream" instead of "audio/x-wav" (like GMail's link). This confuses Firefox, which decides that I don't have the right plugin installed. If I set the type attribute in the <embed> tag to "audio/x-wav", Firefox uses Quicktime to load the file. Quicktime gets confused, however, and won't play the file.

Does anyone know of a clever way to solve this problem?

Was it helpful?

Solution

have you tried overrideMimeType?

overrideMimeType
String (Compatibility: 0.6.8+) Optional.
A MIME type to specify with the request (E.G. "text/html; charset=ISO-8859-1").

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top