diff --git a/dist/ionic-audio-track-component.ts b/dist/ionic-audio-track-component.ts index cb51e72..aa8ff07 100644 --- a/dist/ionic-audio-track-component.ts +++ b/dist/ionic-audio-track-component.ts @@ -58,6 +58,9 @@ export class AudioTrackComponent { constructor(private _audioProvider: AudioProvider) {} ngOnInit() { + this.render(); + } + render() { if (!(this.track instanceof WebAudioTrack) && !(this.track instanceof CordovaAudioTrack)) { this._audioTrack = this._audioProvider.create(this.track); } else { @@ -66,7 +69,7 @@ export class AudioTrackComponent { } // update input track parameter with track is so we pass it to WebAudioProvider if needed - this.track.id = this._audioTrack.id; + this.track.id = this._audioTrack.id; } play() { @@ -153,4 +156,10 @@ export class AudioTrackComponent { } } } + //two way biding enable with ioic-audio + ngOnChanges(change) { + if(change.track) { + this.render(); + } + } } \ No newline at end of file