W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
跳轉(zhuǎn)到分享的視頻播放頁面
繼承標(biāo)準(zhǔn)對(duì)象輸入, 擴(kuò)展屬性描述:
屬性 | 數(shù)據(jù)類型 | 默認(rèn)值 | 是否必填 | 描述 |
---|---|---|---|---|
videoId | string | - | 是 | tt.shareAppMessage分享視頻成功后返回 |
fail 回調(diào)函數(shù)返回的錯(cuò)誤代碼:
errCode | 描述 |
---|---|
1001 | videoId 類型不正確 |
1002 | 視頻已經(jīng)被刪除 |
1003 | videoId 不正確 |
1004 | 獲取視頻信息錯(cuò)誤 |
1005 | 其他錯(cuò)誤 |
1006 | 網(wǎng)絡(luò)錯(cuò)誤 |
1007 | 端上其他錯(cuò)誤 |
1008 | 端上參數(shù)錯(cuò)誤 |
tt.shareAppMessage({
channel: "video",
title: "測(cè)試分享視頻",
desc: "測(cè)試描述",
imageUrl: "",
templateId: "", // 替換成通過審核的分享ID
query: "",
extra: {
videoPath: "ttfile://temp/test.mp4", // 可替換成錄屏得到的視頻地址
videoTopics: ["話題1", "話題2"],
withVideoId: true
},
success(res) {
console.log(res.videoId);
console.log("分享視頻成功");
},
fail(e) {
console.log("分享視頻失敗");
}
});
tt.navigateToVideoView({
videoId: "xxxxxx",
success: res => {
console.log("done");
},
fail: err => {
if (err.errCode === 1006) {
tt.showToast({
title: "something wrong with your network"
});
}
}
});
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: