W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
跳轉(zhuǎn)到分享的視頻播放頁面
繼承標(biāo)準(zhǔn)對象輸入, 擴展屬性描述:
屬性 | 數(shù)據(jù)類型 | 默認(rèn)值 | 是否必填 | 描述 |
---|---|---|---|---|
videoId | string | - | 是 | tt.shareAppMessage分享視頻成功后返回 |
fail 回調(diào)函數(shù)返回的錯誤代碼:
errCode | 描述 |
---|---|
1001 | videoId 類型不正確 |
1002 | 視頻已經(jīng)被刪除 |
1003 | videoId 不正確 |
1004 | 獲取視頻信息錯誤 |
1005 | 其他錯誤 |
1006 | 網(wǎng)絡(luò)錯誤 |
1007 | 端上其他錯誤 |
1008 | 端上參數(shù)錯誤 |
tt.shareAppMessage({
channel: "video",
title: "測試分享視頻",
desc: "測試描述",
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號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: