mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Set type of rate and volume to number
This commit is contained in:
@@ -223,8 +223,8 @@ Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY;
|
||||
Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY;
|
||||
async () => {
|
||||
const result = await Audio.Sound.create({uri: 'uri'}, {
|
||||
volume: 0.5,
|
||||
rate: 0.6
|
||||
volume: 0.55,
|
||||
rate: 16.5
|
||||
}, null, true);
|
||||
|
||||
const sound = result.sound;
|
||||
|
||||
Vendored
+4
-3
@@ -554,10 +554,12 @@ export interface PlaybackStatusToSet {
|
||||
isMuted?: boolean;
|
||||
positionMillis?: number;
|
||||
progressUpdateIntervalMillis?: number;
|
||||
rate?: FloatFromZeroToOne;
|
||||
/** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */
|
||||
rate?: number;
|
||||
shouldCorrectPitch?: boolean;
|
||||
shouldPlay?: boolean;
|
||||
volume?: FloatFromZeroToOne;
|
||||
/** A number between `0.0` (silence) and `1.0` (maximum volume). */
|
||||
volume?: number;
|
||||
}
|
||||
|
||||
export type PlaybackSource = RequireSource | { uri: string } | Asset;
|
||||
@@ -670,7 +672,6 @@ export class PlaybackObject {
|
||||
setRateAsync(
|
||||
/** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */
|
||||
rate: number,
|
||||
|
||||
/** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */
|
||||
shouldCorrectPitch: boolean
|
||||
): Promise<PlaybackStatus>;
|
||||
|
||||
Reference in New Issue
Block a user