提交 6fa32126 作者: wj

更新文档

上级 aa6355a2
......@@ -435,20 +435,8 @@ class TTSDK {
});
});
}
public addShareEvent = (shareInfo: ShareInfo) => {
if (!this.contrlShareMenu) return;
(tt as any).onShareAppMessage(() => {
const ShareParams = {
title: shareInfo.title,
imageUrl: shareInfo.image,
imageUrlId: shareInfo.imageId,
query: "fromOpenId=" + this.LoginData["openid"] + "&from=share&tag=0&" + (shareInfo.query ? shareInfo.query : ""),
withShareTicket: true,
};
return ShareParams;
});
(tt as any).showShareMenu({ withShareTicket: true });
};
// 抖音没有此接口
public addShareEvent = (shareInfo: ShareInfo, callback?: Function) => { };
public ShareGameInfo = (shareInfo: ShareInfo) => {
// 参数,记录分享的用户openid
......@@ -498,7 +486,7 @@ class TTSDK {
private GameRecorder: any = null;
private videoPath: string = "";
// 创建录屏对象
public createGameRecorder = (startEventCallBack?: any, stopEventCallBack?: any) => {
public createGameRecorder = (startEventCallBack?: Function, stopEventCallBack?: Function, callback?: Function) => {
try {
this.GameRecorder = (tt as any).getGameRecorderManager();
this.GameRecorder.onStart((res: any) => {
......@@ -519,9 +507,11 @@ class TTSDK {
...recorderInfo
});
}
public stopGameRecorder() {
public stopGameRecorder(shareInfo?: any) {
this.GameRecorder.stop();
}
public hideGameRecorderShareButton() { }
public shareVideo = async (shareInfo: ShareInfo) => {
return new Promise((resolve, reject) => {
(tt as any).shareAppMessage({
......@@ -544,9 +534,9 @@ class TTSDK {
}
// 退出小游戏
public exitApp = () => {
(tt as any).exitMiniProgram();
};
public exitApp = () => {
(tt as any).exitMiniProgram();
};
// SDK接口通用参数
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论