{"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"dist":{"shasum":"7d7cb1ca114019d7184988e0eb0ad84bc9f4e9a0","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.5-beta1.tgz","fileCount":108,"integrity":"sha512-V7xDnEXraC1l+yna7AsAopDhpFcf9qhiDhZD+GwpUf0YT9yWc35cGLBiuFLZOoIQtGhC4iEsxce5vJzYXjtv3w==","signatures":[{"sig":"MEYCIQDk8OCmUZF/bOIRO8yGWAGSg+rgp25jDMDdNOyOvVlT/wIhAPuKsdKQQbtgBrpalGBhf0ozGhS3aQzCz6dY+3xYyHPc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHHr8CRA9TVsSAnZWagAA3q8P/RmdEUTGp/VVyZSPTSwG\nimeFhBgVvAxk+r8nQcBceekDwjAwttZM6s/MAhsSzI02gRs0YqaBOKFmII9y\nc/qJfNH7AC425WiIfqaghAckwq1X3SfIK1LoOnMqcKk2EYgdOjuAF6YhVeZi\nbEXNuod3FPpeVDUQ1KzLUVBCOU9BRUv4p1RCHN+wIOB1c+AoqPjK7nmHe0TB\ngIxPIQWcPCGyiX7cu+bZYkITipeFGnhNBJ5ujPZG+KW323oyMzw5D7j7uraz\noxs9RbJXbVAR9Hbo92N/byWtsfxPdh8KUqpPi+BrknpBZtrK8wMs6eMqgyzI\n3guiUCNoNuV9F36sutw3PTjDs1RYflPq9jH+xhyWsdQwLhOjWtNjNlWMyfIo\nd6Atq8/bIw6zdkTlWEzZWuiKgxR/wzm2KaqqK9x6LCZYliD88GpINOXJ+HJH\nsrfwGjIeleRpnWWCMhUiu/iMa9VdsCpSZi7ojL8kVcNBgGftOjOmBvzSkFN0\nOUA3Y5QPCqb66969UP+Lm7pO+3rWPu9KEQHw0HkeiZ4WYxUiFINtKYZhjyQB\nJfuN9yZ+0nkqdAtsjveu2/7HjWB8P2dqYXRef+8+gMu+LCw7mBYjdd4gQ6w0\nMuZ6PV7FV1M5kUK//UB+x8FzJz5EOUDNGy+8OZKlMBZgLx8BPPgw+cSvn5Iw\n4ocv\r\n=F8o+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@uni/video","unpkg":"dist/index.js","author":{"name":"rax"},"module":"es/index.js","readme":"# chooseVideo \n\n [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)\n\nTakes a video or selects a video from the mobile album.\n\n## Supported\n\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\" /> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"bytedanceMicroApp\" /> <img alt=\"baiduSmartProgram\" src=\"https://img.alicdn.com/imgextra/i4/O1CN01jngdBb24yGv2Fu34G_!!6000000007459-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"baiduSmartProgram\" /> <img alt=\"kuaiShouMiniProgram\" src=\"https://gw.alicdn.com/imgextra/i4/O1CN01kzmJMM24jcFEzp5Wv_!!6000000007427-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"KuaiShouMiniProgram\" />\n\n## Install\n\n```bash\n$ npm install @uni/video --save\n```\nor\n```bash\n$ npm install @uni/apis --save\n```\n## Usage\n\n```javascript\nimport { chooseVideo } from '@uni/video';\n\nchooseVideo({\n  sourceType: ['album', 'camera'],\n  compressed: true,\n  camera: 'back',\n  maxDuration: 100,\n  success (res) {\n    console.log(res);\n  }\n});\n\n// promise\nchooseVideo({\n  sourceType: ['camera'],\n  compressed: false,\n  camera: 'front',\n  maxDuration: 20,\n}).then(res => {\n  console.log(res);\n});\n\n```\n\nYou can also import from the big package：\n```js\nimport { video } from '@uni/apis';\n\nvideo.chooseVideo({\n  sourceType: ['album', 'camera'],\n  compressed: true,\n  camera: 'back',\n  maxDuration: 100,\n  success (res) {\n    console.log(res);\n  }\n});\n\n// promise\nvideo.chooseVideo({\n  sourceType: ['camera'],\n  compressed: false,\n  camera: 'front',\n  maxDuration: 20,\n}).then(res => {\n  console.log(res);\n});\n\n```\n\n## Methods\n\n### `chooseVideo(options)`\n\n#### Arguments\n\n| Property | Type | Description | required | Default |\n| --- | --- | --- | --- | --- |\n| options | `object`  |  | ✘ | - |\n| options.sourceType | `Array<string>`  | The source of the video | ✘ | ['album', 'camera'] |\n| options.maxDuration | `number` | The maximum duration of a recorded video | ✘ | 60 |\n| options.success | `Function`  | The callback function for a successful API call | ✘ | - |\n| options.fail | `Function`  | The callback function for a failed API call | ✘ | - |\n| options.complete | `Function`  | The callback function used when the API call completed (always executed whether the call succeeds or fails) | ✘ | - |\n\n#### Special Arguments\n\n| Property | Type | Description | required | Default | Supported |\n| --- | --- | --- | --- | --- | -- |\n| options.camera | `string`  | Indicates the default camera to be enabled. can be 'back' or 'front' | ✘ | 'back' | <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"bytedanceMicroApp\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\" /> <img alt=\"baiduSmartProgram\" src=\"https://img.alicdn.com/imgextra/i4/O1CN01jngdBb24yGv2Fu34G_!!6000000007459-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"baiduSmartProgram\" /> <img alt=\"kuaiShouMiniProgram\" src=\"https://gw.alicdn.com/imgextra/i4/O1CN01kzmJMM24jcFEzp5Wv_!!6000000007427-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"KuaiShouMiniProgram\" /> |\n| options.compressed | `boolean`  | Indicates whether to compress the selected video file | ✘ | true | <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"bytedanceMicroApp\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\" /> <img alt=\"baiduSmartProgram\" src=\"https://img.alicdn.com/imgextra/i4/O1CN01jngdBb24yGv2Fu34G_!!6000000007459-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"baiduSmartProgram\" /> <img alt=\"kuaiShouMiniProgram\" src=\"https://gw.alicdn.com/imgextra/i4/O1CN01kzmJMM24jcFEzp5Wv_!!6000000007427-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"KuaiShouMiniProgram\" /> |\n\n#### Return\n\n| Property | Type | Description |\n| --- | --- | --- |\n| tempFilePath | `string`  | Temporary file path of the selected video |\n| duration | `number` | Duration of the selected video |\n| size | `number` | Amount of data of the selected video |\n| width | `number` | Returns the height of the selected video |\n| height | `number` | Returns the width of the selected video |\n\n# createVideoContext \n\n [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)\n\nCreates the VideoContext object for the video.\n\n## Supported\n\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\" /> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"bytedanceMicroApp\" /> <img alt=\"baiduSmartProgram\" src=\"https://img.alicdn.com/imgextra/i4/O1CN01jngdBb24yGv2Fu34G_!!6000000007459-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"baiduSmartProgram\" /> <img alt=\"kuaiShouMiniProgram\" src=\"https://gw.alicdn.com/imgextra/i4/O1CN01kzmJMM24jcFEzp5Wv_!!6000000007427-2-tps-200-200.png\" width=\"25px\" height=\"25px\" title=\"KuaiShouMiniProgram\" />\n\n## Install\n\n```bash\n$ npm install @uni/video --save\n```\nor\n```bash\n$ npm install @uni/apis --save\n```\n## Usage\n\n```javascript\nimport { createVideoContext } from '@uni/video';\n\nconst videoContext = createVideoContext('videoId');\n\n```\n\n\nYou can also import from the big package：\n```js\nimport { video } from '@uni/apis';\n\nconst videoContext = video.createVideoContext('videoId');\n\n```\n\n## Methods\n\n### `createVideoContext(id, context)`\n\n#### Arguments\n\n| Property | Type | Description | required | Default |\n| --- | --- | --- | --- | --- |\n| id | `string`  | The video components ID | ✔ |  - |\n| context | `object`  | The this object of the current component instance in custom components. It is used with the video component（only for wechat and bytedance） | ✘ | - |\n\n#### Return\n\n| Property | Type | Description |\n| --- | --- | --- |\n| videoContext | `VideoContext` | VideoContext is bound to an video component with an id, to work with the video component. |\n","exports":{".":{"web":"./es/web/index.js","default":"./es/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js"},"./":"./"},"license":"BSD-3-Clause","typings":"types/index.d.ts","_npmUser":{"name":"bunko","email":"2leg@immaster.cn"},"homepage":"https://github.com/raxjs/universal-api#readme","repository":{"url":"git+ssh://git@github.com/raxjs/universal-api.git","type":"git"},"_npmVersion":"7.15.1","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"sideEffects":false,"_nodeVersion":"16.3.0","dependencies":{"@uni/action-sheet":"^1.0.7-beta"},"_hasShrinkwrap":false,"readmeFilename":"README.en-US.md","_npmOperationalInternal":{"tmp":"tmp/video_1.0.5-beta1_1629256444048_0.03717858400754803","host":"s3://npm-registry-packages"},"_id":"@uni/video@1.0.5-beta1","version":"1.0.5-beta1"}