- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试“使用jQuery插件来实现利用HTML5音频标签的功能齐全的音频播放器,并为不支持HTML5的浏览器提供Flash后备功能”时遇到问题。这是Tom Negrino和Dori Smith撰写的“JavaScript视觉快速入门指南,第八版”的第420页。
涉及三个文件:
script06.html
script06.css
script06.js
script06.css文件的第四行可能存在问题,即:src:local('☺'),url('mbPlayer / mbAudioFont / mb_audio_font.woff')。我正在使用记事本。我的浏览器是IE9,并且正在使用Vista。我不知道笑脸是如何进入代码的,以及它是否正确。这三个文件的编码为:
script06.css文件是:
@font-face { font-family:'mb_audio_fontRegular'; src:url('mbPlayer/mbAudioFont/mb_audio_font.eot'); src:local('☺'), url('mbPlayer/mbAudioFont/mb_audio_font.woff') format('woff'), url('mbPlayer/mbAudioFont/mb_audio_font.ttf') format('truetype'), url('mbPlayer/mbAudioFont/mb_audio_font-webfont_svg#webfontywr4YLri') format('svg'); font-weight:normal; font-style:normal; } .mbMiniPlayer span { font:16px/20px "mb_audio_fontRegular","Webdings",sans-serif; } a.audio { display:none; } .mbMiniPlayer table { -moz-border-radius:5px; -webkit-border-radius:8px; border-radius:5px; margin:5px; } .mbMiniPlayer.shadow table { border:1px solid white; -moz-box-shadow:#ccc 0px 0px 5px; -webkit-box-shadow:#ccc 0px 0px 5px; box-shadow:#ccc 0px 0px 5px; } .mbMiniPlayer.black td { margin:0; padding:0; } .jp-progress { position:relative; background-color:#fff; height:8px; margin:2px; margin-top:0; top:-2px; -moz-box-sizing: border-box; cursor:pointer; } .jp-load-bar { background-color:#e9e6e6; height:6px; -moz-box-sizing: border-box; } .jp-play-bar { background-color:black; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#7D7D7D), to(#262626), color-stop(.6,#333)); height:6px; -moz-box-sizing:border-box; } .mbMiniPlayer td.controlsBar { background-color:#ccc; background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#DEDEDE), to(#FFF), color-stop(.6,#FFF)); margin:0; padding:0; cursor:default !important; box-shadow:inset 1px 1px 2px #999; -moz-box-shadow:inset 1px 1px 3px #999; -webkit-box-shadow:inset 1px 1px 2px #999; } .mbMiniPlayer .controls { margin:1px; display:none; width:1px; border:1px solid gray; height:100%; -moz-box-sizing:border-box; overflow:hidden; white-space:nowrap; } .mbMiniPlayer span { display:inline-block; padding:3px; width:20px; height:20px; color:white; text-align:center; text-shadow:1px -1px 1px #000; background-image:-webkit-gradient(linear, 0% 5%, 85% 100%, from(transparent), to(rgba(100, 100, 100,0.5))); } .mbMiniPlayer span.title { position:relative; color:#333; font:10px/12px sans-serif; text-shadow:none !important; letter-spacing:1px; width:100%; height:8px; top:-4px; background:transparent !important; text-align:left; cursor:default !important; } .mbMiniPlayer span.rew { width:1px; cursor:pointer; } .mbMiniPlayer span.volumeLevel a { position:relative; display:inline-block; margin:0; margin-right:2px; width:2px; padding:0; background-color:white; height:0; vertical-align:bottom; opacity:.1; cursor:pointer; } .mbMiniPlayer span.volumeLevel a.sel { -moz-box-shadow:#000 0px 0px 1px; -webkit-box-shadow:#000 0px 0px 1px; box-shadow: #000 0px 0px 1px; } .mbMiniPlayer span.time { width:1px; font:11px/20px sans-serif; overflow:hidden; white-space:nowrap; cursor:default !important; text-shadow:0 0 2px #999!important; } .mbMiniPlayer span.play { -moz-border-radius:0 5px 5px 0; -webkit-border-top-right-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 5px 5px 0; cursor:pointer; } .mbMiniPlayer span.volume { -moz-border-radius:5px 0 0 5px; -webkit-border-top-left-radius:5px; -webkit-border-bottom-left-radius:5px; border-radius:5px 0 0 5px; cursor:pointer; } .mbMiniPlayer.black span { background-color:#666; text-shadow:1px -1px 1px #000; } .mbMiniPlayer.black span.play { border-left:1px solid #333; } .mbMiniPlayer.black span.volume { border-right:1px solid #999; } .mbMiniPlayer.black span.volume.mute { color:#999; }
<!DOCTYPE html><html>
<head>
<title>Audio player</title>
<link rel="stylesheet" href="script06.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="mbPlayer/jquery.mb.miniPlayer.js"></script>
<script src="mbPlayer/jquery.jplayer.min.js"></script>
<script src="script06.js"></script>
</head>
<body>
<h2>jQuery HTML5 audio player</h2>
<div>
<a class="audio {ogg:'mbPlayer/Rhapsody_in_Blue.ogg'}" href="mbPlayer/Rhapsody_in_Blue.mp3">Rhapsody in Blue</a>
</div>
</body>
</html>
$(function () {
$(".audio").mb_miniPlayer({
width: 360,
inLine: false,
showRew: true,
showTime: true
});
});
最佳答案
不要浪费您的时间,有很多不错的免费插件可以帮助您。试试video.js
关于jquery - jQuery HTML5音频播放器插件难度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7781587/
对于我试图为 Oracle SQL 数据库编写的查询,我只是试图从 CI 表中获取所有由某人/某物拥有的行,这些行未列在 sys_user 表中,但返回的结果是由手动检查以下查询实际上在 sys_us
有人可以解密以下内容吗? const connection = (closure) => { return mongoClient.connect(connectionString,(err,
这里是 iOS 开发新手。我的数组有问题。我正在使用 iCarousel 制作应用程序。每当它停止到一个 View 时,它将删除当前 View 或索引,如下所示: NSInteger inde
//RootViewViewController.h #import #import "SettingsViewController.h" #import "OneSlotViewControlle
我正在构建一个游戏,玩家可以在游戏板上拖动一 block 棋子。我想知道那 block 下面的所有节点是什么,但我得到了奇怪的结果。这是 touchesMoves 函数: override f
如果你想看看我有问题的代码,这里是链接: Code 我的问题与我的 past question 有关. 我的 NSMutableArray 真的有问题, 我目前正在使用 iCarousel我的 slo
我需要将联合对象类型(可能有嵌套联合)转换为 可选值的深度交集 类型。基本上所有可能的字段都将相交,并且仅当它存在于联合的一侧时才是可选的 - 并对所有嵌套对象执行此操作。 注意:这不是一个简单的并集
我目前正在开发一个允许直接连接到某些社交网络的程序。这是代码: browser = webdriver.Firefox(executable_path = '/usr/local/bin/geckod
我使用 CakePHP 2.0 作为我网站的框架,我在 CSS 方面遇到了一些困难。基本上出了什么问题是我在 default.ctp 页面上定义了我的 CSS 文件。它在这个页面上工作,但是如果我导航
我正在尝试创建一个 NSTimer 以便我可以将 UIImageView 向下移动但是NSTImer 有困难,先说这个。 var timer = NSTimer.scheduledTimerWithT
我使用 RecaptchaControl ,并且用户提示图像不是那么清晰(验证码中的黑色部分太难阅读)。是否有任何属性可以使图像变得不那么困难(噪音更小)? 最佳答案 简单来说,不是。 正如其他人
我想把几个jpg文件转换成png文件。据我所知,可以使用这个命令 mogrify -format png *.* 我有一个问题,我有很多子文件夹。假设 a 是我的主文件夹,b,c 和 d 是子文件夹。
我正在编写一个带有动态相关选择的简单表单。有两个文件。一个是一个 php 文件,里面有 html、javascript 和 php,第二个是一个 php 文件,用于获取第二次选择的数据并以 json
我正在丢失重音字符。 我从 PHP 下载一个使用 UTF8 的 xml 文件,而我的 PHP 脚本使用 Latin1。我无法将 UTF8 转换为 Latin1。 我已经尝试过这个: $meta=mb_
我在从 json 结果填充 TableView 时遇到困难。我的代码如下(抱歉,但它似乎不想将前两行作为代码:/): 导入 UIKit ViewController 类:UIViewControlle
在母版页中我有以下代码: @ViewBag.Title @RenderBody() 然后在 Index.csh
我想顺序绘制一系列 x,y 坐标,同时清楚地标记指定的坐标。似乎“markevery”允许用户在 matplotlib 图中执行此操作,但是,当我在动画中提供此属性时,我收到错误“ValueError
我正在尝试一个示例程序来了解上一个和下一个排列之间的区别。但是,我的程序似乎无法正常运行。我通过询问数组中元素的数量来启动程序,然后使用简单的 for 循环构建数组 for(i = 0; i < x;
使用 Flex 和 Bison,我有一个 boolean 查询语言的语法规范,它支持逻辑“与”、“或”和“非”操作,以及使用“()”的嵌套子表达式。 一切都很好,直到我注意到诸如“A 和 B 或 C
用例:第 3 方应用程序想要以编程方式监视另一个程序生成的文本文件。文本文件包含您要在更新时分析的数据。 我发现围绕 FileSystemWatcher 这个问题有很多答案,但假设您正在为 Windo
我是一名优秀的程序员,十分优秀!