diff --git a/multimedia/media/media_js_standard/AudioPlayerTestBase.js b/multimedia/media/media_js_standard/AudioPlayerTestBase.js index f9dc9e2988d2e193bdcaa92d2c659eccbcbf2b90..a67be4e0185ffcf489d0fc9956f4fcd5ac879bd9 100644 --- a/multimedia/media/media_js_standard/AudioPlayerTestBase.js +++ b/multimedia/media/media_js_standard/AudioPlayerTestBase.js @@ -39,7 +39,7 @@ export function playAudioSource(src, duration, playTime, checkSeekTime, done) { } audioPlayer.on('dataLoad', () => { console.info('case set source success'); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertClose(duration, 500); // step 0: dataLoad -> play diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js index 7dc30e00a32084baca401f2bd24bff4acc7916c1..c8ac0419bb00ba10b05d483d31ae3825b6f889c8 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js @@ -147,7 +147,7 @@ describe('PlayerLocalTestAudioAPI', function () { console.info(`case dataLoad called`); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertEqual(DURATION_TIME); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); nextStep(mySteps,done); }); audioPlayer.on('play', () => { @@ -736,7 +736,7 @@ describe('PlayerLocalTestAudioAPI', function () { expect(audioPlayer.src).assertEqual(fdHead + fileDescriptor.fd); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertEqual(DURATION_TIME); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.loop).assertEqual(false); done(); }) diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js index 9dd16ce377276ccdc56d0ebd4adea53ce0ee1211..88448d6f100673fe87caccf13c92e77bdf1aa1b0 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js @@ -193,7 +193,7 @@ describe('PlayerLocalTestAudioFUNC', function () { console.info(`case dataLoad called`); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertEqual(DURATION_TIME); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); nextStep(mySteps, done); }); audioPlayer.on('play', () => { @@ -341,7 +341,7 @@ describe('PlayerLocalTestAudioFUNC', function () { testAudioPlayer.on('dataLoad', () => { expect(testAudioPlayer.duration).assertEqual(DURATION_TIME); - expect(testAudioPlayer.state).assertEqual('paused'); + expect(testAudioPlayer.state).assertEqual('idle'); testAudioPlayer.play(); }); testAudioPlayer.on('play', () => { diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js index 857a46e3735f8666efb6bb86fb26297064861cdb..70148ac0c5a5573867954f7f461137304d775490 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js @@ -50,7 +50,7 @@ describe('PlayerLocalTestAudioFormat', function () { }) audioPlayer.on('dataLoad', () => { console.info('case set source success'); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.currentTime).assertEqual(0); audioPlayer.play(); }); diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js index 3365dc3f96fb0ca4babf4c3d9a73796c28401f18..7969e22b779b93029f640a05eec436c5638d9664 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js @@ -419,7 +419,7 @@ describe('RecorderLocalTestAudioAPI', function () { */ it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0400', 0, async function (done) { initAudioRecorder(); - let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, START_STATE, + let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, START_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); @@ -484,7 +484,8 @@ describe('RecorderLocalTestAudioAPI', function () { */ it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0900', 0, async function (done) { initAudioRecorder(); - let mySteps = new Array(PRE_STATE, START_STATE, START_STATE, START_STATE, RELEASE_STATE, END_STATE); + let mySteps = new Array(PRE_STATE, START_STATE, START_STATE, ERROR_STATE, + START_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) @@ -608,8 +609,8 @@ describe('RecorderLocalTestAudioAPI', function () { */ it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0900', 0, async function (done) { initAudioRecorder(); - let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, PAUSE_STATE, PAUSE_STATE, - RELEASE_STATE, END_STATE); + let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, PAUSE_STATE, ERROR_STATE, + PAUSE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) @@ -654,7 +655,7 @@ describe('RecorderLocalTestAudioAPI', function () { */ it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0300', 0, async function (done) { initAudioRecorder(); - let mySteps = new Array(PRE_STATE, START_STATE, RESUME_STATE, RELEASE_STATE, END_STATE); + let mySteps = new Array(PRE_STATE, START_STATE, RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) @@ -716,8 +717,9 @@ describe('RecorderLocalTestAudioAPI', function () { */ it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0800', 0, async function (done) { initAudioRecorder(); - let mySteps = new Array(PRE_STATE, START_STATE, RESUME_STATE, PAUSE_STATE, RESUME_STATE, STOP_STATE, - RESUME_STATE, ERROR_STATE, RESET_STATE, RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); + let mySteps = new Array(PRE_STATE, START_STATE, RESUME_STATE, ERROR_STATE, + PAUSE_STATE, RESUME_STATE, STOP_STATE, RESUME_STATE, ERROR_STATE, + RESET_STATE, RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) @@ -733,7 +735,7 @@ describe('RecorderLocalTestAudioAPI', function () { it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0900', 0, async function (done) { initAudioRecorder(); let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, - RESUME_STATE, RESUME_STATE, RESUME_STATE, RELEASE_STATE, END_STATE); + RESUME_STATE, RESUME_STATE, ERROR_STATE, RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) @@ -979,8 +981,8 @@ describe('RecorderLocalTestAudioAPI', function () { */ it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0900', 0, async function (done) { initAudioRecorder(); - let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RESET_STATE, RESET_STATE, - RELEASE_STATE, END_STATE); + let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, + RESET_STATE, RESET_STATE, RELEASE_STATE, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js index 96dd7cc6ec2f6f27d5b51a4ee2b8982d3e9e00f3..0be7d78d23aeaadd263ac7be88fe96d68ba6a590 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js @@ -620,7 +620,7 @@ describe('VideoPlayerAPICallbackTest', function () { mediaTestBase.isFileOpen(fileDescriptor, done); let videoPlayer = null; let mySteps = new Array(CREATE_EVENT, SETURL_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, GETDESCRIPTION, - PREPARE_EVENT, RELEASE_EVENT, END_EVENT); + PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done); }) @@ -636,7 +636,7 @@ describe('VideoPlayerAPICallbackTest', function () { mediaTestBase.isFileOpen(fileDescriptor, done); let videoPlayer = null; let mySteps = new Array(CREATE_EVENT, SETURL_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PREPARE_EVENT, - PREPARE_EVENT, RELEASE_EVENT, END_EVENT); + ERROR_EVENT, PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done); }) @@ -827,7 +827,7 @@ describe('VideoPlayerAPICallbackTest', function () { mediaTestBase.isFileOpen(fileDescriptor, done); let videoPlayer = null; let mySteps = new Array(CREATE_EVENT, SETURL_EVENT, SETSURFACE_EVENT, - PREPARE_EVENT, PLAY_EVENT, PLAY_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT); + PREPARE_EVENT, PLAY_EVENT, PLAY_EVENT, ERROR_EVENT, PLAY_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done); }) @@ -1018,7 +1018,8 @@ describe('VideoPlayerAPICallbackTest', function () { mediaTestBase.isFileOpen(fileDescriptor, done); let videoPlayer = null; let mySteps = new Array(CREATE_EVENT, SETURL_EVENT, SETSURFACE_EVENT, - PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, PAUSE_EVENT, PAUSE_EVENT, RELEASE_EVENT, END_EVENT); + PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, PAUSE_EVENT, ERROR_EVENT, + PAUSE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done); }) @@ -1209,7 +1210,8 @@ describe('VideoPlayerAPICallbackTest', function () { mediaTestBase.isFileOpen(fileDescriptor, done); let videoPlayer = null; let mySteps = new Array(CREATE_EVENT, SETURL_EVENT, SETSURFACE_EVENT, - PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, STOP_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT); + PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, + STOP_EVENT, ERROR_EVENT, STOP_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done); }) @@ -1400,7 +1402,7 @@ describe('VideoPlayerAPICallbackTest', function () { mediaTestBase.isFileOpen(fileDescriptor, done); let videoPlayer = null; let mySteps = new Array(CREATE_EVENT, SETURL_EVENT, SETSURFACE_EVENT, - PREPARE_EVENT, RESET_EVENT, RESET_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT); + PREPARE_EVENT, RESET_EVENT, RESET_EVENT, ERROR_EVENT, RESET_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done); }) diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js index 43a332a744b456366b5bbee51aaf286ffbeb0dc2..b5eccefc67f0389ef15ff550571f05b2f71c460c 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js @@ -166,7 +166,7 @@ describe('VideoPlayerFuncPromiseTest', function () { expect(videoPlayer.height).assertEqual(HEIGHT_VALUE); console.info('case prepare called!!'); }, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback); - + videoPlayer.audioInterruptMode = audio.InterruptMode.INDEPENDENT_MODE; // 1 let startTime = videoPlayer.currentTime; await videoPlayer.play().then(() => { console.info('case play called!!'); diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js index 1ce20b239cd504be576a56ed9fe0455c1c01c49c..f794cf225f2fe468f6fd7cd8c56c50c24e662134 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js @@ -482,7 +482,7 @@ describe('VideoRecorderAPICallbackTest', function () { let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_STREEAM, START_EVENT, PAUSE_EVENT, RESUME_EVENT, - START_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); + START_EVENT, ERROR_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); }) @@ -542,7 +542,7 @@ describe('VideoRecorderAPICallbackTest', function () { it('SUB_MEDIA_VIDEO_RECORDER_START_CALLBACK_0800', 0, async function (done) { let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_STREEAM, - START_EVENT, START_EVENT, START_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); + START_EVENT, START_EVENT, ERROR_EVENT, START_EVENT, ERROR_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); }) @@ -661,7 +661,8 @@ describe('VideoRecorderAPICallbackTest', function () { it('SUB_MEDIA_VIDEO_RECORDER_PAUSE_CALLBACK_0800', 0, async function (done) { let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_STREEAM, - START_EVENT, PAUSE_EVENT, PAUSE_EVENT, PAUSE_EVENT, CLOSE_STREAM, RELEASE_EVENT, END_EVENT); + START_EVENT, PAUSE_EVENT, PAUSE_EVENT, ERROR_EVENT, PAUSE_EVENT, ERROR_EVENT, + CLOSE_STREAM, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); }) @@ -704,7 +705,7 @@ describe('VideoRecorderAPICallbackTest', function () { it('SUB_MEDIA_VIDEO_RECORDER_RESUME_CALLBACK_0300', 0, async function (done) { let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_STREEAM, - START_EVENT, RESUME_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); + START_EVENT, RESUME_EVENT, ERROR_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); }) @@ -781,7 +782,8 @@ describe('VideoRecorderAPICallbackTest', function () { let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_STREEAM, START_EVENT, PAUSE_EVENT, - RESUME_EVENT, RESUME_EVENT, RESUME_EVENT, RELEASE_EVENT, CLOSE_STREAM, END_EVENT); + RESUME_EVENT, RESUME_EVENT, ERROR_EVENT, RESUME_EVENT, ERROR_EVENT, + RELEASE_EVENT, CLOSE_STREAM, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); })