1# Media Subsystem Changelog 2 3## cl.media.1 Behavior Changed for media.createSoundPool When Creating SoundPool 4 5**Access Level** 6 7Public API 8 9**Reason for Change** 10 11Previously, an application can create only one SoundPool instance within a process, adhering to a singleton pattern, resulting in a failure to meet various use cases. For example, applications using SoundPool often also use the **TimePicker** component, which internally uses SoundPool. The singleton pattern causes interference between SoundPool objects, negatively impacting user experience. 12 13**Impact of the Change** 14 15This change does not require application adaptation. 16 17Before the change, the underlying implementation of SoundPool is a singleton pattern, allowing only one instance per application process. 18 19After the change, the underlying implementation of SoundPool supports multiple instances, allowing up to 128 instances per application process. 20 21**Start API Level** 22 23API 10 24 25**Change Since** 26 27OpenHarmony SDK 5.1.0.56 28 29**Key API/Component Changes** 30 31No API or component change is involved. 32 33**Adaptation Guide** 34 35No adaptation is required. 36 37## cl.media.2 Behavior Changed for getTrackDescription 38 39**Access Level** 40 41Public API 42 43**Reason for Change** 44 45When the **getTrackDescription** API is used to query track information in scenarios with multiple video, audio, or subtitle tracks, the API returns inaccurate information for non-active tracks, including incorrect video HDR types, audio/subtitle language fields, and non-intuitive default MIME types. The behavior of the API has been modified to return more accurate track information in these cases. 46 47**Impact of the Change** 48 49This change does not require application adaptation. 50 51Before the change, when the API is called to query the track information, non-active tracks had fixed values: hdr_type=0, language=undefined, and MIME types of audio/xxx or video/xxx. 52 53After the change, when the API is called to query the track information, non-active tracks now have hdr_type and language values consistent with the resource, and MIME types of audio/unknown or video/unknown. 54| API | Before Change | After Change | 55| :--------------------------------------------------: | :------------------------------: | :---------------------------: | 56| getTrackDescription | Non-active tracks have<br>hdr_type=0, language=undefined, and MIME types of audio/xxx or video/xxx. | Non-active tracks have<br>have hdr_type and language consistent with the resource, and MIME types of audio/unknown or video/unknown. | 57 58**Start API Level** 59 609 61 62**Change Since** 63 64OpenHarmony SDK 5.1.0.56 65 66**Key API/Component Changes** 67 68APIs in [@ohos.multimedia.media](../../../application-dev/reference/apis-media-kit/js-apis-media.md): 69- getTrackDescription(callback: AsyncCallback\<Array\<MediaDescription\>\>): void 70- getTrackDescription(): Promise\<Array\<MediaDescription\>\> 71 72**Adaptation Guide** 73 74No adaptation is required. 75 76## cl.media.3 Behavior Changed for setPlaybackStrategy 77 78**Access Level** 79 80Public API 81 82**Reason for Change** 83 84Previously, when the **setPlaybackStrategy** API is used, other parameters can take effect only when **mutedMediaType** is set to **MediaType.MEDIA_TYPE_AUD**. The API behavior has been modified to allow setting other properties without setting **mutedMediaType**. For details, see [PlaybackStrategy](../../../application-dev/reference/apis-media-kit/js-apis-media.md#playbackstrategy12). 85 86**Impact of the Change** 87 88This change does not require application adaptation. 89 90Before the change, when this API is used to configure a playback strategy, only parameters set alongside **mutedMediaType** as **MediaType.MEDIA_TYPE_AUD** take effect. 91 92After the change, any combination of parameters set using this API takes effect. 93| API | Before Change | After Change | 94| :--------------------------------------------------: | :------------------------------: | :---------------------------: | 95| setPlaybackStrategy | Parameters take effect only when **mutedMediaType** is set to<br>**MediaType.MEDIA_TYPE_AUD**. | Any parameter combination takes effect. | 96 97**Start API Level** 98 9912 100 101**Change Since** 102 103OpenHarmony SDK 5.1.0.56 104 105**Key API/Component Changes** 106 107APIs in [@ohos.multimedia.media](../../../application-dev/reference/apis-media-kit/js-apis-media.md): 108 109setPlaybackStrategy(strategy: PlaybackStrategy): Promise\<void\> 110 111**Adaptation Guide** 112 113No adaptation is required. 114 115## cl.media.4 Behavior Changed for setMediaSource 116 117**Access Level** 118 119Public API 120 121**Reason for Change** 122 123Previously, setting **mutedMediaType** using **setMediaSource** does not take effect. This behavior has been modified to ensure that parameter settings are effective. For details, see [PlaybackStrategy](../../../application-dev/reference/apis-media-kit/js-apis-media.md#playbackstrategy12). 124 125**Impact of the Change** 126 127This change does not require application adaptation. 128 129Before the change, when this API is used to set **mutedMediaType**, the setting does not take effect. 130 131After the change, when this API is used to set **mutedMediaType**, the setting takes effect. 132| API | Before Change | After Change | 133| :--------------------------------------------------: | :------------------------------: | :---------------------------: | 134| setMediaSource | Setting **mutedMediaType** does not take effect. | Setting **mutedMediaType** takes effect. | 135 136**Start API Level** 137 13812 139 140**Change Since** 141 142OpenHarmony SDK 5.1.0.56 143 144**Key API/Component Changes** 145 146APIs in [@ohos.multimedia.media](../../../application-dev/reference/apis-media-kit/js-apis-media.md): 147 148setMediaSource(src:MediaSource, strategy?: PlaybackStrategy): Promise\<void\> 149 150**Adaptation Guide** 151 152No adaptation is required. 153