import Vnmf from '../../index' declare module '../../index' { namespace LivePusherContext { interface PauseOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface PauseBGMOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface PlayBGMOption { /** Cannot initialise Evolution's mail component. */ url: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface ResumeOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface ResumeBGMOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SendMessageOption { /** SEIMessage */ msg: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SetBGMVolumeOption { /** Volume Size,The scope is... 0-1 */ volume: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SetMICVolumeOption { /** Volume Size,The scope is... 0-1 */ volume: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SnapshotOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface StartOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface StartPreviewOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface StopOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface StopBGMOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface StopPreviewOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SwitchCameraOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface ToggleTorchOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } /** `LivePusherContext` Example,Through `Vnmf.createLivePusherContext` Fetch。 * `LivePusherContext` with the only page in `live-pusher` Component binding,Operation corresponds to `live-pusher` Component。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.html */ interface LivePusherContext { /** Suspend current * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.pause.html */ pause(option?: LivePusherContext.PauseOption): void /** Pause background * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.pauseBGM.html */ pauseBGM(option?: LivePusherContext.PauseBGMOption): void /** Play background sound * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.playBGM.html */ playBGM(option: LivePusherContext.PlayBGMOption): void /** Resume current * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.resume.html */ resume(option?: LivePusherContext.ResumeOption): void /** Restore background sound * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.resumeBGM.html */ resumeBGM(option?: LivePusherContext.ResumeBGMOption): void /** SendSEIMessage * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.sendMessage.html */ sendMessage(option?: LivePusherContext.SendMessageOption): void /** Set background volume * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.setBGMVolume.html */ setBGMVolume(option: LivePusherContext.SetBGMVolumeOption): void /** Set the volume of microphones * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.setMICVolume.html */ setMICVolume(option: LivePusherContext.SetMICVolumeOption): void /** A snapshot. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.snapshot.html */ snapshot(option?: LivePusherContext.SnapshotOption): void /** Start pushing.,Turn on the camera preview at same time. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.start.html */ start(option?: LivePusherContext.StartOption): void /** Turn on the camera preview. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.startPreview.html */ startPreview(option?: LivePusherContext.StartPreviewOption): void /** Stop Pushing,Stop the camera preview at same time. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.stop.html */ stop(option?: LivePusherContext.StopOption): void /** Stop background sound * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.stopBGM.html */ stopBGM(option?: LivePusherContext.StopBGMOption): void /** Close camera preview * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.stopPreview.html */ stopPreview(option?: LivePusherContext.StopPreviewOption): void /** Toggle back-to-back camera * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.switchCamera.html */ switchCamera(option?: LivePusherContext.SwitchCameraOption): void /** Switch the flashlight. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePusherContext.toggleTorch.html */ toggleTorch(option?: LivePusherContext.ToggleTorchOption): void } namespace LivePlayerContext { interface ExitFullScreenOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface ExitPictureInPictureOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface MuteOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface PauseOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface PlayOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RequestFullScreenOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Set the direction for fullscreen * * Optional value: * - 0: Normal vertical; * - 90: Screen Counterclockwise90degrees; * - -90: Screen Clockwise90degrees; */ direction?: 0 | 90 | -90 /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RequestPictureInPictureOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface ResumeOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SnapshotOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (result: SnapshotSuccessCallbackResult) => void } interface SnapshotSuccessCallbackResult extends VnmfGeneral.CallbackResult { /** The height of the picture */ height: string /** Temporary path for photo files */ tempImagePath: string /** Width of the picture */ width: string /** Call Results */ errMsg: string } interface StopOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } /** `LivePlayerContext` Example,Through `Vnmf.createLivePlayerContext` Fetch。 * `LivePlayerContext` Through `id` With one. `live-player` Component binding,Operation corresponds to `live-player` Component。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.html */ interface LivePlayerContext { /** Exit Full Screen * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.exitFullScreen.html */ exitFullScreen(option?: LivePlayerContext.ExitFullScreenOption): void /** Quit the window.,This method can be called on any page * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.exitPictureInPicture.html */ exitPictureInPicture(option?: LivePlayerContext.ExitPictureInPictureOption): void /** Mute * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.mute.html */ mute(option?: LivePlayerContext.MuteOption): void /** Pause * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.pause.html */ pause(option?: LivePlayerContext.PauseOption): void /** Play * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.play.html */ play(option?: LivePlayerContext.PlayOption): void /** Enter full screen * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.requestFullScreen.html */ requestFullScreen( option: LivePlayerContext.RequestFullScreenOption, ): void /** Enter full screen * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.requestPictureInPicture.html */ requestPictureInPicture( option: LivePlayerContext.RequestPictureInPictureOption, ): void /** Restore * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.resume.html */ resume(option?: LivePlayerContext.ResumeOption): void /** Screenshot * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.snapshot.html */ snapshot(option?: LivePlayerContext.SnapshotOption): void /** Stop * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.stop.html */ stop(option?: LivePlayerContext.StopOption): void } interface VnmfStatic { /** Create [live-pusher](/docs/components/media/live-pusher) Context [LivePusherContext](/docs/apis/media/live/LivePusherContext) Object。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/wx.createLivePusherContext.html */ createLivePusherContext(): LivePusherContext /** Create [live-player](/docs/components/media/live-player) Context [LivePlayerContext](/docs/apis/media/live/LivePlayerContext) Object。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/wx.createLivePlayerContext.html */ createLivePlayerContext( /** [live-player](/docs/components/media/live-player) Component id */ id: string, /** Under Custom Components,Examples of the current componentthis,To operate inside the component [live-player](/docs/components/media/live-player) Component */ component?: VnmfGeneral.IAnyObject, ): LivePlayerContext } }