# LivePlayerContext.snapshot(Object object)

> 基础库 2.7.1 开始支持，低版本需做[兼容处理](1003706)。

> __以 [Promise 风格](/miniprogram/dev/framework/app-service/api.md#异步-API-返回-Promise) 调用__：不支持
> 
> __小程序插件__：支持

> 相关文档: [live-player 组件](https://developers.weixin.qq.com/miniprogram/dev/component/live-player.html)

## 功能描述

截图

## 参数

### Object object


```json
[
  {
    "属性": "quality",
    "类型": "string",
    "默认值": "raw",
    "必填": "否",
    "说明": "图片的质量",
    "最低版本": "[2.10.0](1003706)",
    "子项": [
      {
        "合法值": "raw",
        "说明": "原图"
      },
      {
        "合法值": "compressed",
        "说明": "压缩图"
      }
    ]
  },
  {
    "属性": "sourceType",
    "类型": "string",
    "默认值": "stream",
    "必填": "否",
    "说明": "截取的源类型",
    "最低版本": "[2.25.0](1003706)",
    "子项": [
      {
        "合法值": "stream",
        "说明": "截取视频源"
      },
      {
        "合法值": "view",
        "说明": "截取渲染后的画面"
      }
    ]
  },
  {
    "属性": "success",
    "类型": "function",
    "默认值": "",
    "必填": "否",
    "说明": "接口调用成功的回调函数",
    "最低版本": ""
  },
  {
    "属性": "fail",
    "类型": "function",
    "默认值": "",
    "必填": "否",
    "说明": "接口调用失败的回调函数",
    "最低版本": ""
  },
  {
    "属性": "complete",
    "类型": "function",
    "默认值": "",
    "必填": "否",
    "说明": "接口调用结束的回调函数（调用成功、失败都会执行）",
    "最低版本": ""
  }
]
```

#### object.success 回调函数
##### 参数

###### Object res

| 属性 | 类型 | 说明 |
| ---- | ---- | ---- |
| tempImagePath  | string | 图片文件的临时路径 (本地路径) |
| width  | string | 图片的宽度 |
| height  | string | 图片的高度 |
