Module Media

Index

Variables

Interfaces

Functions

Variables

AUDIO_FILEFORMAT_3GP2: number

AUDIO_FILEFORMAT_3GPP: number

AUDIO_FILEFORMAT_AIFF: number

AUDIO_FILEFORMAT_AMR: number

AUDIO_FILEFORMAT_CAF: number

AUDIO_FILEFORMAT_MP3: number

AUDIO_FILEFORMAT_MP4: number

AUDIO_FILEFORMAT_MP4A: number

AUDIO_FILEFORMAT_WAVE: number

AUDIO_FORMAT_AAC: number

AUDIO_FORMAT_ALAW: number

AUDIO_FORMAT_APPLE_LOSSLESS: number

AUDIO_FORMAT_ILBC: number

AUDIO_FORMAT_IMA4: number

AUDIO_FORMAT_LINEAR_PCM: number

AUDIO_FORMAT_ULAW: number

AUDIO_HEADPHONES: number

AUDIO_HEADPHONES_AND_MIC: number

AUDIO_HEADSET_INOUT: number

AUDIO_LINEOUT: number

AUDIO_MICROPHONE: number

AUDIO_MUTED: number

AUDIO_RECEIVER_AND_MIC: number

AUDIO_SESSION_MODE_AMBIENT: number

AUDIO_SESSION_MODE_PLAYBACK: number

AUDIO_SESSION_MODE_PLAY_AND_RECORD: number

AUDIO_SESSION_MODE_RECORD: number

AUDIO_SESSION_MODE_SOLO_AMBIENT: number

AUDIO_SPEAKER: number

AUDIO_UNAVAILABLE: number

AUDIO_UNKNOWN: number

CAMERA_FRONT: number

CAMERA_REAR: number

DEVICE_BUSY: number

MEDIA_TYPE_PHOTO: string

MEDIA_TYPE_VIDEO: string

MUSIC_MEDIA_GROUP_ALBUM: number

MUSIC_MEDIA_GROUP_ALBUM_ARTIST: number

MUSIC_MEDIA_GROUP_ARTIST: number

MUSIC_MEDIA_GROUP_COMPOSER: number

MUSIC_MEDIA_GROUP_GENRE: number

MUSIC_MEDIA_GROUP_PLAYLIST: number

MUSIC_MEDIA_GROUP_PODCAST_TITLE: number

MUSIC_MEDIA_GROUP_TITLE: number

MUSIC_MEDIA_TYPE_ALL: number

MUSIC_MEDIA_TYPE_ANY_AUDIO: number

MUSIC_MEDIA_TYPE_AUDIOBOOK: number

MUSIC_MEDIA_TYPE_MUSIC: number

MUSIC_MEDIA_TYPE_PODCAST: number

MUSIC_PLAYER_REPEAT_ALL: number

MUSIC_PLAYER_REPEAT_DEFAULT: number

MUSIC_PLAYER_REPEAT_NONE: number

MUSIC_PLAYER_REPEAT_ONE: number

MUSIC_PLAYER_SHUFFLE_ALBUMS: number

MUSIC_PLAYER_SHUFFLE_DEFAULT: number

MUSIC_PLAYER_SHUFFLE_NONE: number

MUSIC_PLAYER_SHUFFLE_SONGS: number

MUSIC_PLAYER_STATE_INTERRUPTED: number

MUSIC_PLAYER_STATE_PAUSED: number

MUSIC_PLAYER_STATE_PLAYING: number

MUSIC_PLAYER_STATE_SEEK_BACKWARD: number

MUSIC_PLAYER_STATE_SEEK_FORWARD: number

MUSIC_PLAYER_STATE_STOPPED: number

NO_CAMERA: number

NO_VIDEO: number

QUALITY_HIGH: number

QUALITY_LOW: number

QUALITY_MEDIUM: number

UNKNOWN_ERROR: number

VIDEO_CONTROL_DEFAULT: number

VIDEO_CONTROL_EMBEDDED: number

VIDEO_CONTROL_FULLSCREEN: number

VIDEO_CONTROL_HIDDEN: number

VIDEO_CONTROL_NONE: number

VIDEO_CONTROL_VOLUME_ONLY: number

VIDEO_FINISH_REASON_PLAYBACK_ENDED: number

VIDEO_FINISH_REASON_PLAYBACK_ERROR: number

VIDEO_FINISH_REASON_USER_EXITED: number

VIDEO_LOAD_STATE_PLAYABLE: number

VIDEO_LOAD_STATE_PLAYTHROUGH_OK: number

VIDEO_LOAD_STATE_STALLED: number

VIDEO_LOAD_STATE_UNKNOWN: number

VIDEO_MEDIA_TYPE_AUDIO: number

VIDEO_MEDIA_TYPE_NONE: number

VIDEO_MEDIA_TYPE_VIDEO: number

VIDEO_PLAYBACK_STATE_INTERRUPTED: number

VIDEO_PLAYBACK_STATE_PAUSED: number

VIDEO_PLAYBACK_STATE_PLAYING: number

VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD: number

VIDEO_PLAYBACK_STATE_SEEKING_FORWARD: number

