GameRecorderManager.recordClip(Objectobject)记录精彩的视频片段,调用时必须是正在录屏,可以多次调用,记录不同时刻。在结束录屏时,可以调用clipVideo接口剪辑并合成记录的片段。
输入属性类型默认值是否必填说明timeRangeArray[3,3]否数组的值表示记录这一时刻的前后时间段内的视频,单位是s
示例constrecorder=tt.getGameRecorderManager();recorder.start({duration:30,})//记录当前时刻前三秒,后三秒,支持多次调用recorder.recordClip({timeRange:[3,3]})recorder.onStop(({videoPath})={recorder.clipVideo({path:videoPath,success(res){console.log(res.videoPath);}})})了解更多