录屏分享代码,请求大佬指点一下
527 浏览2021年02月03日作者:化王成帅

本意是想自己写一个弹框,然后分享录屏,目前我的代码如下

shareAppMessageVideo(videoPath) {//videoPath为ttfile://temp/shareVideo.mp4
    console.log("分享视频,其路径如下:" + videoPath);
    tt.showModal({
        title: "分享棋局",
        content: "分享录屏",
        success: res => {
            if (res.confirm) {
                tt.shareAppMessage({
                    title: "分享录屏",
                    desc: "测试描述",
                    extra: {
                        videoPath: videoPath
                    },
                    success() {
                        console.log("分享视频成功");
                    },
                    fail(e) {
                        console.log("分享视频失败");
                    }
                });
            }
        }
    })
}

我这样写还缺少什么

最后一次编辑于 2021 年 02 月 04 日
1 条评论

相关文章

专题推荐

热门文章

热门问答