jPlayerのデフォルト動画プレーヤー。
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>設置サンプル</title> <link rel="stylesheet" type="text/css" href="/content/lib/global.css" /> <style type="text/css">li { margin:0; }</style> <!-- CSS --> <link rel="stylesheet" type="text/css" href="/content/lib/jquery/jplayer/skin/blue.monday/jplayer.blue.monday.css" /> <!-- JS --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" ></script> <script type="text/javascript" src="/content/lib/jquery/jplayer/jquery.jplayer.min.js" ></script> <script type="text/javascript"> $(function(){ $("#video_player").jPlayer({ /* イベントハンドラ */ ready: function(){ /* 再生するメディアの定義 */ $(this).jPlayer("setMedia", { m4v : "/content/media/video/chuta.m4v", webmv : "/content/media/video/chuta.webmv", ogv: "/content/media/video/chuta.ogv", poster: "/content/media/video/chuta.gif" }); }, /* プレロード(デフォルトは'metadata'、プレロードする場合は'auto') */ preload: "metadata", /* 音量(デフォルトは0.8、指定可能な値の範囲は0~1) */ volume: 0.5, /* ミュートの有無(デフォルトはfalse)*/ muted: false, /* 背景色(デフォルトは#000000) */ backgroundColor: "#000000", /* エラーアラート表示の有無(デフォルトはfalse) */ errorAlerts:false, /* 警告アラート表示の有無(デフォルトはfalse) */ warningAlerts:false, /* 最後まで再生された時 */ ended: function (event) { /* また再生する */ $(this).jPlayer("play"); }, error:function(event){ //console.log(event.jPlayer.error); //console.log(event.jPlayer.error.type); }, /* Jplayer.swfのパス */ swfPath: "/content/lib/jquery/jplayer/", /* ソリューションの優先度(デフォルトは\"html, flash\") */ solution: 'html, flash', /* フォーマット(デフォルトはmp3、カンマ区切りで複数指定可、優先度は左が高)*/ /* 指定可能なフォーマットは、mp3, m4a, m4v, oga, ogv, wav, webma, webmv */ /* 音声ならmp3 or m4a、動画ならm4v */ supplied: "webmv, ogv, m4v", size: { width: "640px", height: "360px", cssClass: "jp-video-360p" } }); }); </script> <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head> <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1> <h3 class='h'>実行結果</h3> <div id="wrap"> <h1>設置サンプル</h1> <p>参照:<a href='http://www.jplayer.org' target='_blank'>jPlayer 2.1.0</a></p> <p>jPlayerのデフォルト動画プレーヤー。</p> <!-- CODE --> <div id="jp_container_1" class="jp-video jp-video-360p"> <div class="jp-type-single"> <div id="video_player" class="jp-jplayer"></div> <div class="jp-gui"> <div class="jp-video-play"> <a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a> </div> <div class="jp-interface"> <div class="jp-progress"> <div class="jp-seek-bar"> <div class="jp-play-bar"></div> </div> </div> <div class="jp-current-time"></div> <div class="jp-duration"></div> <div class="jp-controls-holder"> <ul class="jp-controls"> <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li> <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li> <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li> <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li> <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li> <li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li> </ul> <div class="jp-volume-bar"> <div class="jp-volume-bar-value"></div> </div> <ul class="jp-toggles"> <li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li> <li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li> <li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li> <li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li> </ul> </div> <div class="jp-title"> <ul> <li>寝ているところ</li> </ul> </div> </div> </div> <div class="jp-no-solution"> <span>Update Required</span> To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>. </div> </div> </div> <!-- / CODE --> </div> </body> </html>