LjDySdk.onStartRecordOnly(myBehaviour, 5, new MyShareNotify());
LjDySdk.stopGameRecord(myBehaviour);
LjDySdk.onStartRecordAndShare(myBehaviour, 5, new MyShareNotify(), "这是标题", "这是话题", "描述" );
| 参数 | 类型 | 描述 | 是否必填 |
| behaviour | Behaviour | 可以走请求的封装对象 | 是 |
| seconds | int | 录屏多少秒自动暂停 | 否 |
| notify | ShareNotify | 回调通知的方法 | 否 |
| title | string | 分享标题 | 否 |
| topics | string | 话题 | 否 |
| desc | string | 分享描述 | 否 |
事例:建议在关卡结束或恰当时机调用结束录屏方法,此处用的延迟
// 调用录屏5秒后自动分享的参数传参
LjDySdk.onStartRecordAndShare(myBehaviour, 5, new MyShareNotify(), "这是标题", "这是话题", "描述" );
class MyShareNotify : ShareResultNotify
{
public void notifyOnSuccess(string flag)
{
//flag!="success" 则为录屏的视频路径
DySdkLog.Log("MyShareNotify notifyOnSuccess flag=" + flag);
}
public void notifyOnFail()
{
DySdkLog.Log("MyShareNotify notifyOnFail");
}
public void notifyOnCancel()
{
DySdkLog.Log("MyShareNotify notifyOnCancel");
}
}