VIDEO_PLAYBACK_STATE_STOPPED: number

VIDEO_REPEAT_MODE_NONE: number

VIDEO_REPEAT_MODE_ONE: number

VIDEO_SCALING_ASPECT_FILL: number

VIDEO_SCALING_ASPECT_FIT: number

VIDEO_SCALING_MODE_FILL: number

VIDEO_SCALING_NONE: number

VIDEO_SOURCE_TYPE_FILE: number

VIDEO_SOURCE_TYPE_STREAMING: number

VIDEO_SOURCE_TYPE_UNKNOWN: number

VIDEO_TIME_OPTION_EXACT: number

VIDEO_TIME_OPTION_NEAREST_KEYFRAME: number

appMusicPlayer: MusicPlayer

audioLineType: number

audioPlaying: boolean

audioSessionMode: number

availableCameraMediaTypes: Array<Object>

availableCameras: Array<Number>

availablePhotoGalleryMediaTypes: Array<Object>

availablePhotoMediaTypes: Array<Object>

averageMicrophonePower: number

bubbleParent: boolean

canRecord: boolean

isCameraSupported: boolean

peakMicrophonePower: number

systemMusicPlayer: MusicPlayer

volume: number

Functions

addEventListener(name: string, callback: (...args: any[]) => any)

Parameters

  • name: string
  • callback: (...args: any[]) => any

applyProperties(props: Dictionary)

Parameters

beep()

createAudioPlayer(parameters?: Dictionary): AudioPlayer

Parameters

Returns

AudioPlayer

createAudioRecorder(parameters?: Dictionary): AudioRecorder

Parameters

Returns

AudioRecorder

createItem(parameters?: Dictionary): Item

Parameters

Returns

Item

createMusicPlayer(parameters?: Dictionary): MusicPlayer

Parameters

Returns

MusicPlayer

createSound(parameters?: Dictionary): Sound

Parameters

Returns

Sound

createVideoPlayer(parameters?: Dictionary): VideoPlayer

Parameters

Returns

VideoPlayer

fireEvent(name: string, event: Dictionary)

Parameters

getAppMusicPlayer(): MusicPlayer

Returns

MusicPlayer

getAudioLineType(): number

Returns

number

getAudioPlaying(): boolean

Returns

boolean

getAudioSessionMode(): number

Returns

number

getAvailableCameraMediaTypes(): Array<Object>

Returns

Array<Object>

getAvailableCameras(): Array<Number>

Returns

Array<Number>

getAvailablePhotoGalleryMediaTypes(): Array<Object>

Returns

Array<Object>

getAvailablePhotoMediaTypes(): Array<Object>

Returns

Array<Object>

getAverageMicrophonePower(): number

Returns

number

getBubbleParent(): boolean

Returns

boolean

getCanRecord(): boolean

Returns

boolean

getIsCameraSupported(): boolean

Returns

boolean

getPeakMicrophonePower(): number

Returns

number

getSystemMusicPlayer(): MusicPlayer

Returns

MusicPlayer

getVolume(): number

Returns

number

hideCamera()

hideMusicLibrary()

isMediaTypeSupported(source: string, type: string): boolean

Parameters

  • source: string
  • type: string

Returns

boolean

openMusicLibrary(options: MusicLibraryOptionsType)

Parameters

openPhotoGallery(options: PhotoGalleryOptionsType)

Parameters

previewImage(options: Dictionary)

Parameters

queryMusicLibrary(query: MediaQueryType): Item[]

Parameters

Returns

Item[]

removeEventListener(name: string, callback: (...args: any[]) => any)

Parameters

  • name: string
  • callback: (...args: any[]) => any

requestAuthorization(callback: (...args: any[]) => any)

Parameters

  • callback: (...args: any[]) => any

saveToPhotoGallery(media: Blob, callbacks: any)

Parameters

  • media: Blob
  • callbacks: any

saveToPhotoGallery(media: File, callbacks: any)

Parameters

  • media: File
  • callbacks: any

setAudioSessionMode(audioSessionMode: number)

Parameters

  • audioSessionMode: number

setAvailableCameraMediaTypes(availableCameraMediaTypes: Array<Object>)

Parameters

  • availableCameraMediaTypes: Array<Object>

setAvailablePhotoGalleryMediaTypes(availablePhotoGalleryMediaTypes: Array<Object>)

Parameters

  • availablePhotoGalleryMediaTypes: Array<Object>

setAvailablePhotoMediaTypes(availablePhotoMediaTypes: Array<Object>)

Parameters

  • availablePhotoMediaTypes: Array<Object>

setAverageMicrophonePower(averageMicrophonePower: number)

Parameters

  • averageMicrophonePower: number

setBubbleParent(bubbleParent: boolean)

Parameters

  • bubbleParent: boolean

showCamera(options: CameraOptionsType)

Parameters

startMicrophoneMonitor()

stopMicrophoneMonitor()

switchCamera(camera: number)

Parameters

  • camera: number

takePicture()

takeScreenshot(callback: (...args: any[]) => any)

Parameters

  • callback: (...args: any[]) => any

vibrate(pattern?: Array<Number>)

Parameters

  • pattern?: Array<Number> optional