背景
我们为非营利组织提供了一个功能齐全的捐赠小部件。我们遇到一个警告:当使用 iPod 或 iPhone 时,视频不会在最后一部分加载。
问题
friend 们,我必须警告你们。这很难。
出于某种原因,当我在 iPhone 和 iPad 上嵌入 jwPlayer 视频时,我收到以下消息:
The video could not be loaded, either because the server or network failed or because the format is not supported: http://content.bitsontherun.com/jwp/2gQXJaVU.xml
以下是一些需要注意的关键事项:
- 观看演示:http://www.socialgoodnetwork.com/betterbutton/demo/?id=tvymca_3要转到最后一张幻灯片,请单击“立即提供”,然后单击“提交”以完成该过程。我将与最后一张幻灯片相同的视频放在第一张幻灯片中。
- 最后一张幻灯片(捐赠之后)不会显示视频。如果我在第一张幻灯片播放视频,效果很好。
- 仅发生在 iPhone 和 iPad 上
jwPlayer.js 播放器选项:
{
"plugins": {
"gapro": {
'accountid': "UA-XXXXXXXX-1"
,'trackstarts': true
,'trackpercentage': true
,'tracktime': true
}
},
"gapro.accountid": "UA-XXXXXXXX-1",
"logo.hide": "true",
"logo": {hide: true},
"file": params.url,
"repeat": "none",
"autostart": "true",
"playlist.size": "200",
"image": "http://content.bitsontherun.com/thumbs/aQ5bdlXV-640.jpg",
"stretching": "uniform",
"height": "375",
"playlist.position": "none",
"width": "560",
"controlbar.position": "bottom",
"skin": "http://d1rhaz9gq9lm5b.cloudfront.net/2Bbp4Z6O.zip",
"ping.pixel": "http://content.bitsontherun.com/ping.gif",
"playerready": "jwplayer.api.playerReady",
'autostart': true,
"flashplayer": "http://www.socialgoodnetwork.com/jwplayer.swf?logo.hide=true&plugins=gapro-1&gapro.accountid=UA-XXXXXXXX-1",
'modes': [
{type: 'html5'},
{type: 'flash', src: '/jwplayer.swf?logo.hide=true'}
]
}
我必须说,您可以提供任何帮助 - 提前致谢!
最佳答案
您只提供 Flash 视频。不支持 Flash 的 iDevices,这是 Apple 的决定。
您还需要提供 MP4 格式的视频源才能在 iDevices 上播放。
这几乎就是 Justin McCraw 在上面/下面所说的。
关于javascript - jwPlayer 视频无法在 iPad/iPhone 上加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13830582/