【发布时间】:2014-06-24 11:17:23
【问题描述】:
在我的 Rails 应用程序中,我尝试添加如下视频:
<table class="table">
<tr>
<th width="25%">Candidate</th>
<th width="80%">Video</th>
</tr>
<tr>
<td>
<%= video_player({:file => "/assets/video/water_msg.flv"}, {:width => 470, :height => 400, :id => "water_msg_video", :onclick => "alert('clicked!');"}) %>
</td>
</tr>
</table>
我在:file 中使用上述相对路径,但出现以下错误:
video not found or access denied: /assets/video/water_msg.flv
当我使用完整路径(或链接)而不是像 http://www.longtailvideo.com/jw/upload/bunny.mp4 这样的相对路径时,视频会播放。我该怎么办?
【问题讨论】:
-
把你的视频放到
public文件夹,然后改:file => "/video/water_msg.flv"