mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
update status method
This commit is contained in:
parent
5df447a02f
commit
6e42607423
@ -1,5 +1,5 @@
|
||||
import {CordovaInstance, Plugin} from './plugin';
|
||||
import {Observable} from 'rxjs/Rx';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
declare var Media: any;
|
||||
/**
|
||||
* @name MediaPlugin
|
||||
@ -71,7 +71,9 @@ export class MediaPlugin {
|
||||
constructor (src: string) {
|
||||
let res, rej, next;
|
||||
this.init = new Promise<any>((resolve, reject) => {res = resolve; rej = reject;});
|
||||
this.status = new Observable((observer) => {next = observer.next;});
|
||||
this.status = new Observable((observer) => {
|
||||
next = data => observer.next(data);
|
||||
});
|
||||
this._objectInstance = new Media(src, res, rej, next);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user