Rails 3, Pandastream API - Video not showing up in App

257 Views Asked by At

I've been following this guide to make use of the Pandastream API in my Rails 3 app: http://www.pandastream.com/docs/integrate_with_rails

I've gotten to the point where I can successfully upload a video (I can see it on the dashboard on my pandastream account) from my app, but when I go to my show.html.erb page to view the uploaded video, all I see is an HTML 5 player that just says "Loading", and this code:

#<Panda::Video id: "b1dc1f37094330867e68fa73e7c23c14", created_at: "2012/06/20 17:09:05 +0000", updated_at: "2012/06/20 17:09:07 +0000", original_filename: "panda.mp4", source_url: nil, duration: 14014, height: 240, width: 300, extname: ".mp4", file_size: 805301, video_bitrate: 344, audio_bitrate: 112, audio_codec: "aac", video_codec: "h264", fps: 29.97, audio_channels: 2, audio_sample_rate: 44100, status: "success", path: "b1dc1f37094330867e68fa73e7c23c14", cloud_id: "12fbe9bac70c2264d3b9a6a89511b258">

What am I doing wrong here?

show.html.erb

<h2><%= @video.title %></h2>
<p><%= h @video.panda_video.inspect %></p>

<% if @h264_encoding.success? %>
  <video id="movie" width="<%= @h264_encoding.width %>" height="<%= @h264_encoding.height %>" preload="none" 
  poster="<%= @h264_encoding.screenshots.first %>" controls>
  <source src="<%= @h264_encoding.url %>" type="video/mp4">
  </video>
<% end %>
1

There are 1 best solutions below

0
On

When your upload the video, it is processing for encoding in panda cloud (check the pan). After some time you refresh the browser. The video will be played.