• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Multimedia Subsystem
2
3The table below lists the APIs changes of the multimedia subsystem in OpenHarmony 3.2 Beta2 over OpenHarmony 3.2 Beta1.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| ohos.multimedia.audio | AudioRenderer | setInterruptMode(mode: InterruptMode, callback: AsyncCallback\<void>): void;<br>setInterruptMode(mode: InterruptMode): Promise\<void>; | Added|
10| ohos.multimedia.audio | AudioDeviceDescriptor | readonly channelMasks: Array\<number>; | Added|
11| ohos.multimedia.audio | AudioDeviceDescriptor | readonly channelCounts: Array\<number>; | Added|
12| ohos.multimedia.audio | AudioDeviceDescriptor | readonly sampleRates: Array\<number>; | Added|
13| ohos.multimedia.audio | AudioDeviceDescriptor | readonly address: string; | Added|
14| ohos.multimedia.audio | AudioDeviceDescriptor | readonly name: string; | Added|
15| ohos.multimedia.audio | AudioDeviceDescriptor | readonly id: number; | Added|
16| ohos.multimedia.audio | AudioCapturerChangeInfo | readonly deviceDescriptors: AudioDeviceDescriptors; | Added|
17| ohos.multimedia.audio | AudioCapturerChangeInfo | readonly capturerState: AudioState; | Added|
18| ohos.multimedia.audio | AudioCapturerChangeInfo | readonly capturerInfo: AudioCapturerInfo; | Added|
19| ohos.multimedia.audio | AudioCapturerChangeInfo | readonly clientUid: number; | Added|
20| ohos.multimedia.audio | AudioCapturerChangeInfo | readonly streamId: number; | Added|
21| ohos.multimedia.audio | AudioRendererChangeInfo | readonly deviceDescriptors: AudioDeviceDescriptors; | Added|
22| ohos.multimedia.audio | AudioRendererChangeInfo | readonly rendererState: AudioState; | Added|
23| ohos.multimedia.audio | AudioRendererChangeInfo | readonly rendererInfo: AudioRendererInfo; | Added|
24| ohos.multimedia.audio | AudioRendererChangeInfo | readonly clientUid: number; | Added|
25| ohos.multimedia.audio | AudioRendererChangeInfo | readonly streamId: number; | Added|
26| ohos.multimedia.audio | AudioStreamManager | off(type: "audioCapturerChange"); | Added|
27| ohos.multimedia.audio | AudioStreamManager | on(type: "audioCapturerChange", callback: Callback\<AudioCapturerChangeInfoArray>): void; | Added|
28| ohos.multimedia.audio | AudioStreamManager | off(type: "audioRendererChange"); | Added|
29| ohos.multimedia.audio | AudioStreamManager | on(type: "audioRendererChange", callback: Callback\<AudioRendererChangeInfoArray>): void; | Added|
30| ohos.multimedia.audio | AudioStreamManager | getCurrentAudioCapturerInfoArray(callback: AsyncCallback\<AudioCapturerChangeInfoArray>): void;<br>getCurrentAudioCapturerInfoArray(): Promise\<AudioCapturerChangeInfoArray>; | Added|
31| ohos.multimedia.audio | AudioStreamManager | getCurrentAudioRendererInfoArray(callback: AsyncCallback\<AudioRendererChangeInfoArray>): void;<br>getCurrentAudioRendererInfoArray(): Promise\<AudioRendererChangeInfoArray>; | Added|
32| ohos.multimedia.audio | AudioManager | getStreamManager(callback: AsyncCallback\<AudioStreamManager>): void;<br>getStreamManager(): Promise\<AudioStreamManager>; | Added|
33| ohos.multimedia.audio | AudioManager | off(type: 'independentInterrupt', callback?: Callback\<InterruptEvent>): void; | Added|
34| ohos.multimedia.audio | AudioManager | on(type: 'independentInterrupt', callback: Callback\<InterruptEvent>): void; | Added|
35| ohos.multimedia.audio | AudioManager | abandonIndependentInterrupt(focusType: FocusType, callback: AsyncCallback\<boolean>): void;<br>abandonIndependentInterrupt(focusType: FocusType): Promise\<boolean>; | Added|
36| ohos.multimedia.audio | AudioManager | requestIndependentInterrupt(focusType: FocusType, callback: AsyncCallback\<boolean>): void;<br>requestIndependentInterrupt(focusType: FocusType): Promise\<boolean>; | Added|
37| ohos.multimedia.audio | InterruptMode | INDEPENDENT_MODE = 1 | Added|
38| ohos.multimedia.audio | InterruptMode | SHARE_MODE = 0 | Added|
39| ohos.multimedia.audio | FocusType | FOCUS_TYPE_RECORDING = 0 | Added|
40| ohos.multimedia.audio | AudioSampleFormat | SAMPLE_FORMAT_F32LE = 4 | Added|
41| ohos.multimedia.audio | AudioVolumeType | ALL = 100 | Added|
42| ohos.multimedia.image | PixelMap | crop(region: Region, callback: AsyncCallback\<void>): void;<br>crop(region: Region): Promise\<void>; | Added|
43| ohos.multimedia.image | PixelMap | flip(horizontal: boolean, vertical: boolean, callback: AsyncCallback\<void>): void;<br>flip(horizontal: boolean, vertical: boolean): Promise\<void>; | Added|
44| ohos.multimedia.image | PixelMap | rotate(angle: number, callback: AsyncCallback\<void>): void;<br>rotate(angle: number): Promise\<void>; | Added|
45| ohos.multimedia.image | PixelMap | translate(x: number, y: number, callback: AsyncCallback\<void>): void;<br>translate(x: number, y: number): Promise\<void>; | Added|
46| ohos.multimedia.image | PixelMap | scale(x: number, y: number, callback: AsyncCallback\<void>): void;<br>scale(x: number, y: number): Promise\<void>; | Added|
47| ohos.multimedia.image | PixelMap | createAlphaPixelmap(): Promise\<PixelMap>;<br>createAlphaPixelmap(callback: AsyncCallback\<PixelMap>): void; | Added|
48| ohos.multimedia.image | PixelMap | opacity(rate: number, callback: AsyncCallback\<void>): void;<br>opacity(rate: number): Promise\<void>; | Added|
49| ohos.multimedia.image | PixelMap | getDensity(): number; | Added|
50| ohos.multimedia.image | SourceOptions | sourceSize?: Size; | Added|
51| ohos.multimedia.image | SourceOptions | sourcePixelFormat?: PixelMapFormat; | Added|
52| ohos.multimedia.image | SourceOptions | sourceDensity: number; | Added|
53| ohos.multimedia.media | VideoScaleType | VIDEO_SCALE_TYPE_FIT_CROP | Added|
54| ohos.multimedia.media | VideoScaleType | VIDEO_SCALE_TYPE_FIT = 0 | Added|
55| ohos.multimedia.media | VideoPlayer | on(type: 'availableBitratesCollected', callback: (bitrates: Array\<number>) => void): void | Added|
56| ohos.multimedia.media | VideoPlayer | on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void; | Added|
57| ohos.multimedia.media | VideoPlayer | selectBitrate(bitrate: number): Promise\<number>;<br>selectBitrate(bitrate: number, callback: AsyncCallback\<number>): void; | Added|
58| ohos.multimedia.media | VideoPlayer | videoScaleType?: VideoScaleType; | Added|
59| ohos.multimedia.media | VideoPlayer | audioInterruptMode?: audio.InterruptMode; | Added|
60| ohos.multimedia.media | VideoPlayer | fdSrc: AVFileDescriptor; | Added|
61| ohos.multimedia.media | AudioPlayer | on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void; | Added|
62| ohos.multimedia.media | AudioPlayer | audioInterruptMode?: audio.InterruptMode; | Added|
63| ohos.multimedia.media | AudioPlayer | fdSrc: AVFileDescriptor; | Added|
64| ohos.multimedia.media | AVFileDescriptor | length?: number | Added|
65| ohos.multimedia.media | AVFileDescriptor | offset?: number | Added|
66| ohos.multimedia.media | AVFileDescriptor | fd: number | Added|
67