Site give different response when request sent by jQuery jPlayer -
i trying use jquery jplayer (downloaded 2.5.0 demo, using circle player) play remote link http://data10.5sing.com/t1t5vtb4et1r47ivrk.mp3
, link can played in browser, or using wget
download, in these cases server responded 200 ok. if play using following code, server responded 403 forbidden, why that?
<!doctype html> <html> <head> <meta charset=utf-8 /> <!-- website design by: www.happyworm.com --> <title>demo : jplayer circle player</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="/static/skin/circle.skin/circle.player.css"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="/static/js/jquery.jplayer.min.js"></script> <script type="text/javascript" src="/static/js/jquery.transform2d.js"></script> <script type="text/javascript" src="/static/js/jquery.grab.js"></script> <script type="text/javascript" src="/static/js/mod.csstransforms.min.js"></script> <script type="text/javascript" src="/static/js/circle.player.js"></script> <script type="text/javascript"> //<![cdata[ $(document).ready(function(){ /* * instance circleplayer inside jquery doc ready * * circleplayer(jplayerselector, media, options) * jplayerselector: string - css selector of jplayer div. * media: object - media object used in jplayer("setmedia",media). * options: object - jplayer options. * * multiple instances must set cssselectorancestor in jplayer options. defaults "#cp_container_1" in circleplayer. * * circleplayer uses default supplied:"m4a, oga" if not given, different jplayer default of supplied:"mp3" * note {wmode:"window"} option set ensure playback in firefox 3.6 flash solution. * however, oga format used in case html solution. */ var mycircleplayer = new circleplayer("#jquery_jplayer_1", { mp3: "http://data10.5sing.com/t1t5vtb4et1r47ivrk.mp3" }, { cssselectorancestor: "#cp_container_1", swfpath: "js", supplied: "mp3", wmode: "window", keyenabled: true }); }); //]]> </script> </head> <body> <!-- jplayer div must not hidden. keep @ root of body element avoid such problems. --> <div id="jquery_jplayer_1" class="cp-jplayer"></div> <!-- container interface can go want display it. show , hide need. --> <div id="cp_container_1" class="cp-container"> <div class="cp-buffer-holder"> <!-- .cp-gt50 needed when buffer > 50% --> <div class="cp-buffer-1"></div> <div class="cp-buffer-2"></div> </div> <div class="cp-progress-holder"> <!-- .cp-gt50 needed when progress > 50% --> <div class="cp-progress-1"></div> <div class="cp-progress-2"></div> </div> <div class="cp-circle-control"></div> <ul class="cp-controls"> <li><a class="cp-play" tabindex="1">play</a></li> <li><a class="cp-pause" style="display:none;" tabindex="1">pause</a></li> <!-- needs inline style here, or jquery.show() uses display:inline instead of display:block --> </ul> </div> </body> </html>
Comments
Post a Comment