Streaming video - jwplayer, amazon s3 and cloudfront

I have a streaming distribution on s6b99lczhnef6.cloudfront.net on Amazon. Origin is a bucket in S3. The bucket has video video.mp4. This is public. I am trying to test this video using jwplayer, here is the code:

<html>
<head>
    <script type="text/javascript" src="jwplayer/jwplayer.js"></script>
</head>
<body>
    <div id="container">Loading the player ...</div>
    <script type="text/javascript">
    jwplayer("container").setup({
        flashplayer: "jwplayer/player.swf",
        file: "video.mp4",
        height: 270,
        provider: "rtmp",
        streamer: "rtmp://s6b99lczhnef6.cloudfront.net/cfx/st",
        width: 480
    });
    </script>
</body> 
</html>

The video does not play. No JS Errors. What could be wrong?

+5
source share
5 answers

Loading an HTML page from a server other than "localhost" works.

-4
source

amazon JW Player 5.9, JW Player CloudFront. , JW Player 6. :

<div id='mediaplayer'>This text will be replaced</div>
<script type="text/javascript">
   jwplayer('mediaplayer').setup({
      'id': 'playerID',
      'width': '720',
      'height': '480',
      'file': 'rtmp://s1cxpk7od1m10r.cloudfront.net/cfx/st/your_streaming_file.mp4',
      'primary':'flash',
      'autostart' : 'true',
   });
</script>

, . , rtmp://s1cxpk7od1m10r.cloudfront.net/cfx/st/folder/your_streaming_file.mp4 ( , - URL), file , , :

rtmp://s1cxpk7od1m10r.cloudfront.net/cfx/st/mp4:folder/your_streaming_file.mp4

, .

.

+2

, bucketname/video.mp4, .

+1

, , CloudFront. . :

<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
    'flashplayer': 'jwplayer/player.swf',
    'file': 'video.mp4',
    'height': '270',
    'provider': 'rtmp',
    'streamer': 'rtmp://s6b99lczhnef6.cloudfront.net/cfx/st',
    'width': '480'
});
</script>

, . http://www.miracletutorials.com/embed-streaming-video-audio-with-html5-fallback/

, , . , : http://www.miracletutorials.com/how-to-encode-video-for-web-iphone-ipad-ipod/

, ?

0

No, you do not need to specify a file name. The cloud distribution already points to a bucket.

0
source

All Articles