Promise GameRecorder.abort()

基础库 2.8.0 开始支持,低版本需做兼容处理

放弃录制游戏画面。此时已经录制的内容会被丢弃。

返回值

Promise

录制中断的 Promise

错误

错误码错误信息说明
wx.error.GameRecorder_UnknownErrorunknown error未知错误,没有被归纳到的错误
wx.error.GameRecorder_InternalFailedinternal failed游戏画面录制 SDK 内部错误
wx.error.GameRecorder_NotSupportedframe not supported当前设备不支持录制游戏画面
wx.error.GameRecorder_StartDurationInvalidduration invalidduration 参数不合法
wx.error.GameRecorder_StartBitRateInvalidbitrate invalidbitrate 参数不合法
wx.error.GameRecorder_StartFPSInvalidfps invalidfps 参数不合法
wx.error.GameRecorder_StartGOPInvalidgop invalidgop 参数不合法
wx.error.GameRecorder_StartWhileAlreadyStartRecordingstart while already start recording在已经开始录制的情况下调用 start
wx.error.GameRecorder_StartWhilePausedstart while already paused在已经暂停录制的情况下调用 start,此时只能调用 resume 恢复录制
wx.error.GameRecorder_PauseWhileNotStartRecordingpause while not start recording在还没有开始录制的情况下调用 pause
wx.error.GameRecorder_PauseWhileAlreadyPausedpause while already paused在已经暂停录制的情况下调用 pause
wx.error.GameRecorder_ResumeWhileNotStartRecordingresume while not start recording在还没有开始录制的情况下调用 resume
wx.error.GameRecorder_ResumeWhileRecordingresume while recording在录制中调用 resume,调用 resume 只能在暂停状态下
wx.error.GameRecorder_AbortWhileNotStartRecordingabort while not start recording在还没有开始录制的情况下调用 abort
wx.error.GameRecorder_StopWhileNotStartRecordingstop while not start recording在还没有开始录制的情况下调用 stop
wx.error.GameRecorder_NoVideono recorded video在还没有一个录制好的对局回放的情况下发起分享
wx.error.GameRecorder_BGMNotFoundbgm not foundshare.bgm 指定的额背景音乐不存在
wx.error.GameRecorder_TimeRangeInvalidtime range invalidshare.timeRange 不合法
wx.error.GameRecorder_EditDurationOutOfLimitduration out of limitshare.timeRange 的所有片段的总和超出上限
wx.error.GameRecorder_TimeRangeTooShorttime range too short.It should be longer than 2sshare.timeRange 太短