mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #7188 from pchab/pchab-patch-1
add ios optional parameters for cordova media.play
This commit is contained in:
Vendored
+13
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user