0

S3 でホストされ、CloudFront を使用してストリーミングされるビデオにアクセスするテスト ページをセットアップしようとしています。私が使用しているプレーヤーは、iOS デバイスでも動作するはずの JWPlayer です。

残念ながら、iPhone で開いても何も起こりません... 答えは明らかだと思いますが、この 1 時間はわからなかったのです。コードは次のとおりです (主にhttp://aws.amazon.com/articles/4101?_encoding=UTF8&jiveRedirect=1からのコピー/貼り付け):

<!--     THIS IS A BASIC HTML FILE TO PLAY MP4's USING JW PLAYER 
The following code is from longtailvideo.com's 'Setup Wizard', found at http://www.longtailvideo.com/support/jw-player-setup-wizard -->
<HTML>
<HEAD>
<TITLE>  
Streaming Video with JW Player
</TITLE>    
</HEAD>
<BODY>
<!-- Put a header above your video, if you like
-->
<H1>This is my header</H1>
<script type='text/javascript' src='http://s3.amazonaws.com/intrinseque-video/swfobject.js'></script>   
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('http://s3.amazonaws.com/intrinseque-video/player.swf','mpl','470','290','9');
     so.addParam('allowfullscreen','true');
     so.addParam('allowscriptaccess','always');
     so.addParam('wmode','opaque');
     so.addVariable('file','mp4:oceans-clip.ipad.mp4'); 
         so.addVariable('streamer','rtmp://s1m21pqfl8vlrl.cloudfront.net/cfx/st/'); 
     so.write('mediaspace');
</script>
</BODY>
</HTML>

<!--Common problems:
-   You cannot have any spaces in any of your URL's (including your 'rtmp://...'  URL)              (i.e.,  http:// thereisaspaceatthebeginninghere.xxx) 
-   Be sure you are calling the correctly numbered version of the flowplayer objects/players (i.e. flowplayer-3.2.2.swf
-   You cannot have duplicates of 's3.amazonaws.com' or 'cloudfront.net' in the same address (i.e. (http://s3.amazonaws.com/s3.amazonaws.com/YOUR_BUCKET/player.swf)
-   There is a different naming protocol for mp4 vs flv files. For .mp4 files, YOU MUST write it as 'mp4:YOUR_VIDEO_FILE_WITHOUT_THE _MP4_SUFFIX'. For .flv files, you simply write the name of the file, 'YOUR_VIDEO_FILE_WITHOUT_THE_FLV_SUFFIX'.
-->
4

2 に答える 2

1

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/49/using-cloudfrontをチェックしてください

次の行に沿って何かを追加する必要があります。

     modes: [{
        type: "flash",
        src: "/assets/player.swf"
    },{
        type: "html5"
        config: {
            file: "http://dXXXXXXXXXXXX.cloudfront.net/example.mp4"
            provider: "video"
        }
    }],

flashとhtml5の両方を正しく処理するためのコードに。

于 2011-09-07T06:46:32.203 に答える