Ruby on Rails
Wednesday, December 29, 2010
On Wed, Dec 29, 2010 at 9:39 PM, dare ruby <lists@ruby-forum.com> wrote:
dare ruby wrote in post #971390:
>> I first have to ask for clarification: Have you actually tested that thealso,
>> video is actually compatible with iPad and iPhone (i.e. You've actually
>> copied the video to an iOS device and played it back)?
>
No i have tried the same video using HTML and also using PHP it plays
well in ipad and iphone. Its the same code and video thats not working
in rails.
I have found below mimetypes,
irb(main):001:0> MIME::Types.type_for("example.m4v").to_s
=> "video/mp4"
irb(main):002:0> MIME::Types.type_for("example.mp4").to_s
=> "video/vnd.objectvideo"
Also for your reference when i tried to run like,
http://localhost:3000/videos/example.mp4
It works fine in Mac safari but generates below error in iphone or ipad
safari
"Cannot Play Movie
Server is not configured properly"
what i need to configure apart from setting mime types like above?
Dare, I was able to put together Rails 3.0.3 application using Ruby 1.9.2
without any issues. Furthermore, I didn't have to play with mime type
because this handle by default in Webrick and Nginx. However, this may
not be the case with your configuration. Here's my file:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Some Video</title>
</head>
<body>
<div id="demo-video-flash">
<video id="demo-video" poster="snapshot.jpg" controls>
<source src="/videos/4.mp4" type="video/mp4" /> <!-- MPEG4 for Safari -->
<source src="/videos/4.ogg" type="video/ogg" /> <!-- Ogg Theora for Firefox 3.1b2 -->
</video>
</div>
</body>
</html>
Good luck,
-Conrad
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment