mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-23 11:50:15 +08:00
add ios optional parameters for cordova media.play
See https://github.com/apache/cordova-plugin-media#ios-quirks
This commit is contained in:
Vendored
+9
-1
@@ -38,7 +38,7 @@ interface Media {
|
||||
/** 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;
|
||||
play(iosPlayOptions?: IosPlayOptions): void;
|
||||
/** Pauses playing an audio file. */
|
||||
pause(): void;
|
||||
/**
|
||||
@@ -71,3 +71,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