From 212dc211a7810a3cbdb6cd218e45089273d4803b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=86=AC=E5=86=AC?= Date: Tue, 29 Nov 2022 13:23:27 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/apis/js-apis-avsession.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 丁冬冬 --- zh-cn/application-dev/reference/apis/js-apis-avsession.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-avsession.md b/zh-cn/application-dev/reference/apis/js-apis-avsession.md index 15fd3d4d86..49801f7909 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-avsession.md +++ b/zh-cn/application-dev/reference/apis/js-apis-avsession.md @@ -56,8 +56,8 @@ let session; let tag = "createNewSession"; let context = featureAbility.getContext(); -await avSession.createAVSession(context, tag, "audio").then((avSession) => { - session = avSession; +await avSession.createAVSession(context, tag, "audio").then((data) => { + session = data; console.info(`CreateAVSession : SUCCESS : sessionId = ${session.sessionId}`); }).catch((err) => { console.info(`CreateAVSession BusinessError: code: ${err.code}, message: ${err.message}`); @@ -97,11 +97,11 @@ let session; let tag = "createNewSession"; let context = featureAbility.getContext(); -avSession.createAVSession(context, tag, "audio", function (err, avSession) { +avSession.createAVSession(context, tag, "audio", function (err, data) { if (err) { console.info(`CreateAVSession BusinessError: code: ${err.code}, message: ${err.message}`); } else { - session = avSession; + session = data; console.info(`CreateAVSession : SUCCESS : sessionId = ${session.sessionId}`); } }); -- GitLab