如何使用jwplayer让亚马逊托管的rtmp流在iOS上工作

how to get an amazon hosted rtmp stream to work on iOS using jwplayer

本文关键字:流在 rtmp iOS 工作 jwplayer 何使用 亚马逊      更新时间:2023-09-26

我正在使用amazoncloudfront来托管mp4视频。我必须使用JWplayer(6.7)来流式传输内容。它在使用Flash的桌面浏览器上运行良好,但在iOS设备上不起作用(视频URL的有效期仅为2分钟,但运行良好)。

这是我的设置调用。我做错了什么?

jwplayer('video').setup({
    image: '/path/to/some/image.png',
    file: 'rtmp://s3e5mnr1tue3qm.cloudfront.net/cfx/st/2012_01_28_Hertha_HSV_Interview…e9roPYjl7bszSh~pGqvPAwPaZwJXZAizZVCwjCQ__&Key-Pair-Id=APKAIAS7DDQFOAHAHOTQ',
    primary: 'flash',
    flashplayer: '//d12q7hepqvd422.cloudfront.net/global/js/jwplayer6.7.4071/jwplayer.flash.swf?v=2',
    html5player: '//d12q7hepqvd422.cloudfront.net/global/js/jwplayer6.7.4071/jwplayer.html5.js?v=2',
    width: '940',
    height: '403'
});

这是基于以下jwplayer文档:http://www.longtailvideo.com/support/jw-player/28854/using-rtmp-streaming

您需要回到iOS可以播放的流。

例如:http://www.longtailvideo.com/support/jw-player/29394/hls-with-mp4-fallback

只需制作第一个源rtmp,第二个源http服务的mp4(rtmp在html5视频中不起作用)。