From ecd146312f14d0fb596496d325a40b265f067cab Mon Sep 17 00:00:00 2001 From: fulizhong Date: Thu, 24 Nov 2022 15:21:52 +0800 Subject: [PATCH] modify testcase Signed-off-by: FULIZHONG Signed-off-by: fulizhong --- .../media_js_standard/VideoRecorderTestBase.js | 16 ++++++++-------- .../js/test/VideoPlayerFuncCallbackTest.test.js | 4 ++-- .../js/test/VideoPlayerFuncPromiseTest.test.js | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/multimedia/media/media_js_standard/VideoRecorderTestBase.js b/multimedia/media/media_js_standard/VideoRecorderTestBase.js index f2eaaf5aa..0817c34f8 100644 --- a/multimedia/media/media_js_standard/VideoRecorderTestBase.js +++ b/multimedia/media/media_js_standard/VideoRecorderTestBase.js @@ -64,17 +64,17 @@ export async function stopCaptureSession(captureSession) { export function getTrackArray(videoType, recorderConfigFile, sourceType) { if (videoType == AUDIO_VIDEO_TYPE) { let audioTrack = new Array(recorderConfigFile.audioBitrate, recorderConfigFile.audioChannels, - 'audio/mpeg', recorderConfigFile.audioSampleRate); + 'audio/mp4a-latm', recorderConfigFile.audioSampleRate); let videoTrack = null; if (sourceType == media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_ES) { - videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight, + videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight, recorderConfigFile.videoFrameWidth); } else { if (recorderConfigFile.videoCodec == 'video/avc') { - videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight, + videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight, recorderConfigFile.videoFrameWidth); } else { - videoTrack = new Array('video/mpeg', recorderConfigFile.videoFrameHeight, + videoTrack = new Array('video/mp4v-es', recorderConfigFile.videoFrameHeight, recorderConfigFile.videoFrameWidth); } } @@ -83,14 +83,14 @@ export function getTrackArray(videoType, recorderConfigFile, sourceType) { } else if (videoType == ONLYVIDEO_TYPE) { let videoTrack = null; if (sourceType == media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_ES) { - videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight, + videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight, recorderConfigFile.videoFrameWidth); } else { if (recorderConfigFile.videoCodec == 'video/avc') { - videoTrack = new Array('video/x-h264', recorderConfigFile.videoFrameHeight, + videoTrack = new Array('video/avc', recorderConfigFile.videoFrameHeight, recorderConfigFile.videoFrameWidth); } else { - videoTrack = new Array('video/mpeg', recorderConfigFile.videoFrameHeight, + videoTrack = new Array('video/mp4v-es', recorderConfigFile.videoFrameHeight, recorderConfigFile.videoFrameWidth); } } @@ -98,7 +98,7 @@ export function getTrackArray(videoType, recorderConfigFile, sourceType) { return trackArray; } else { let audioTrack = new Array(recorderConfigFile.audioEncodeBitRate, recorderConfigFile.numberOfChannels, - 'audio/mpeg', recorderConfigFile.audioSampleRate); + 'audio/mp4a-latm', recorderConfigFile.audioSampleRate); let trackArray = new Array(audioTrack); return trackArray; } diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js index a36db93ed..a74e1a4e0 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js @@ -236,8 +236,8 @@ describe('VideoPlayerFuncCallbackTest', function () { 'track_index', 'track_type', 'width'); let audioTrackKey = new Array('bitrate', 'channel_count', 'codec_mime', 'sample_rate', 'track_index', 'track_type'); - let videoTrackValue = new Array(1366541, 'video/x-h264', 6000, 480, 0, 1, 720); - let audioTrackValue = new Array(129207, 2, 'audio/mpeg', 44100, 1, 0); + let videoTrackValue = new Array(1366541, 'video/avc', 6000, 480, 0, 1, 720); + let audioTrackValue = new Array(129207, 2, 'audio/mp4a-latm', 44100, 1, 0); let descriptionKey = new Array(videoTrackKey, audioTrackKey); let descriptionValue = new Array(videoTrackValue, audioTrackValue); videoPlayer.getTrackDescription((err, arrlist) => { 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 b94714280..47fee6e15 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 @@ -480,8 +480,8 @@ describe('VideoPlayerFuncPromiseTest', function () { 'track_index', 'track_type', 'width'); let audioTrackKey = new Array('bitrate', 'channel_count', 'codec_mime', 'sample_rate', 'track_index', 'track_type'); - let videoTrackValue = new Array(1366541, 'video/x-h264', 6000, 480, 0, 1, 720); - let audioTrackValue = new Array(129207, 2, 'audio/mpeg', 44100, 1, 0); + let videoTrackValue = new Array(1366541, 'video/avc', 6000, 480, 0, 1, 720); + let audioTrackValue = new Array(129207, 2, 'audio/mp4a-latm', 44100, 1, 0); let descriptionKey = new Array(videoTrackKey, audioTrackKey); let descriptionValue = new Array(videoTrackValue, audioTrackValue); await media.createVideoPlayer().then((video) => { -- GitLab