Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio.js + Angular2 + Firefox 50.1.0 shows error message #229

Open
masiref opened this issue Dec 30, 2016 · 1 comment
Open

Audio.js + Angular2 + Firefox 50.1.0 shows error message #229

masiref opened this issue Dec 30, 2016 · 1 comment

Comments

@masiref
Copy link

masiref commented Dec 30, 2016

I'm using audio.js in an Angular 2 web application. I included the dependencies in my index.html file like this :
<script type="text/javascript" src="assets/lib/audiojs/audio.js"></script>

and using it in my code (TypeScript) like this :

declare var audiojs: any;
...
export class AudioPlayerComponent implements AfterViewInit {
  
  ngAfterViewInit() {
    audiojs.events.ready(function () {
      var as = audiojs.createAll();
    });
  }
}

It works well with Chrome 55.0.2883.87 but with Firefox 50.1.0 it shows this error message :

"EXCEPTION: Error in http://localhost:3001/app/app.component.html:14:4 caused by: Illegal constructor."  core.umd.js:2838:13
ORIGINAL EXCEPTION: Illegal constructor.  core.umd.js:2840:17
ORIGINAL STACKTRACE:  core.umd.js:2843:17
container[audiojs].helpers.clone@http://localhost:3001/assets/lib/audiojs/audio.js:434:20
container[audiojs].helpers.clone@http://localhost:3001/assets/lib/audiojs/audio.js:435:42
container[audiojs].newInstance@http://localhost:3001/assets/lib/audiojs/audio.js:245:15
container[audiojs].createAll@http://localhost:3001/assets/lib/audiojs/audio.js:236:24
AudioPlayerComponent.prototype.ngAfterViewInit/<@http://localhost:3001/app/components/shared/audio-player/audio-player.component.js:17:22
container[audiojs].events.ready@http://localhost:3001/assets/lib/audiojs/audio.js:591:43
AudioPlayerComponent.prototype.ngAfterViewInit@http://localhost:3001/app/components/shared/audio-player/audio-player.component.js:16:9
anonymous/View_AppComponent0.prototype.detectChangesInternal@/AppModule/AppComponent/component.ngfactory.js:182:40
AppView</AppView.prototype.detectChanges@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:9355:13
DebugAppView</DebugAppView.prototype.detectChanges@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:9448:17
anonymous/View_AppComponent_Host0.prototype.detectChangesInternal@/AppModule/AppComponent/host.ngfactory.js:27:3
AppView</AppView.prototype.detectChanges@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:9355:13
DebugAppView</DebugAppView.prototype.detectChanges@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:9448:17
ViewRef_</ViewRef_.prototype.detectChanges@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:7338:13
ApplicationRef_</ApplicationRef_.prototype.tick/<@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6589:79
ApplicationRef_</ApplicationRef_.prototype.tick@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6589:17
ApplicationRef_</ApplicationRef_.prototype._loadComponent@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6567:13
ApplicationRef_</ApplicationRef_.prototype.bootstrap@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6558:13
PlatformRef_</PlatformRef_.prototype._moduleDoBootstrap/<@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6460:86
PlatformRef_</PlatformRef_.prototype._moduleDoBootstrap@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6460:17
PlatformRef_</PlatformRef_.prototype._bootstrapModuleFactoryWithZone/</</<@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:6428:25
ZoneDelegate.prototype.invoke@http://localhost:3001/node_modules/zone.js/dist/zone.js:232:17
NgZone</NgZone.prototype.forkInnerZoneWithAngularBehavior/this.inner<.onInvoke@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:5976:32
ZoneDelegate.prototype.invoke@http://localhost:3001/node_modules/zone.js/dist/zone.js:231:17
Zone.prototype.run@http://localhost:3001/node_modules/zone.js/dist/zone.js:114:24
scheduleResolveOrReject/<@http://localhost:3001/node_modules/zone.js/dist/zone.js:502:52
ZoneDelegate.prototype.invokeTask@http://localhost:3001/node_modules/zone.js/dist/zone.js:265:21
NgZone</NgZone.prototype.forkInnerZoneWithAngularBehavior/this.inner<.onInvokeTask@http://localhost:3001/node_modules/@angular/core/bundles/core.umd.js:5967:32
ZoneDelegate.prototype.invokeTask@http://localhost:3001/node_modules/zone.js/dist/zone.js:264:21
Zone.prototype.runTask@http://localhost:3001/node_modules/zone.js/dist/zone.js:154:28
drainMicroTaskQueue@http://localhost:3001/node_modules/zone.js/dist/zone.js:401:25
ZoneTask/this.invoke@http://localhost:3001/node_modules/zone.js/dist/zone.js:339:25

Is it a bug or am I doing something wrong ? Please help me! Thanks!

@abulaian
Copy link

try this one:
npm install --save [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants