{"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"dist":{"shasum":"b096ecef268cb53f66fbc1c3c0dcfa883388093b","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.5-beta.tgz","fileCount":108,"integrity":"sha512-p9Uhi3WMQEngxLTght5jmbnETh/juPb9VFCLWpE/A2ZI/nIxeH8mnnYS8McM1KY5ngVL3gJY4qxd4CQbb0lxxg==","signatures":[{"sig":"MEUCIQCrWSD26ibVX8jeygpiXem13S5kFXT0f6S0QB1JK+mzwQIgOjlsPwzeR6gcn3qmQKCjvto9F3SIsemEBYRs3wqFSmA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHHBoCRA9TVsSAnZWagAAgRAP/jqq8PKb4vD3YuDHs39k\nJV1VkK59rpdGmgrh4HUH9BdvrUEF711CVAJPiKmVjjYAcj7vrlfeQesZepeS\n4ZzEt0p+9rlwDtlPMYU2DsHdz5bIMqpF3ovVev42LGi38ExHTD/WXBzVBgwc\n009JPG1ezLqwsxbd+HPwFb0AsdRk7hh31/sCOhTmfX64kl8ZlqsQY3R//39j\ntW8B2ZDhoucTwNLwkriTNJCb2DjOBQF7ZtQ9pBSv0fwNbZBbaINb074hKj8D\nyGKq4FzrGDdJSVOjACSojSAa087NLA+DPaS1xAYm+gkiTDS3ZRwAzB1tj6b2\nCaL7D+JmQQ07R9493ieqM+PwzDOuQFg8KdVwbY+/4qxk90yd5C/KfRQEts9A\nBs/oX0zO5dKBws2XETwXxp4IHzGJOD7xN9yZbiBD28+uttEffPs99uUOwLIu\n7KGQdcZkDdokKMyWSWcGmSNeusHon2aG/cXukJRM6gNd1yOoVIfj4NXsh9AE\neGSIlZU0CVubhxdqRd8bMGGxyHFPyEESTiWHHTrt0m5PmrKnQNGsTuC1Kmbm\noC4Zuoevo9kWQ6ehlVhsESU6RieE+ywLxtpqrgw2dIlKHqa2TOP2N8t8r1pK\nlcIqnyAc1b964uKcRvlsaWJxE3COmztLkyOd3j9oZvg2sLUZTUNw0JposjBz\nbNqg\r\n=bDcI\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"},"_hasShrinkwrap":false,"readmeFilename":"README.en-US.md","_npmOperationalInternal":{"tmp":"tmp/video_1.0.5-beta_1629253735888_0.5667491594928307","host":"s3://npm-registry-packages"},"_id":"@uni/video@1.0.5-beta","version":"1.0.5-beta"}