On Jun 22, 2005, at 2:57 PM, Lon Baker wrote:
> Has anyone run into trouble getting Safari to play wav files inline
> using a send_data method?
>
> It seems there is some voodoo that needs to happen to get Safari to
> handle inline wav files, beyond adding the "inline" disposition.
>
> So far sending a simple .wav file using send_data with a
> content_type of "audio/wav". Like so:
>
> send_data(attach.body, :filename =>attach.filename, :type =>
> attach.content_type, :disposition => "inline" )
>
> It works in Omniweb and Firefox, but fails in Safari 2 and Opera 8.
>
> If you take away the inline method then Safari and Opera will
> download the file correctly.
I''m not familiar with using sound files in particular, but we did
have to set the Content-Type header for our video files:
@headers["Content-Type"] = "video/x-ms-asf"
This was set in the controller''s action that gets invoked before
sending the actual video stream data.
Duane Johnson
(canadaduane)
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails