Merge pull request #7188 from pchab/pchab-patch-1

add ios optional parameters for cordova media.play
This commit is contained in:
Masahiro Wakame
2016-01-09 22:52:47 +09:00
+13 -2
View File
@@ -37,8 +37,11 @@ interface Media {
mediaError?: (error: MediaError) => void): void;
/** Returns the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1. */
getDuration(): number;
/** Starts or resumes playing an audio file. */
play(): void;
/**
* Starts or resumes playing an audio file.
* @param iosPlayOptions: iOS options quirks
*/
play(iosPlayOptions?: IosPlayOptions): void;
/** Pauses playing an audio file. */
pause(): void;
/**
@@ -71,3 +74,11 @@ interface Media {
/** The duration of the media, in seconds. */
duration: number;
}
/**
* iOS optional parameters for media.play
* See https://github.com/apache/cordova-plugin-media#ios-quirks
*/
interface IosPlayOptions {
numberOfLoops?: number;
playAudioWhenScreenIsLocked?: boolean;
}