2008年03月23日

ABOUT JEROENWIJERING.COM 翻訳4

http://www.jeroenwijering.com/
の、特に FLV Playerに関するページを翻訳〜第4回目です。

設定の要であるFLASHVARSの説明ですが、長いので前半を第3回とし、今回はその後半です。

英文はサイト所有者Jeroen Wijering氏の著作であり、氏に著作権があります。
 

--------------(Contents of the 2nd Half of :http://www.jeroenwijering.com/?item=Supported_Flashvars)

SUPPORTED FLASHVARS
script | 16.02.2008 | print this page

(See http://qpbgm.sblo.jp/article/12896010.html

Playback behaviour

  • audio (undefined): Not for the wmvplayer. Assigns an additional, synchronized MP3. Use this for a closed audio description or director's comments with the mediaplayer or background music with the rotator. When using the mediaplayer and a playlist, you can assign audio to every entry.

  • autostart (false for players, true for rotator): Set this to true in the player to automatically start playing when the page loads, or set this to false with the rotator to prevent the automatic rotation.

  • bufferlength (3): Not for the rotator. Sets the number of seconds a video should be buffered before the players starts playback. Set this small for fast connections or short videos and big for slow connections.

  • captions (undefined): Only for the mediaplayer. Assigns closed captions. Captions should be in TimedText format (example). When using a playlist, you can assign captions for every entry.

  • fallback (undefined): Only for the mediaplayer. If you play an MP4 file, set here the location of an FLV fallback. It'll automatically be picked by older flash players (example).

  • repeat (false): Not for the wmvplayer. Set this to true to automatically repeat playback of all files. Set this to list to playback an entire playlist once.

  • rotatetime (5): Not for the wmvplayer. Sets the number of seconds an image is played back.

  • shuffle (true): Not for the wmvplayer. Set this to false to playback a playlist sequentially (first to last) instead of shuffled.

  • volume (80): sets the startup volume for playback of sounds, movies and audiotracks.
    Here's also a tutorial and example setup for accessible video playback.



External communication

  • callback (undefined): Only for the mediaplayer. Set this to a serverside script that can process statistics. The player will send it a POST every time an item starts/stops. To send callbacks automatically to Google Analytics, set this to urchin (if you use the old urchinTracker code) or analytics (if you use the new pageTracker code).

  • enablejs (false): Not for the wmvplayer (which is already entirely JS). Set this to true to enable javascript interaction. This'll only work online! Javascript interaction includes playback control, asynchroneous loading of media files and return of track information. More info at this demo page.

  • javascriptid (undefined): Not for the wmvplayer. If you interact with multiple mediaplayers/rotators in javascript, use this flashvar to give each of them a unique ID. More info at this demo page.

  • link (url): Set this to an external URL or downloadeable version of the file. This link is assigned to the display, logo and link button. With playlists, set links for every entry in the XML.

  • linkfromdisplay (false): Set this to true to make a click on the display result in a jump to the webpage assigned to the link flashvar.

  • linktarget (_self): Set this to the frame you want hyperlinks to open in. Set it to _blank to open links in a new window or _top to open in the top frame.

  • recommendations (undefined): Only for the mediaplayer. Set this to an XML with items you want to recommend. The thumbs will show up when the current movie stops playing, just like YouTube. Here's an example setup and example XML.

  • streamscript (undefined): Only for the mediaplayer. Set this to the URL of a script to use for http streaming movies. The parameters file and pos are sent to the script. Here's more info and an example script. If you use LigHTTPD streaming, set this to lighttpd.

  • type (mp3,flv,rtmp,jpg,png,gif,swf): Only for the mediaplayer, which determines the type of file to play based upon the last three characters of the file flashvar. This doesn't work with database id's or mod_rewrite, so you can set this flashvar to the correct filetype. If not sure, the player assumes a playlist is loaded.



Using the & = ? symbols
Note that you must urlencode the three glyphs ? = & inside flashvars, because of the way these flashvars are presented to the player. The urlencoded values for these symbols are listed here:

? → %3F
= → %3D
& → %26

So if your file to play is at the location getplaylist.php?id=123&type=flv, you must set the file flashvar to getplaylist.php%3Fid%3D123%26type%3Dflv.

Flashvars in external config.xml
If you have lots of flashvars and you don't want the list to mess up your HTML pages, you can also aggregate your flashvars in a single XML file like this one. Next, use the config flashvar to assign the XML to your mediaplayer or imagerotator. All vars inside the XML will then be parsed with one line of code. Any additional flashvars you do set in your HTML will override the ones that are in the config XML.

--------------(Contents of the 2nd Half of :http://www.jeroenwijering.com/?item=Supported_Flashvars)

<前半は、第3回へ>

以下、翻訳。--------------

再生時の動作

  • audio (undefined)/音声(規定値なし):

  • autostart (false for players, true for rotator)/自動再生 (playerでは偽、rotatorでは真): ページがロードされたとき、プレーヤで自動的に再生されるようにするにはtrue(真)に、ローテータで自動回転を避けるにはfalse(偽)に設定します。

  • bufferlength (3)/バッファ長(3): ローテータには使いません。プレーヤが再生をスタートする前にビデオをバッファさせる秒数を、数字で指定します。接続の速い場合や短いビデオの場合には、これを小さく設定し、接続の遅い場合は大きく設定をします。

  • captions (undefined)/キャプション(規定値なし):メディア・プレーヤ専用です。クローズド・キャプションの指定です。キャプションはTimedText形式で書かれている必要があります。() プレー・リストを使う際には、全てのエントリーにキャプションを指定しなければなりません。

  • fallback (undefined)/フォールバック(規定値なし): メディア・プレーヤ専用です。MP4ファイルを再生する際には、FLV フォールバックの位置をここで指定します。自動的に古いフラッシュ・プレーヤが拾い上げてくれます。(例)

  • repeat (false)/繰り返し(偽): WindowsMediaPlayerには使えません。

  • rotatetime(5)/回転時間(5):WindowsMediaPlayerには使えません。画像が再生される時間を秒で指定します。

  • shuffle (true)/シャッフル(真): WindowsMediaPlayerには使えません。シャッフルさせず、プレー・リストを順に(最初から最後へと)再生するにはfalse(偽)と設定します。

  • volume (80)/音量 (80): 音声・動画・オーディオトラックの再生時最初の音量を指定します。こちらに利用可能なビデオの再生の例と設定とがあります。



外部通信

  • callback (undefined)/コール・バック(規定値なし): メディア・プレーヤ専用です。statisticsを処理できるサーバーサイド・スクリプトに対して設定をします。プレーヤはそれに対してアイテムが開始したり停止したりするたびにPOSTを送ります。Google Analyticsに自動的にコール・バックを送るためには、これをurchin(古いurchinトラッカー・コードを使っている場合 )またはanalytics(新しいページ・トラッカー・コードを使っている場合)と設定します。

  • enablejs (false)/JS有効(偽): WindowsMediaPlayerには使えません。(それ自体が完全なJSですから。)javascript相互作用を有効にする場合には、これをtrue(真)にします。オンラインでのみ有効です! javascript相互作用には、再生コントロール、メディアファイルのasynchroneous loading、トラック・インフォメーションの返答が含まれます。さらに詳しい情報はこちらのデモ・ページへ。

  • javascriptid (undefined)/javascriptのID(規定値なし): WindowsMediaPlayerには使えません。複数のメディアプレーヤ/ローテータとjavascriptで相互作用を行う場合には、このflashvarをそれぞれに一意のIDを与えさせます。さらに詳しい情報はこちらのデモ・ページへ。

  • link (url)/リンク(URL): これは外部URLまたはダウンロード可能なバージョンのファイルを指定します。このリンクはディスプレー・ロゴ・リンクボタンに割り当てられます。プレー・リストではXML.の全てのエントリーにリンクを設定します。

  • linkfromdisplay (false)/ディスプレー・リンク(偽): ディスプレー上でクリックした際にリンクflashvarに割り振られたウェブ・ページにジャンプするようにしたいときには、これをtrue(真)と指定します。< /li>
  • linktarget (_self)/リンク・ターゲット(_self): ハイパー・リンクによって開かせたいフレームをここで指定します。新しいウインドウでリンク先を平鍛えkれば、_blankを、トップ・フレームで開かせたければ_topを指定します。

  • recommendations (undefined)/推薦(規定値なし): メディア・プレーヤ専用です。推薦したいアイテムを含むXMLをここで指定します。現在の動画が再生を終えるとちょうどYouTubeのように縮小表示が表れます。こちらに設定例と、XML.の例があります。

  • streamscript (undefined)/ストリーム・スクリプト(規定値なし): メディア・プレーヤ専用です。httpストリーミング・ムービーを使うためのスクリプトのURLを指定します。パラメータ・ファイルとposはスクリプトに送られます。さらに詳しい情報とスクリプトの例はこちらにあります。LigHTTPDストリーミングを使っているならば、lighttpdと指定します。

  • type (mp3,flv,rtmp,jpg,png,gif,swf)/型 (mp3,flv,rtmp,jpg,png,gif,swf): メディア・プレーヤのみの設定です。メディア・プレーヤはファイルの型をファイルflashvarの最後の3文字に基づいて再生をするからです。これはデータベースIDやmod_rewrite、では機能しません。したがって、このflashvarを正しいファイル型に設定できます。はっきりとしないときには、プレーヤーはプレーリストがロードされていることを確かめます。


  • 記号 & = ? を使う
    flashvarの中では3つのグリフ「?」「=」「&」を使ってurlエンコードしなくてはならないことを覚えておいてください。これらのflashvarがプレーヤに示されるやり方のためなのです。urlエンコード化されたこれら3つの記号は次の通りになります:

    ? → %3F
    = → %3D
    & → %26

    従って、再生しようとするファイルが「getplaylist.php?id=123&type=flv」にあるとすれば、ファイルflashvar
    は「getplaylist.php%3Fid%3D123%26type%3Dflv」と設定しなければなりません。

    外部のconfig.xmlでのflashvars
    もしたくさんのflashvarがあって、HTMLページの中にそれを並べ立てるのが嫌だという場合には、このように単一のXMLファイルにそれらを集約することができます。次に、config flashvarを使ってメディア・プレーヤやimagerotatorにそのXMLを割り当てるのです。そうするとXML中の全てのvarは1行のコードの中で構文解析されるのです。HTMLファイルの中にflashvarを追加した場合は、必ずconfig XML.にあるflashvarよりも優先されます。

    --------------以上、翻訳。
    (翻訳者:kewpie, owner of http://qp.jpn.org
posted by kewpie at 20:05| Comment(0) | TrackBack(0) | 日記
この記事へのコメント
コメントを書く
お名前: [必須入力]

メールアドレス:

ホームページアドレス:

コメント: [必須入力]

認証コード: [必須入力]


※画像の中の文字を半角で入力してください。
この記事へのトラックバックURL
http://blog.sakura.ne.jp/tb/13027697
※ブログオーナーが承認したトラックバックのみ表示されます。
※言及リンクのないトラックバックは受信されません。

この記事へのトラックバック
コメントの投稿について
○お名前とコメント欄の記入は必須です。
○メールアドレスは任意です。記入されても公開はされません。管理人のみに知らされます。
○スパム防止のため、
・ホームページアドレス欄への記入はできません。
・コメント欄にURLは記入できません。
・スパムと思われる語を記入できません。
 これらをしようとすると、最終的に投稿完了できません。
○投稿完了後に、管理人の判断でスパムと判断した投稿は削除させていただきます。