Skip to content

Commit

Permalink
fix(native-audio): completeCallback is optional on play method
Browse files Browse the repository at this point in the history
closes #792
  • Loading branch information
ihadeed committed Nov 23, 2016
1 parent bdef1da commit b719a03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/native-audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { Plugin, Cordova } from './plugin';
* NativeAudio.preloadComplex('uniqueId2', 'path/to/file2.mp3', 1, 1, 0).then(onSuccess, onError);
*
* NativeAudio.play('uniqueId1').then(onSuccess, onError);
*
* // can optionally pass a callback to be called when the file is done playing
* NativeAudio.play('uniqueId1', () => console.log('uniqueId1 is done playing'));
*
* NativeAudio.loop('uniqueId2').then(onSuccess, onError);
*
* NativeAudio.setVolumeForComplexAsset('uniqueId2', 0.6).then(onSuccess,onError);
Expand Down Expand Up @@ -57,7 +61,7 @@ export class NativeAudio {
successIndex: 1,
errorIndex: 2
})
static play(id: string, completeCallback: Function): Promise<any> {return; }
static play(id: string, completeCallback?: Function): Promise<any> {return; }

/**
* Stops playing an audio
Expand Down

0 comments on commit b719a03

Please sign in to comment.