I'm using jPlayer to play some audio on a web site. Works fine on computers and iPhone, but it's having some issues playing on Android.

我正在使用jPlayer在一个网站上播放一些音频。在电脑和iPhone上运行良好,但在Android上有一些问题。

Tested on a S3 mini with Android 4.2, a S5 with Android 4.4 and on an Emulator running Android 2.2 and all of them have the same problem. Nothing happens when you click play.

在S3 mini上测试了Android 4.2、S5和Android 4.4,以及运行Android 2.2的模拟器,所有这些都有同样的问题。当你点击播放时,什么都不会发生。

Debugging I found that it's a format support issue. Where it checks to see if the format is supported using the line:

调试我发现它是一个格式支持问题。在其中检查格式是否支持使用行:

if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format.

It never returns true.

它永远不会返回true。

Tested the combinations of solutions (HTML and Flash) and format (mp3, m4a and oga) for support and it only returns true for m4a using the HTML player.

测试了解决方案(HTML和Flash)和格式(mp3, m4a和oga)的组合,它只对m4a使用HTML播放器返回true。

Is this a bug on jQuery or mp3 support for Android?

这是jQuery的bug还是Android的mp3支持?

Tested using Chrome and Dolphin with the same result.

使用铬和海豚测试结果相同。

1 个解决方案

#1


1

It is a jQuery bug. It's not a OS related issue, but browser related.

这是一个jQuery bug。这不是一个操作系统相关的问题,而是与浏览器相关的问题。

Was using jPlayer 2.6.0 and in my S3 mini only worked in the default Samsung browser (Chrome and Dolphin didn't play the music). Upgraded to jPlayer 2.6.4 and now it works in Chrome but not Dolphin, so I guess they still have some work to do, I'll report this bug.

使用jPlayer 2.6.0和S3 mini只在默认的三星浏览器(Chrome和海豚没有播放音乐)中使用。升级到jPlayer 2.6.4,现在它在Chrome中工作,但不是海豚,所以我想他们还有一些工作要做,我会报告这个bug。

You can download jPlayer 2.6.4 here: https://raw.githubusercontent.com/happyworm/jPlayer/master/jquery.jplayer/jquery.jplayer.js (still not available in the CDN)

您可以在这里下载jPlayer 2.6.4: https://raw.githubusercontent.com/happyworm/jplayer/master/jquery.jplayer/jquery.js(仍然没有在CDN中提供)

更多相关文章

  1. 尽管referesh,jQuery格式化不适用于ajax数据
  2. xml格式原样输出到html或是jsp页面
  3. flah网站发布问题,我是在flash里面直接发布成html格式,如何提示安
  4. Ajax技术--服务器返回数据格式(HTML,XML,JSON)
  5. Nodejs中利用phantom把html转为pdf或图片格式
  6. 如何用Cdont+ASP发送带附件的html格式邮件
  7. 2.html5的基本格式
  8. java中json数据格式的应用
  9. HTML代码格式化工具

随机推荐

  1. git命令备忘系列(一):基础命令
  2. 专访|前端布道师@张克军
  3. http协议请求方法都有哪些?网络安全学习提
  4. 【第554期】Webpack 一探究竟
  5. Android(安卓)设置dialog背景全透明无边
  6. 单页应用 & 多页应用的区别
  7. F5 同 Ctrl+F5 的区别你可了解
  8. 【同说】小天童鞋:“不断学习,不断成长”
  9. 熔断器 Hystrix 源码解析 —— 命令执行(
  10. 关于前端学习路线的一些建议(含面试自测题