jquery - Getting Error #2060 on localhost (jPlayer.swf) -


my problem is:

  • this fiddle working me.
  • but when copy-paste same code (includeing correct paths jquery, jplayer , jplayer.swf) getting error:

actionscript error #2060

securityerror: error #2060: naruszenie obszaru izolowanego: element wywołujący externalinterface http://www.jplayer.org/latest/js/jplayer.swf nie może uzyskać dostępu null.     @ flash.external::externalinterface$/_evaljs()     @ flash.external::externalinterface$/call()     @ jplayer/init()     @ flash.utils::timer/_timerdispatch()     @ flash.utils::timer/tick() 

why same code work on remote server (like jsfiddle) local file throws error?

how can run code on local machine?

this how test.html looks like:

<!doctype html> <html> <head>   <meta http-equiv="content-type" content="text/html; charset=utf-8">   <title>play shoutcast stream - jsfiddle demo</title>    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>   <script type='text/javascript' src="http://www.jplayer.org/latest/js/jquery.jplayer.min.js"></script>    <script type='text/javascript'>//<![cdata[    $(function(){     $("#jquery_jplayer_1").jplayer({         swfpath: "jplayer.swf",         ready: function () {             $(this).jplayer("setmedia", { mp3: "http://94.23.108.1:8018/;stream/1" });         },         supplied: "mp3"     });   });//]]>      </script> </head> <body>   <div id="jquery_jplayer_1" class="jp-jplayer"></div>   <div id="jp_container_1" class="jp-audio">     <div class="jp-type-single">       <div class="jp-gui jp-interface">         <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-progress">           <div class="jp-seek-bar">             <div class="jp-play-bar">             </div>           </div>         </div>         <div class="jp-volume-bar">           <div class="jp-volume-bar-value">           </div>         </div>         <div class="jp-current-time">         </div>         <div class="jp-duration">         </div>         <ul class="jp-toggles">           <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>testing</li>         </ul>       </div>       <div class="jp-no-solution">         <span>update required</span> play media need either update browser recent version or update <a href="http://get.adobe.com/flashplayer/" target="_blank">flash plugin</a>.       </div>     </div>   </div> </body> </html> 

after reading this post found solution was:

previewing in

http://localhost
instead of
file://
can view these files on localhost instead of file system changing following,


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -