【发布时间】:2014-02-20 05:55:14
【问题描述】:
我想将 jwplayer 集成到我的 web 应用程序中,以便在 iPhone、iPad 上播放 .mov 视频。
集成 jwplayer 后,jwplayer 不会播放视频文件夹中的视频,该文件夹包含所有培训视频 [e:\video – 在我的本地机器中]。
但是如果我将 .mov 文件放入我的项目资源文件夹中,jwplayer 可以播放视频。它还可以从 url 播放视频。
以下 jwplayer 示例不工作
var selectedTrainingPlayer = jwplayer("videoContainerDiv").setup({
'flashplayer': '<%=request.getContextPath()%>/resources/js/mediaplayer-5.10/player.swf',
'id': 'playerId',
'width': '642',
'height': '412',
'mute': false,
'volume' : '100',
'controlbar' : 'bottom',
'repeat': 'list',
'volume': 100,
'stretching' : 'exactfit',
'image': '<%=request.getContextPath()%>/spring/getVideoThumbnail?videoId='+trainingVideoId,
'file': '<%=request.getContextPath() %>/spring/video/1.mov'
});
但是 jwplayer 可以播放 URL 或 golflessons 资源文件夹中的视频,请参考以下代码
var selectedTrainingPlayer = jwplayer("videoContainerDiv").setup({
'flashplayer': '<%=request.getContextPath()%>/resources/js/mediaplayer-5.10/player.swf',
'id': 'playerId',
'width': '642',
'height': '412',
'mute': false,
'volume' : '100',
'controlbar' : 'bottom',
'repeat': 'list',
'volume': 100,
'stretching' : 'exactfit',
'image': '<%=request.getContextPath()%>/spring/getVideoThumbnail?videoId='+trainingVideoId,
'file': '<%=request.getContextPath() %> /resources/images/golflessons/Pro_Book myself_Single_Lesson.mov',
});
当 jwplayer 没有播放视频时,eclipse 显示如下错误
原因:java.io.IOException:已建立的连接被主机中的软件中止在 sun.nio.ch.SocketDispatcher.write0(Native Method) 在 sun.nio。 ch.SocketDispatcher.write(Unknown Source) at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.write(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source ) 在 org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:170) 在 org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:221) 在 org.mortbay.jetty.HttpGenerator.flush( HttpGenerator.java:725)。
我的理解:
jwplayer 可以从 url 和 golflessons 资源文件夹访问视频。但它无法从项目文件夹之外访问视频。
我已尝试禁用防火墙和防病毒软件,但没有任何解决方案适合我。
但同样的工作流程在我的 windows 桌面上也能正常工作,问题只在 iPhone 和 iPad 上
请任何人指导我解决这个问题
【问题讨论】:
标签: iphone ipad video jwplayer