diff --git a/multimedia/audio/audio_js_standard/audioManager/BUILD.gn b/multimedia/audio/audio_js_standard/audioManager/BUILD.gn index 34756433fc013eb7ac43f924425fc837f5214725..94c8f8da1c9793860de3fc13847f12381f0b7f47 100755 --- a/multimedia/audio/audio_js_standard/audioManager/BUILD.gn +++ b/multimedia/audio/audio_js_standard/audioManager/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_manager_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsAudioManagerJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_audio_framework" } ohos_js_assets("audio_manager_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js index 39515598ec643bc645787d88e9da92c3aa83dfc6..a29c984e11b6cfc85a7feddcdae6a89a34ecb397 100644 --- a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js +++ b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js @@ -742,51 +742,6 @@ describe('audioEM', function () { }); }) - /* * - * @tc.number : SUB_AUDIO_MANAGER_DeviceType_001 - * @tc.name : DeviceType - INVALID - * @tc.desc : DeviceType - INVALID - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_MANAGER_DeviceType_001', 0, async function (done) { - expect(audio.DeviceType.INVALID).assertEqual(0); - await sleep(50); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_MANAGER_DeviceType_002 - * @tc.name : DeviceType - WIRED_HEADSET - * @tc.desc : DeviceType - WIRED_HEADSET - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_MANAGER_DeviceType_002', 0, async function (done) { - expect(audio.DeviceType.WIRED_HEADSET).assertEqual(3); - await sleep(50); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_MANAGER_DeviceType_003 - * @tc.name : DeviceType - USB_HEADSET - * @tc.desc : DeviceType - USB_HEADSET - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_MANAGER_DeviceType_003', 0, async function (done) { - var resultflag = false; - if (audio.DeviceType.USB_HEADSET == 22 || audio.DeviceType.USB_HEADSET == undefined) - resultflag = true; - expect(resultflag).assertTrue(); - await sleep(50); - done(); - }) - /* * * @tc.number : SUB_AUDIO_MANAGER_DeviceChangeType_001 * @tc.name : DeviceChangeType - CONNECT @@ -814,6 +769,4 @@ describe('audioEM', function () { await sleep(50); done(); }) - - }) \ No newline at end of file diff --git a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js index a5233058fd93736e4cb623abeb62575c6028b2ea..ad76e4642c9897e71222af5b6609e7d88456f524 100755 --- a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js +++ b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js @@ -2470,51 +2470,53 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_006', 0, async function (done) { await audioManager.setVolume(audioMedia, highVol); - await audioManager.mute(audioMedia, true, (err) => { + audioManager.mute(audioMedia, true, (err) => { if (err) { console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); expect(false).assertTrue(); + done(); } console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); + audioManager.mute(audioMedia, false, (err) => { + if (err) { + console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); + expect(false).assertTrue(); + } + else { + audioManager.getVolume(audioMedia, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == highVol) { + console.info("AudioFrameworkTest: value is " + value); + expect(true).assertTrue(); + } + else { + console.info("AudioFrameworkTest: mute fail"); + expect(false).assertTrue(); + } + }); + audioManager.isMute(audioMedia, (err, data) => { + if (err) { + console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); + expect().assertFail(); + } + else if (data == false) { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); + expect(true).assertTrue(); + } + else { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); + expect(false).assertTrue(); + } + done(); + }); + } + done(); + }); }); - await audioManager.mute(audioMedia, false, async (err) => { - if (err) { - console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); - expect(false).assertTrue(); - } - else { - await audioManager.getVolume(audioMedia, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == highVol) { - console.info("AudioFrameworkTest: value is " + value); - expect(true).assertTrue(); - } - else { - console.info("AudioFrameworkTest: mute fail"); - expect(false).assertTrue(); - } - }); - await audioManager.isMute(audioMedia, (err, data) => { - if (err) { - console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); - expect().assertFail(); - } - else if (data == false) { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); - expect(true).assertTrue(); - } - else { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); + }) /* * @@ -2576,51 +2578,52 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_008', 0, async function (done) { await audioManager.setVolume(audioRingtone, highVol); - await audioManager.mute(audioRingtone, true, (err) => { + audioManager.mute(audioRingtone, true, (err) => { if (err) { console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); expect(false).assertTrue(); } console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); + audioManager.mute(audioRingtone, false, (err) => { + if (err) { + console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); + expect(false).assertTrue(); + } + else { + audioManager.getVolume(audioRingtone, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == highVol) { + console.info("AudioFrameworkTest: value is " + value); + expect(true).assertTrue(); + } + else { + console.info("AudioFrameworkTest: mute fail"); + expect(false).assertTrue(); + } + }); + audioManager.isMute(audioRingtone, (err, data) => { + if (err) { + console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); + expect().assertFail(); + } + else if (data == false) { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); + expect(true).assertTrue(); + } + else { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); + expect(false).assertTrue(); + } + done(); + }); + } + done(); + }); }); - await audioManager.mute(audioRingtone, false, async (err) => { - if (err) { - console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); - expect(false).assertTrue(); - } - else { - await audioManager.getVolume(audioRingtone, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == highVol) { - console.info("AudioFrameworkTest: value is " + value); - expect(true).assertTrue(); - } - else { - console.info("AudioFrameworkTest: mute fail"); - expect(false).assertTrue(); - } - }); - await audioManager.isMute(audioRingtone, (err, data) => { - if (err) { - console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); - expect().assertFail(); - } - else if (data == false) { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); - expect(true).assertTrue(); - } - else { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); + }) /* * @@ -2682,51 +2685,52 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_015', 0, async function (done) { await audioManager.setVolume(audio.AudioVolumeType.MEDIA, highVol); - await audioManager.mute(audio.AudioVolumeType.MEDIA, true, (err) => { + audioManager.mute(audio.AudioVolumeType.MEDIA, true, (err) => { if (err) { console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); expect(false).assertTrue(); } console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); + audioManager.mute(audio.AudioVolumeType.MEDIA, false, (err) => { + if (err) { + console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); + expect(false).assertTrue(); + } + else { + audioManager.getVolume(audio.AudioVolumeType.MEDIA, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == highVol) { + console.info("AudioFrameworkTest: value is " + value); + expect(true).assertTrue(); + } + else { + console.info("AudioFrameworkTest: mute fail"); + expect(false).assertTrue(); + } + }); + audioManager.isMute(audio.AudioVolumeType.MEDIA, (err, data) => { + if (err) { + console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); + expect().assertFail(); + } + else if (data == false) { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); + expect(true).assertTrue(); + } + else { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); + expect(false).assertTrue(); + } + done(); + }); + } + done(); + }); }); - await audioManager.mute(audio.AudioVolumeType.MEDIA, false, async (err) => { - if (err) { - console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); - expect(false).assertTrue(); - } - else { - await audioManager.getVolume(audio.AudioVolumeType.MEDIA, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == highVol) { - console.info("AudioFrameworkTest: value is " + value); - expect(true).assertTrue(); - } - else { - console.info("AudioFrameworkTest: mute fail"); - expect(false).assertTrue(); - } - }); - await audioManager.isMute(audio.AudioVolumeType.MEDIA, (err, data) => { - if (err) { - console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); - expect().assertFail(); - } - else if (data == false) { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); - expect(true).assertTrue(); - } - else { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); + }) /* * @@ -2788,50 +2792,50 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_016', 0, async function (done) { await audioManager.setVolume(audio.AudioVolumeType.RINGTONE, highVol); - await audioManager.mute(audio.AudioVolumeType.RINGTONE, true, (err) => { + audioManager.mute(audio.AudioVolumeType.RINGTONE, true, (err) => { if (err) { console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); expect(false).assertTrue(); } console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); - }); - await audioManager.mute(audio.AudioVolumeType.RINGTONE, false, async (err) => { - if (err) { - console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); - expect(false).assertTrue(); - } - else { - await audioManager.getVolume(audio.AudioVolumeType.RINGTONE, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == highVol) { - console.info("AudioFrameworkTest: value is " + value); - expect(true).assertTrue(); - } - else { - console.info("AudioFrameworkTest: mute fail"); - expect(false).assertTrue(); - } - }); - await audioManager.isMute(audio.AudioVolumeType.RINGTONE, (err, data) => { - if (err) { - console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); - expect().assertFail(); - } - else if (data == false) { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); - expect(true).assertTrue(); - } - else { - console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); - expect(false).assertTrue(); - } - done(); - }); - } - done(); + audioManager.mute(audio.AudioVolumeType.RINGTONE, false, (err) => { + if (err) { + console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); + expect(false).assertTrue(); + } + else { + audioManager.getVolume(audio.AudioVolumeType.RINGTONE, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == highVol) { + console.info("AudioFrameworkTest: value is " + value); + expect(true).assertTrue(); + } + else { + console.info("AudioFrameworkTest: mute fail"); + expect(false).assertTrue(); + } + }); + audioManager.isMute(audio.AudioVolumeType.RINGTONE, (err, data) => { + if (err) { + console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); + expect().assertFail(); + } + else if (data == false) { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: PASS: ' + data); + expect(true).assertTrue(); + } + else { + console.log('AudioFrameworkTest: Callback : Is Stream Mute Media: FALSE: FAIL: ' + data); + expect(false).assertTrue(); + } + done(); + }); + } + done(); + }); }); }) @@ -2894,50 +2898,50 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_021', 0, async function (done) { await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, highVol); - await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true, (err) => { + audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true, (err) => { if (err) { console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); expect(false).assertTrue(); } console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); - }); - await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, false, async (err) => { - if (err) { - console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback: Error : ${err.message}`); - expect(false).assertTrue(); - } - else { - await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == highVol) { - console.info("AudioFrameworkTest: value is " + value); - expect(true).assertTrue(); - } - else { - console.info("AudioFrameworkTest: mute fail"); - expect(false).assertTrue(); - } - }); - await audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => { - if (err) { - console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_CALL : failed to get Mute Status ${err.message}`); - expect().assertFail(); - } - else if (data == false) { - console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_CALL: FALSE: PASS: ' + data); - expect(true).assertTrue(); - } - else { - console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_CALL: FALSE: FAIL: ' + data); - expect(false).assertTrue(); - } - done(); - }); - } - done(); + audioManager.mute(audio.AudioVolumeType.VOICE_CALL, false, (err) => { + if (err) { + console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback: Error : ${err.message}`); + expect(false).assertTrue(); + } + else { + audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == highVol) { + console.info("AudioFrameworkTest: value is " + value); + expect(true).assertTrue(); + } + else { + console.info("AudioFrameworkTest: mute fail"); + expect(false).assertTrue(); + } + }); + audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => { + if (err) { + console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_CALL : failed to get Mute Status ${err.message}`); + expect().assertFail(); + } + else if (data == false) { + console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_CALL: FALSE: PASS: ' + data); + expect(true).assertTrue(); + } + else { + console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_CALL: FALSE: FAIL: ' + data); + expect(false).assertTrue(); + } + done(); + }); + } + done(); + }); }); }) @@ -3000,50 +3004,50 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_023', 0, async function (done) { await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, highVol); - await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true, (err) => { + audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true, (err) => { if (err) { console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); expect(false).assertTrue(); } console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); - }); - await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, false, async (err) => { - if (err) { - console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Callback: Error : ${err.message}`); - expect(false).assertTrue(); - } - else { - await audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == highVol) { - console.info("AudioFrameworkTest: value is " + value); - expect(true).assertTrue(); - } - else { - console.info("AudioFrameworkTest: mute fail"); - expect(false).assertTrue(); - } - }); - await audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => { - if (err) { - console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`); - expect().assertFail(); - } - else if (data == false) { - console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_ASSISTANT: FALSE: PASS: ' + data); - expect(true).assertTrue(); - } - else { - console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_ASSISTANT: FALSE: FAIL: ' + data); - expect(false).assertTrue(); - } - done(); - }); - } - done(); + audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, false, (err) => { + if (err) { + console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Callback: Error : ${err.message}`); + expect(false).assertTrue(); + } + else { + audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == highVol) { + console.info("AudioFrameworkTest: value is " + value); + expect(true).assertTrue(); + } + else { + console.info("AudioFrameworkTest: mute fail"); + expect(false).assertTrue(); + } + }); + audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => { + if (err) { + console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`); + expect().assertFail(); + } + else if (data == false) { + console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_ASSISTANT: FALSE: PASS: ' + data); + expect(true).assertTrue(); + } + else { + console.log('AudioFrameworkTest: Callback : Is Stream Mute VOICE_ASSISTANT: FALSE: FAIL: ' + data); + expect(false).assertTrue(); + } + done(); + }); + } + done(); + }); }); }) @@ -3108,17 +3112,12 @@ describe('audioManager', function () { await audioManager.setVolume(audioMedia, highVol); await audioManager.mute(audioMedia, true).then(async function () { console.log('AudioFrameworkTest: Set Stream Mute: Media: Promise: TRUE'); - await audioManager.getVolume(audioMedia, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == 0) { - console.info("AudioFrameworkTest: value is " + value); + await audioManager.getVolume(audioMedia).then((value) => { + console.info("AudioFrameworkTest: value is " + value); + if (value == 0) { expect(true).assertTrue(); } else { - console.info("AudioFrameworkTest: mute fail"); expect(false).assertTrue(); } }); @@ -3154,24 +3153,29 @@ describe('audioManager', function () { */ it('SUB_AUDIO_MANAGER_mute_018', 0, async function (done) { await audioManager.setVolume(audioMedia, lowVol); - await audioManager.mute(audioMedia, true, async (err) => { + audioManager.mute(audioMedia, true, async (err) => { if (err) { console.error(`AudioFrameworkTest: Callback : SetVolume: Media : failed to set Mute Status ${err.message}`); expect().assertFail(); } else { console.log('AudioFrameworkTest: Set Stream Mute: Media: Callback : TRUE'); - await audioManager.getVolume(audioMedia).then((value) => { - console.info("AudioFrameworkTest: value is " + value); - if (value == 0) { + audioManager.getVolume(audioMedia, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == 0) { + console.info("AudioFrameworkTest: value is " + value); expect(true).assertTrue(); } else { + console.info("AudioFrameworkTest: mute fail"); expect(false).assertTrue(); } }); await audioManager.setVolume(audioMedia, highVol); - await audioManager.isMute(audioMedia, (err, data) => { + audioManager.isMute(audioMedia, (err, data) => { if (err) { console.error(`AudioFrameworkTest: Callback : SetVolume: Media : failed to get Mute Status ${err.message}`); expect().assertFail(); @@ -3251,16 +3255,21 @@ describe('audioManager', function () { } else { console.log('AudioFrameworkTest: Set Stream Mute: Ringtone: Callback : SetVolume'); - await audioManager.getVolume(audioRingtone).then((value) => { - if (value == 0) { + audioManager.getVolume(audioRingtone, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == 0) { console.info("AudioFrameworkTest: value is " + value); expect(true).assertTrue(); } else { + console.info("AudioFrameworkTest: mute fail"); expect(false).assertTrue(); } }); - audioManager.setVolume(audioRingtone, lowVol); + await audioManager.setVolume(audioRingtone, lowVol); audioManager.isMute(audioRingtone, (err, data) => { if (err) { console.error(`AudioFrameworkTest: Callback : SetVolume: Ringtone : failed to get Mute Status ${err.message}`); @@ -3293,17 +3302,12 @@ describe('audioManager', function () { await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, highVol); await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true).then(async function () { console.log('AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Promise: TRUE'); - await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == 0) { - console.info("AudioFrameworkTest: value is " + value); + await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL).then((value) => { + console.info("AudioFrameworkTest: value is " + value); + if (value == 0) { expect(true).assertTrue(); } else { - console.info("AudioFrameworkTest: mute fail"); expect(false).assertTrue(); } }); @@ -3346,16 +3350,21 @@ describe('audioManager', function () { } else { console.log('AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback : SetVolume'); - await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL).then((value) => { - if (value == 0) { + audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => { + if (err) { + console.error(`Failed to obtain the volume. ${err.message}`); + expect(false).assertTrue(); + } + else if (value == 0) { console.info("AudioFrameworkTest: value is " + value); expect(true).assertTrue(); } else { + console.info("AudioFrameworkTest: mute fail"); expect(false).assertTrue(); } }); - audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, lowVol); + await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, lowVol); audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => { if (err) { console.error(`AudioFrameworkTest: Callback : SetVolume: VOICE_CALL : failed to get Mute Status ${err.message}`); @@ -3388,17 +3397,12 @@ describe('audioManager', function () { await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, highVol); await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true).then(async function () { console.log('AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Promise: TRUE'); - await audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT, (err, value) => { - if (err) { - console.error(`Failed to obtain the volume. ${err.message}`); - expect(false).assertTrue(); - } - else if (value == 0) { - console.info("AudioFrameworkTest: value is " + value); + await audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT).then((value) => { + console.info("AudioFrameworkTest: value is " + value); + if (value == 0) { expect(true).assertTrue(); } else { - console.info("AudioFrameworkTest: mute fail"); expect(false).assertTrue(); } }); @@ -3450,7 +3454,7 @@ describe('audioManager', function () { expect(false).assertTrue(); } }); - audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, lowVol); + await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, lowVol); audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => { if (err) { console.error(`AudioFrameworkTest: Callback : SetVolume: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`); @@ -4911,178 +4915,168 @@ describe('audioManager', function () { }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_001 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_001 * @tc.name : InterruptType - INTERRUPT_TYPE_BEGIN * @tc.desc : InterruptType - INTERRUPT_TYPE_BEGIN * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_001', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_001', 0, async function (done) { expect(audio.InterruptType.INTERRUPT_TYPE_BEGIN).assertEqual(1); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_002 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_002 * @tc.name : InterruptType - INTERRUPT_TYPE_END * @tc.desc : InterruptType - INTERRUPT_TYPE_END * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_002', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_002', 0, async function (done) { expect(audio.InterruptType.INTERRUPT_TYPE_END).assertEqual(2); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_003 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_003 * @tc.name : InterruptHint - INTERRUPT_HINT_NONE * @tc.desc : InterruptHint - INTERRUPT_HINT_NONE * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_003', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_003', 0, async function (done) { expect(audio.InterruptHint.INTERRUPT_HINT_NONE).assertEqual(0); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_004 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_004 * @tc.name : InterruptHint - INTERRUPT_HINT_RESUME * @tc.desc : InterruptHint - INTERRUPT_HINT_RESUME * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_004', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_004', 0, async function (done) { expect(audio.InterruptHint.INTERRUPT_HINT_RESUME).assertEqual(1); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_005 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_005 * @tc.name : InterruptHint - INTERRUPT_HINT_PAUSE * @tc.desc : InterruptHint - INTERRUPT_HINT_PAUSE * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_005', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_005', 0, async function (done) { expect(audio.InterruptHint.INTERRUPT_HINT_PAUSE).assertEqual(2); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_006 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_006 * @tc.name : InterruptHint - INTERRUPT_HINT_STOP * @tc.desc : InterruptHint - INTERRUPT_HINT_STOP * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_006', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_006', 0, async function (done) { expect(audio.InterruptHint.INTERRUPT_HINT_STOP).assertEqual(3); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_007 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_007 * @tc.name : InterruptHint - INTERRUPT_HINT_DUCK * @tc.desc : InterruptHint - INTERRUPT_HINT_DUCK * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_007', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_007', 0, async function (done) { expect(audio.InterruptHint.INTERRUPT_HINT_DUCK).assertEqual(4); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_008 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_008 * @tc.name : InterruptHint - INTERRUPT_HINT_UNDUCK * @tc.desc : InterruptHint - INTERRUPT_HINT_UNDUCK * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_008', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_008', 0, async function (done) { expect(audio.InterruptHint.INTERRUPT_HINT_UNDUCK).assertEqual(5); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_009 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_009 * @tc.name : InterruptForceType - INTERRUPT_FORCE * @tc.desc : InterruptForceType - INTERRUPT_FORCE * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_009', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_009', 0, async function (done) { expect(audio.InterruptForceType.INTERRUPT_FORCE).assertEqual(0); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_010 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_010 * @tc.name : InterruptForceType - INTERRUPT_SHARE * @tc.desc : InterruptForceType - INTERRUPT_SHARE * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_009', 0, async function (done) { - + it('SUB_AUDIO_MANAGER_INTERRUPT_010', 0, async function (done) { expect(audio.InterruptForceType.INTERRUPT_SHARE).assertEqual(1); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_010 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_011 * @tc.name : ActiveDeviceType - BLUETOOTH_SCO * @tc.desc : ActiveDeviceType - BLUETOOTH_SCO * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_010', 0, async function (done) { + it('SUB_AUDIO_MANAGER_INTERRUPT_011', 0, async function (done) { expect(audio.ActiveDeviceType.BLUETOOTH_SCO).assertEqual(7); await sleep(50); done(); }) /* * - * @tc.number : SUB_AUDIO_MANAGER_interrupt_011 + * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_012 * @tc.name : ActiveDeviceType - SPEAKER * @tc.desc : ActiveDeviceType - SPEAKER * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_interrupt_011', 0, async function (done) { + it('SUB_AUDIO_MANAGER_INTERRUPT_012', 0, async function (done) { expect(audio.ActiveDeviceType.SPEAKER).assertEqual(2); await sleep(50); done(); @@ -5118,28 +5112,435 @@ describe('audioManager', function () { /* * * @tc.number : SUB_AUDIO_MANAGER_DeviceType_001 - * @tc.name : DeviceType - BLUETOOTH_SCO - * @tc.desc : DeviceType - BLUETOOTH_SCO + * @tc.name : DeviceType - ALL Device Type + * @tc.desc : DeviceType - ALL Device Type * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ it('SUB_AUDIO_MANAGER_DeviceType_001', 0, async function (done) { + expect(audio.DeviceType.INVALID).assertEqual(0); + console.info("audio.DeviceType.INVALID:"+audio.DeviceType.INVALID); + expect(audio.DeviceType.EARPIECE).assertEqual(1); + console.info("audio.DeviceType.EARPIECE:"+audio.DeviceType.EARPIECE); + expect(audio.DeviceType.SPEAKER).assertEqual(2); + console.info("audio.DeviceType.SPEAKER:"+audio.DeviceType.SPEAKER); + expect(audio.DeviceType.WIRED_HEADSET).assertEqual(3); + console.info("audio.DeviceType.WIRED_HEADSET:"+audio.DeviceType.WIRED_HEADSET); + expect(audio.DeviceType.WIRED_HEADPHONES).assertEqual(4); + console.info("audio.DeviceType.WIRED_HEADPHONES:"+audio.DeviceType.WIRED_HEADPHONES); expect(audio.DeviceType.BLUETOOTH_SCO).assertEqual(7); + console.info("audio.DeviceType.BLUETOOTH_SCO:"+audio.DeviceType.BLUETOOTH_SCO); + expect(audio.DeviceType.BLUETOOTH_A2DP).assertEqual(8); + console.info("audio.DeviceType.BLUETOOTH_A2DP:"+audio.DeviceType.BLUETOOTH_A2DP); + expect(audio.DeviceType.MIC).assertEqual(15); + console.info("audio.DeviceType.MIC:"+audio.DeviceType.MIC); + expect(audio.DeviceType.USB_HEADSET).assertEqual(22); + console.info("audio.DeviceType.USB_HEADSET:"+audio.DeviceType.USB_HEADSET); + await sleep(50); + done(); + }) + + /* * + * @tc.number : SUB_AUDIO_MANAGER_DeviceRole_001 + * @tc.name : DeviceRole - ALL Device Role + * @tc.desc : DeviceRole - ALL Device Role + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_MANAGER_DeviceRole_001', 0, async function (done) { + expect(audio.DeviceRole.INPUT_DEVICE).assertEqual(1); + console.info("audio.DeviceRole.INPUT_DEVICE :"+audio.DeviceRole.INPUT_DEVICE); + expect(audio.DeviceRole.OUTPUT_DEVICE).assertEqual(2); + console.info("audio.DeviceRole.OUTPUT_DEVICE :"+audio.DeviceRole.OUTPUT_DEVICE); await sleep(50); done(); }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_001 + * @tc.name : getDevices - Output device - Callback + * @tc.desc : getDevices - Output device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_001', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + AudioRoutingManager.getDevices(1, (err, value) => { + // Getting all Output devices Enumb 1 = OUTPUT_DEVICES_FLAG + console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG'); + + if (err) { + console.error(`AudioFrameworkTest:Callback: OUTPUT_DEVICES_FLAG: failed to get devices ${err.message}`); + expect().assertFail(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) /* * - * @tc.number : SUB_AUDIO_MANAGER_DeviceType_002 - * @tc.name : DeviceType - WIRED_HEADPHONES - * @tc.desc : DeviceType - WIRED_HEADPHONES - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_002 + * @tc.name : getDevices - Input device - Callback + * @tc.desc : getDevices - Input device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_002', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + AudioRoutingManager.getDevices(2, (err, value) => { + // Getting all Input Devices ENUM 2 = INPUT_DEVICES_FLAG + + console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG'); + + if (err) { + console.error(`AudioFrameworkTest:Callback:INPUT_DEVICES_FLAG: failed to get devices ${err.message}`); + expect().assertFail(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null + && cMask != null) { + console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_003 + * @tc.name : getDevices - ALL device - Callback + * @tc.desc : getDevices - ALL device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_003', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + AudioRoutingManager.getDevices(3, (err, value) => { + // Getting all devies connected 3 = ALL_DEVICES_FLAG + + console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG'); + + if (err) { + console.error(`AudioFrameworkTest:Callback:ALL_DEVICES_FLAG: failed to get devices ${err.message}`); + expect().assertFail(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_004 + * @tc.name : getDevices - Output device - Callback - ENAME + * @tc.desc : getDevices - Output device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_004', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + AudioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG, (err, value) => { + console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG'); + if (err) { + console.error(`AudioFrameworkTest:Callback:OUTPUT_DEVICES_FLAG:failed to get devices ${err.message}`); + expect().assertFail(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_005 + * @tc.name : getDevices - Input device - Callback - ENAME + * @tc.desc : getDevices - Input device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_005', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + AudioRoutingManager.getDevices(audio.DeviceFlag.INPUT_DEVICES_FLAG, (err, value) => { + console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG'); + if (err) { + console.error(`AudioFrameworkTest:Callback:INPUT_DEVICES_FLAG: failed to get devices ${err.message}`); + expect().assertFail(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_006 + * @tc.name : getDevices - ALL device - Callback - ENAME + * @tc.desc : getDevices - ALL device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_006', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + AudioRoutingManager.getDevices(audio.DeviceFlag.ALL_DEVICES_FLAG, (err, value) => { + console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG'); + if (err) { + console.error(`AudioFrameworkTest: Callback: ALL_DEVICES_FLAG: failed to get devices ${err.message}`); + expect().assertFail(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_008 + * @tc.name : getDevices - OUTPUT device - Promise - ENAME + * @tc.desc : getDevices - OUTPUT device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_008', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + let AudioRoutingManager = await audioManager.getRoutingManager(); + let value = await AudioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG); + console.info('AudioFrameworkTest: Promise: getDevices OUTPUT_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Promise: getDevices:OUTPUT_DEVICES_FLAG : PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Promise: getDevices:OUTPUT_DEVICES_FLAG : FAIL'); + expect(false).assertTrue(); + } + done(); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_009 + * @tc.name : getDevices - INPUT device - Promise - ENAME + * @tc.desc : getDevices - INPUT device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_009', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + audioManager.getRoutingManager(async (err,AudioRoutingManager)=>{ + if (err) { + console.error(`AudioFrameworkTest: Callback: failed to get RoutingManager ${err.message}`); + expect().assertFail(); + } else { + let value = await AudioRoutingManager.getDevices(audio.DeviceFlag.INPUT_DEVICES_FLAG) + console.info('AudioFrameworkTest: Promise: getDevices INPUT_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Promise: getDevices : INPUT_DEVICES_FLAG : PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_010 + * @tc.name : getDevices - ALL device - Promise - ENAME + * @tc.desc : getDevices - ALL device + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB_AUDIO_ROUTING_MANAGER_getDevices_010', 0, async function (done) { + dRValue = null; + dTValue = null; + devId = null; + devName = null; + devAddr = null; + sRate = null; + cCount = null; + cMask = null; + audioManager.getRoutingManager(async (err,AudioRoutingManager)=>{ + if (err) { + console.error(`AudioFrameworkTest:Callback:failed to get RoutingManager ${err.message}`); + expect().assertFail(); + } else { + let value = await AudioRoutingManager.getDevices(audio.DeviceFlag.ALL_DEVICES_FLAG) + console.info('AudioFrameworkTest: Promise: getDevices ALL_DEVICES_FLAG'); + value.forEach(displayDeviceProp); + + if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null && + cMask != null) { + console.info('AudioFrameworkTest: Promise: getDevices : ALL_DEVICES_FLAG : PASS'); + expect(true).assertTrue(); + } + else { + console.info('AudioFrameworkTest: Promise: getDevices : ALL_DEVICES_FLAG : FAIL'); + expect(false).assertTrue(); + } + } + done(); + }); + }) + + /* * + * @tc.number : SUB_AUDIO_DeviceFlag_001 + * @tc.name : NONE_DEVICES_FLAG + * @tc.desc : NONE_DEVICES_FLAG + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 */ - it('SUB_AUDIO_MANAGER_DeviceType_002', 0, async function (done) { - expect(audio.DeviceType.WIRED_HEADPHONES).assertEqual(4); + it('SUB_AUDIO_DeviceFlag_001', 0, async function (done) { + expect(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).assertEqual(1); + expect(audio.DeviceFlag.INPUT_DEVICES_FLAG).assertEqual(2); + expect(audio.DeviceFlag.ALL_DEVICES_FLAG).assertEqual(3); await sleep(50); done(); }) diff --git a/multimedia/camera/camera_js_standard/BUILD.gn b/multimedia/camera/camera_js_standard/BUILD.gn index 862ac01136cdf2c1c126479bb65f439d6811ab0d..21272074965d41b6d1bd0f2363476e32b8215e1b 100644 --- a/multimedia/camera/camera_js_standard/BUILD.gn +++ b/multimedia/camera/camera_js_standard/BUILD.gn @@ -22,6 +22,8 @@ ohos_js_hap_suite("camera_standard_ets_hap") { certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsCameraStandardETSTest" + subsystem_name = "multimedia" + part_name = "multimedia_camera_standard" } ohos_js_assets("camera_ets_assets") { source_dir = "./src/main/ets/MainAbility" diff --git a/multimedia/image/image_js_standard/image/BUILD.gn b/multimedia/image/image_js_standard/image/BUILD.gn index 591f4eb75da55840d8e4dfe4a97df60c33d8db83..67b2f417e8eddc87e731fe4c3e6864fe45c9f1c0 100644 --- a/multimedia/image/image_js_standard/image/BUILD.gn +++ b/multimedia/image/image_js_standard/image/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imageColorspace/BUILD.gn b/multimedia/image/image_js_standard/imageColorspace/BUILD.gn index 32f2c374f4c87195762a9272c71c91bb7defb63c..882ad02a606bf5ace04c32910951b7db4cfcd5ea 100644 --- a/multimedia/image/image_js_standard/imageColorspace/BUILD.gn +++ b/multimedia/image/image_js_standard/imageColorspace/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_colorspace_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageColorspaceJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_colorspace_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imageDecodeOptions/BUILD.gn b/multimedia/image/image_js_standard/imageDecodeOptions/BUILD.gn index 6be641823221f40c449c61aa2d197df9e66b1902..4d4fd657c4e3018bce258ab7537c97b359f996eb 100644 --- a/multimedia/image/image_js_standard/imageDecodeOptions/BUILD.gn +++ b/multimedia/image/image_js_standard/imageDecodeOptions/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_DecodeOptions_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageDecodeOptionsJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_DecodeOptions_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imageExif/BUILD.gn b/multimedia/image/image_js_standard/imageExif/BUILD.gn index 0fd8c8cd62d9f376aced92f92e8b9c96c687e018..11df801ceefc76a4b53563ea602e29a78d9f20ba 100644 --- a/multimedia/image/image_js_standard/imageExif/BUILD.gn +++ b/multimedia/image/image_js_standard/imageExif/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_exif_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageExifJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_exif_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/image/image_js_standard/imageModifyProperty/BUILD.gn b/multimedia/image/image_js_standard/imageModifyProperty/BUILD.gn index 78597a2b5c3736d0fcaddcb6cf19ba244ea3e67d..c22a7930647ec87dcd9acb8b3c6f9d8b84d47ce8 100644 --- a/multimedia/image/image_js_standard/imageModifyProperty/BUILD.gn +++ b/multimedia/image/image_js_standard/imageModifyProperty/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_modifyProperty_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageModifyPropertyJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_modifyProperty_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imagePacking/BUILD.gn b/multimedia/image/image_js_standard/imagePacking/BUILD.gn index cb9996394d17dbd37932f512158fc6078831c5fe..668976e701bc757cf19d5bddf39f58025a1442cf 100644 --- a/multimedia/image/image_js_standard/imagePacking/BUILD.gn +++ b/multimedia/image/image_js_standard/imagePacking/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_packing_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImagePackingJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_packing_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imagePixelMapFramework/BUILD.gn b/multimedia/image/image_js_standard/imagePixelMapFramework/BUILD.gn index bb8dc697e98e55a3da8c0e5594eff4871472b124..98627727ad95d818420994fd42503a4a5c94aee5 100644 --- a/multimedia/image/image_js_standard/imagePixelMapFramework/BUILD.gn +++ b/multimedia/image/image_js_standard/imagePixelMapFramework/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_pixelmapframework_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImagePixelMapFrameworkJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_pixelmapframework_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imageReceiver/BUILD.gn b/multimedia/image/image_js_standard/imageReceiver/BUILD.gn index 87b35f550463ec4882dacc9e42de667460f1f6ed..524d4bb562c9353a1718cca77847900ae005d75d 100644 --- a/multimedia/image/image_js_standard/imageReceiver/BUILD.gn +++ b/multimedia/image/image_js_standard/imageReceiver/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_receiver_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageReceiverJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_receiver_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imageWebp/BUILD.gn b/multimedia/image/image_js_standard/imageWebp/BUILD.gn index 47995f56a8b8a0a8cff87cf96b91ed14c917983e..1ec0f7c14ccb3e9e1d203d41cd87927ea8ef56fb 100644 --- a/multimedia/image/image_js_standard/imageWebp/BUILD.gn +++ b/multimedia/image/image_js_standard/imageWebp/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_webp_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageWebpJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_webp_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/imageYUV/BUILD.gn b/multimedia/image/image_js_standard/imageYUV/BUILD.gn index 94d2139efd20b4e8cdcf85a1b13a6e89ee7f6409..5444c72e2c31187a8485a20d9a024dab0e7e57de 100644 --- a/multimedia/image/image_js_standard/imageYUV/BUILD.gn +++ b/multimedia/image/image_js_standard/imageYUV/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("image_yuv_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsImageyuvJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" } ohos_js_assets("image_yuv_js_assets") { js2abc = true diff --git a/multimedia/image/image_js_standard/image_ndk_test/BUILD.gn b/multimedia/image/image_js_standard/image_ndk_test/BUILD.gn index 43d3486c83ef90ff9ed9509b732dd5dc6db28d3a..0be0395cd31f6aebbb55b996ead803fc8cd23c8d 100644 --- a/multimedia/image/image_js_standard/image_ndk_test/BUILD.gn +++ b/multimedia/image/image_js_standard/image_ndk_test/BUILD.gn @@ -23,6 +23,8 @@ ohos_js_hap_suite("image_pixelmap_ndk_hap") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsPixelMapNapiEtsTest" + subsystem_name = "multimedia" + part_name = "multimedia_image_standard" shared_libraries = [ "./entry/src/main/cpp:imagePixelmap" ] } diff --git a/multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn b/multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn index 7eadf2d6ca1d8c1fbd32de13ad990983636fddd5..dbf8d937bee7df900617b3120c02f44270415c14 100644 --- a/multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn +++ b/multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn @@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_codec_format_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsAudioCodecFormatJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("audio_codec_format_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/audioDecoder/BUILD.gn b/multimedia/media/media_js_standard/audioDecoder/BUILD.gn index 05613d295b1dd675290e2a6764f8acc48f49c966..446e133f839ab4f1522d7346aa01e073c6470c16 100644 --- a/multimedia/media/media_js_standard/audioDecoder/BUILD.gn +++ b/multimedia/media/media_js_standard/audioDecoder/BUILD.gn @@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_decoder_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsAudioDecoderJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("audio_decoder_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/audioEncoder/BUILD.gn b/multimedia/media/media_js_standard/audioEncoder/BUILD.gn index 0b47cc4f4213b091cff7f4b17024d371adb38bcc..f6fc6bc593390a6cac1f4ea2eee2c237f5b0fd6e 100644 --- a/multimedia/media/media_js_standard/audioEncoder/BUILD.gn +++ b/multimedia/media/media_js_standard/audioEncoder/BUILD.gn @@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_encoder_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsAudioEncoderJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("audio_encoder_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/audioPlayer/BUILD.gn b/multimedia/media/media_js_standard/audioPlayer/BUILD.gn index ec5c7f0f0f4730a52f5a5d11ed6b79955cf0d874..ac98e8144179e48dab8527970e8ce93b50b9fe8d 100644 --- a/multimedia/media/media_js_standard/audioPlayer/BUILD.gn +++ b/multimedia/media/media_js_standard/audioPlayer/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_player_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsAudioPlayerJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("audio_player_js_assets") { js2abc = true diff --git a/multimedia/media/media_js_standard/audioRecorder/BUILD.gn b/multimedia/media/media_js_standard/audioRecorder/BUILD.gn index a91e5e187679606dfa492f8fccb693accbf14dd1..849666f8a77c21d9d36448d7cd2c1273ddb8ce8a 100644 --- a/multimedia/media/media_js_standard/audioRecorder/BUILD.gn +++ b/multimedia/media/media_js_standard/audioRecorder/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_recorder_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsAudioRecorderJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("audio_recorder_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/hlsPlayer/BUILD.gn b/multimedia/media/media_js_standard/hlsPlayer/BUILD.gn index f8aed3027d83e23c2395aa01f9fafe64aacb11db..93344325b42b6ded834d6449fad47d71382dade7 100644 --- a/multimedia/media/media_js_standard/hlsPlayer/BUILD.gn +++ b/multimedia/media/media_js_standard/hlsPlayer/BUILD.gn @@ -27,6 +27,8 @@ ohos_js_hap_suite("hls_player_js_hap") { # ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsHLSPlayerJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" # part_name = "prebuilt_hap" # subsystem_name = "xts" diff --git a/multimedia/media/media_js_standard/httpPlayer/BUILD.gn b/multimedia/media/media_js_standard/httpPlayer/BUILD.gn index 922b57986e133656013267e98659ee350e67b7d0..293bc5435472b107554dcfe2ee03ec696abd0fb7 100644 --- a/multimedia/media/media_js_standard/httpPlayer/BUILD.gn +++ b/multimedia/media/media_js_standard/httpPlayer/BUILD.gn @@ -27,6 +27,8 @@ ohos_js_hap_suite("http_player_js_hap") { # ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsHTTPPlayerJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" # part_name = "prebuilt_hap" # subsystem_name = "xts" diff --git a/multimedia/media/media_js_standard/recorderFormat/BUILD.gn b/multimedia/media/media_js_standard/recorderFormat/BUILD.gn index 63fdc02aaba875a2526daf8e65531f8e6f5fce6d..b432b9cd36a256e8a96af51087ac9d3503415562 100644 --- a/multimedia/media/media_js_standard/recorderFormat/BUILD.gn +++ b/multimedia/media/media_js_standard/recorderFormat/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("recorder_format_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsRecorderFormatJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("recorder_format_js_assets") { js2abc = true diff --git a/multimedia/media/media_js_standard/recorderProfile/BUILD.gn b/multimedia/media/media_js_standard/recorderProfile/BUILD.gn index 0b92b0e264b425370faa41a892ad7db839dcfc24..cac6ee99607578e3b5de0595e7c2a17a6d84608c 100644 --- a/multimedia/media/media_js_standard/recorderProfile/BUILD.gn +++ b/multimedia/media/media_js_standard/recorderProfile/BUILD.gn @@ -22,6 +22,8 @@ ohos_js_hap_suite("recorder_profile_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsRecorderProfileJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("profile_js_assets") { js2abc = true diff --git a/multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn b/multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn index fad4b9c03e1fe1cf39b14ee4f67756d91141e7cb..0cf961bd699ffe9ffa960f4d416825f6619975d3 100644 --- a/multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn +++ b/multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("video_codec_format_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsVideoCodecFormatJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("video_codec_format_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/videoDecoder/BUILD.gn b/multimedia/media/media_js_standard/videoDecoder/BUILD.gn index be6b25abd83ba672f5b3e4fe10764157e7146263..cddb7a4fae764b0a2c9be2a3c3767c3b0c23e209 100644 --- a/multimedia/media/media_js_standard/videoDecoder/BUILD.gn +++ b/multimedia/media/media_js_standard/videoDecoder/BUILD.gn @@ -21,6 +21,8 @@ ohos_js_hap_suite("video_decoder_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsVideoDecoderJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("video_decoder_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/videoEncoder/BUILD.gn b/multimedia/media/media_js_standard/videoEncoder/BUILD.gn index 73b133096551a9872c3dcfdb64277c9021418eb1..b9f66aae08635cceffb949cab1dbb3f296fe89f3 100644 --- a/multimedia/media/media_js_standard/videoEncoder/BUILD.gn +++ b/multimedia/media/media_js_standard/videoEncoder/BUILD.gn @@ -22,6 +22,8 @@ ohos_js_hap_suite("video_encoder_js_hap") { ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsVideoEncoderJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" } ohos_js_assets("video_encoder_js_assets") { source_dir = "./src/main/js/default" diff --git a/multimedia/media/media_js_standard/videoPlayer/BUILD.gn b/multimedia/media/media_js_standard/videoPlayer/BUILD.gn index 1ef7f847a2834d93d3092e6368205b90e2ce143a..ab64788ff3f8224a8d4ea495bbc186e87193f4ce 100644 --- a/multimedia/media/media_js_standard/videoPlayer/BUILD.gn +++ b/multimedia/media/media_js_standard/videoPlayer/BUILD.gn @@ -27,6 +27,8 @@ ohos_js_hap_suite("video_player_js_hap") { # ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsVideoPlayerJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" # part_name = "prebuilt_hap" # subsystem_name = "xts" diff --git a/multimedia/media/media_js_standard/videoRecorder/BUILD.gn b/multimedia/media/media_js_standard/videoRecorder/BUILD.gn index 70b02227b0b8de86f79bfee1629e79d88ece57b2..4dea1927648abf64aebfba96842069ad9ffd5f49 100644 --- a/multimedia/media/media_js_standard/videoRecorder/BUILD.gn +++ b/multimedia/media/media_js_standard/videoRecorder/BUILD.gn @@ -25,6 +25,8 @@ ohos_js_hap_suite("video_recorder_js_hap") { # ] certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsVideoRecorderJsTest" + subsystem_name = "multimedia" + part_name = "multimedia_player_framework" # part_name = "prebuilt_hap" # subsystem_name = "xts"