简体   繁体   English

JPlayer on Rails

[英]JPlayer on Rails

I am using Ruby on Rails 3 to create my site.我在 Rails 3 上使用 Ruby 来创建我的网站。 I am trying to install Jplayer into my site, however i am fairly new to this.我正在尝试将 Jplayer 安装到我的网站中,但是我对此很陌生。 I built the javascript with Dashcode and it put it into my rails folder, but i do not know if i need to move it into the apps folder or just leave it in the folder as my project.我使用 Dashcode 构建了 javascript 并将其放入我的 rails 文件夹中,但我不知道是否需要将其移动到应用程序文件夹中,或者将其作为我的项目留在文件夹中。 I am also supposed to be putting code into my (html) but Rails usually doesn't do it that way, so can i just put the code anywhere in the page?我也应该将代码放入我的 (html) 但 Rails 通常不会这样做,所以我可以将代码放在页面中的任何位置吗? I have been following the "Quick start" tutorial for jPlayer by Happyworm but i am getting this我一直在关注 Happyworm 的 jPlayer 的“快速入门”教程,但我得到了这个

在此处输入图像描述

which is not what it is supposed to look like.这不是它应该看起来的样子。 This is a link the the second to last step in the tutorial where i am supposed to get a visual image of the audio player which also includes the code i have in my page.这是教程中倒数第二个步骤的链接,我应该在其中获得音频播放器的视觉图像,其中还包括我在页面中拥有的代码。 I know i put a lot of questions in but any help would be great.我知道我提出了很多问题,但任何帮助都会很棒。 Thanks!谢谢!

write this inside you head tag:把这个写在你的头标签里:

<link href="http://jplayer.org/latest/skin/pink.flag/jplayer.pink.flag.css" rel="stylesheet" type="text/css" />

It looks like you're not loading a stylesheets/theme for jplayer.看起来您没有为 jplayer 加载样式表/主题。

You have to load a theme (You can find the standard one here )你必须加载一个主题(你可以在这里找到标准的)

<head>
  <link rel="stylesheet" type="text/css" href="static/jPlayer/jplayer.blue.monday.css" />
  <!-- ... -->
</head>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM