未验证 提交 559e6e93 编写于 作者: 丁冬冬 提交者: Gitee

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

Signed-off-by: N丁冬冬 <dingdongdong4@huawei.com>
上级 ecddefd4
......@@ -54,10 +54,9 @@ import featureAbility from '@ohos.ability.featureAbility';
let session;
let tag = "createNewSession";
let type = "audio";
let context = featureAbility.getContext();
await avSession.createAVSession(context, tag, type).then((data) => {
await avSession.createAVSession(context, tag, "audio").then((data) => {
session = data;
console.info(`CreateAVSession : SUCCESS : sessionId = ${session.sessionId}`);
}).catch((err) => {
......@@ -96,10 +95,9 @@ import featureAbility from '@ohos.ability.featureAbility';
let session;
let tag = "createNewSession";
let type = "audio";
let context = featureAbility.getContext();
avSession.createAVSession(context, tag, type, function (err, data) {
avSession.createAVSession(context, tag, "audio", function (err, data) {
if (err) {
console.info(`CreateAVSession BusinessError: code: ${err.code}, message: ${err.message}`);
} else {
......@@ -230,10 +228,9 @@ import featureAbility from '@ohos.ability.featureAbility';
let session;
let tag = "createNewSession";
let type = "audio";
let context = featureAbility.getContext();
await avSession.createAVSession(context, tag, type).then((data) => {
await avSession.createAVSession(context, tag, "audio").then((data) => {
session = data;
console.info(`CreateAVSession : SUCCESS : sessionId = ${session.sessionId}`);
}).catch((err) => {
......@@ -283,10 +280,9 @@ import featureAbility from '@ohos.ability.featureAbility';
let session;
let tag = "createNewSession";
let type = "audio";
let context = featureAbility.getContext();
await avSession.createAVSession(context, tag, type).then((data) => {
await avSession.createAVSession(context, tag, "audio").then((data) => {
session = data;
console.info(`CreateAVSession : SUCCESS : sessionId = ${session.sessionId}`);
}).catch((err) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册