soundmanager2 not streaming audio inline in Firefox 9 - soundmanager2

This is so bizarre. I basically copied the source from this demo.
But for some reason, the audio is not playing inline, and is just getting loaded in the browser (Firefox 9). I really don't get why the demo works, but my code doesn't :(
This is what's in my <head>
<script type="text/javascript" src="static/javascript/soundmanager2.js"></script>
<script type="text/javascript" src="static/javascript/mp3-player-button.js"></script>
<script>
soundManager.url = 'static/swf/'; // required: path to directory containing SM2 SWF
files
</script>
and heres how i'm calling it-
<a href="media/English_Commercial Demo.mp3" title="Play" class="sm2_button">English
Commercial Demo</a>

Related

How to add plugin to Ionic 2 Plunker

Hi I have the following Plunker for Ionic 2.
Ionic 2 Environment
I would like to add the Angular 2 Flex Layout(link below) to this plunker so that I have access to it on the home.html. How would I go about this?
Angular Flex Layout
Many thanks in advance.
My index looks like:
<head>
<script src="https://code.angularjs.org/tools/system.js"></script>
<script src="https://code.angularjs.org/tools/typescript.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.15/angular2-polyfills.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.15/angular2.dev.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.15/router.dev.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.15/http.dev.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.15/Rx.js"></script>
<script src="config.js"></script>
<script src="https://npmcdn.com/ionic-angular#2.0.0-beta.6/bundles/ionic.system.js"></script>
<link href="https://npmcdn.com/ionic-angular#2.0.0-beta.6/bundles/ionic.ios.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
<!-- this Ionic's root component and where the app will load -->
<ion-app></ion-app>
<script>
System.import('app.ts')
</script>
</body>
</html>
This specific plunker is actually pretty out of date for both angular and ionic. Unfortunately there doesn't seem to be one since 2.0 went stable let alone the 4.0 current branch.
You may get it to work with that somehow but I don't think it would be a good testing/example tool.
Update: I went ahead and got one working with blank settings. You can see it here: http://plnkr.co/edit/y8R0MF?p=info
And Here it is with Flex-Layout running
To add plugins you have to add them to the systemJs config with the path to the umd like:
'#angular/compiler': 'npm:#angular/compiler#4.1.2/bundles/compiler.umd.js',
which is a path to the unpacked version
Hope that helps!

system.js fail to properly display error messages from babel

When I setup a very simple project with jspm using system.js and babel, it seems that the error messages are not correctly displayed.
I did the following :
npm init; press enter a bunch of times
jspm init; press enter a bunch of times
And added two files :
index.html
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="jspm_packages/system.js" type="text/javascript"></script>
<script src="config.js" type="text/javascript"></script>
<script type="text/javascript">
console.log('test 1');
System.import('main');
</script>
</head>
<body>
</body>
</html>
main.js
console.log('test2);
// ^ I voluntarily forgot the ' to show the error;
According to this talk, and previous experiences with babel, I should see some very nice syntax error messages, like this one :
But instead, I got this, which is completely cryptic, and doesn't help me a bit :
Because of the error line saying system.js:1:0, I believe the error happens in system.js, and it fails before calling babel.
Moreover, I noticed es6-module-loader isn't loaded. I thought it was used in system.js.
I don't see what I am missing here.

Wicket with Javascript application(GWT made by LibGDX)

I can read english to some degree but I'm not good at writing.
Then I appologize for any rudeness.
I don't know well about wicket but I think it very good.
I want to deploy on wicket Javascript application made by LibGDX ,but on wicket's HTML file it does not work.
LibGDX logo was shown but next is not.(Maybe it seems to be not found next file (xxxx.cache.html) ??)
Please Tell me how to work Javascript(GWT) application on wicket.
Chrome shows this error.
Uncaught ED5709743BB488EF40123B0ADA51D171.cache.html:84393
com.badlogic.gdx.utils.GdxRuntimeException: Invalid assets description file.
My Javascript application is made by GWT which is client only created by LibGDX.
(LibGDX is multi platform game framework.
It can create WebGL application from java by GWT compiled.)
I think it can work in wicket because this GWT application is client only.
Javascript application is
assets
|...(many files used in game)
|-com
|-badlogic
|-gdx
|-...(some directory)
html
|html.nocache.js
|A0B51A68A37B38F9FF8A8855EDF848C7.cache.html
|Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.cache.html
|Cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.cache.html
|ED5709743BB488EF40123B0ADA51D171.cache.html
|Exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.cache.html
|hosted.html
|soundmanager2.swf
|logo.png
|....(many files)
|-gwt
|-chrome
|chrome_rtl.css
|chrome.css
|-images
|-...(some directory)
|...(some files)
soundmanager2-jsmin.js
soundmanager2-setup.js
styles.css
My Javascript application can work in Struts JSP(deployment under webapp).
I wrote at wicket in this way :
src/main/java/.../testwicket/page/xxx.html
<!doctype html>
<html xmlns:wicket="http://wicket.apache.org">
<head>
<title>wicket + gwt(client only) test</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="styles.css" rel="stylesheet" type="text/css">
<script src="soundmanager2-setup.js"></script>
<script src="soundmanager2-jsmin.js"></script>
</head>
<body>
<a class="superdev" href="javascript:%7B%20window.__gwt_bookmarklet_params%20%3D%20%7B'server_url'%3A'http%3A%2F%2Flocalhost%3A9876%2F'%7D%3B%20var%20s%20%3D%20document.createElement('script')%3B%20s.src%20%3D%20'http%3A%2F%2Flocalhost%3A9876%2Fdev_mode_on.js'%3B%20void(document.getElementsByTagName('head')%5B0%5D.appendChild(s))%3B%7D">SuperDev Refresh</a>
<div align="center" id="embed-html"></div>
<script type="text/javascript" src="html/html.nocache.js"></script>
</body>
<script>
function handleMouseDown(evt) {
evt.preventDefault();
evt.stopPropagation();
evt.target.style.cursor = 'default';
}
function handleMouseUp(evt) {
evt.preventDefault();
evt.stopPropagation();
evt.target.style.cursor = '';
}
document.getElementById('embed-html').addEventListener('mousedown', handleMouseDown, false);
document.getElementById('embed-html').addEventListener('mouseup', handleMouseUp, false);
</script>
</html>
Javascript application is in
src/main/webapp/
|-assets
|-html
soundmanager2-jsmin.js
soundmanager2-setup.js
style.css
Even if this code is added in GWT, it do not work(I don't call this code from java...Should I call it?).
public static native void setWindowHref(String url)/*-{
$wnd.location.href = url;
}-*/;

Tinymce is not Displaying at at all

Hy There...!
I have some problems when its come to Jquery ..............
Here i am trying to use TinyMCE Text Editor... I had download its Js File and some code with it mention it in there site...
But When i see my index.HTML it is all Blank.....
Which i don't understand Please Any Help or hint will be appreciated........
Thanks in Advance ... Here Is The Code
<html>
<head>
<script type="text/javascript" src="tinymce.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea"
});
</script>
</head>
<body>
<form method="post" action="index.html">
<textarea name="content" style="width:100%" class="mceEditor"></textarea>
</form>
</body>
</html>
I believe you are not linking the tinymce.js file correctly. Make sure it's linked correctly relative to the directory of index.html file.
I used the same markup you provided and made it work in jsFiddle using the script from TinyMCE CDN.
http://jsfiddle.net/AHXXT/

Uploadify in Zend Framework

I use uplodify to upload files in zend.
<link href="/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/uploadify/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="/uploadify/swfobject.js"></script>
<script type="text/javascript" src="/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#file_upload').uploadify({
'uploader': '/uploadify/uploadify.swf',
'script': '/upload/upload',
'cancelImg': '/uploadify/cancel.png',
'folder': '/uploadify/uploads',
'auto': true
});
});
</script>
<input id="file_upload" name="file_upload" type="file" />
This code is in view part index.phtml.
But when i run my web application i see in my web devloper tool it shows in console
NetworkError: 404 Not Found - http://localhost/upload/uploadify.swf?preventswfcaching=1317192234400
Help me to solv this problem....
"Some of the option names have changed in v3 to be more intuitive. The 'uploader' option should now point to the php script. The 'swf' option will point to the flash file. "
http://www.uploadify.com/forums/discussion/7296/uploader-being-rewritten-in-v3.0.0/p1
part of code:
$("#gallery").uploadify({
id : jQuery(this).attr('id'),
langFile : 'http://www.static-xxx.nu/uploader/uploadifyLang_en.js',
swf : 'http://www.static-xxx.nu/uploader/uploadify.swf',
uploader : '/uploadify/galleri.php',
The path specified is wrong somewhere.
In jquery function, it is given as;
'uploader': '/uploadify/uploadify.swf',
Check from where request is going for "upload/uploadify.swf" to get a 404 error.
also, if you are using a .htaccess file, make sure the request for these files are not denied.