未验证 提交 212dc211 编写于 作者: 丁冬冬 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-avsession.md.

Signed-off-by: N丁冬冬 <dingdongdong4@huawei.com>
上级 ee3914ba
......@@ -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}`);
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册