{"_id":"@uni/video","_rev":"14-38d69796d43dca8241a00568d80c7ddf","name":"@uni/video","dist-tags":{"beta":"1.0.8-beta.0","latest":"1.0.8"},"versions":{"1.0.0-beta":{"name":"@uni/video","version":"1.0.0-beta","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/env":"^1.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Py8VYiiPiHZFhGRjsDFmhckJF47HuI4sh3m9wBULpIwZ9H0V0wrDIcXJamqrV+CnUaAacjmNqx1KGgcZR3tN8Q==","shasum":"6066073ff3ca0658fb36a2bdc59e6323081eefa1","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.0-beta.tgz","fileCount":78,"unpackedSize":86053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguG+2CRA9TVsSAnZWagAAYeAP/RTCEvGL5qL7oC0U+snX\nsmaMVnUCCSfZWkh0ECjgozFN4i1L+bhEp/lAscKQbJAeyzIfIY+8ShbPlU8a\nW5jrCA3YfijtX+xvtulAyNj4CqI/qT0qCZkX6LqFdJwnqbqAfu9Zwrdfs9yE\n4k+gTmnaebzqAs01CamASk34Mv6Wb7G97pJX8BwfExdyiKvpquOeXNPmMk8b\n91Qv1jH2rBKY4t8yNWGhnjr2P+rR7y3nQ1rnbb/T1iXGURGKQffsprb4gQ0J\nXKbzfaS6u+PGOhbIl8q5EU1VL4s02bVQbq3bMD7/6WVRhgYoPo1wS6aysxlc\nFqKyjL/Zyy1qUBqU76n7sDibu37ReGbYu6h4BnOPah8CVolI3jyZHgsqav+J\nYUerXjpj5hgaU4MafTeBfI3BgV1Iw7hmcxFC6k6QRTWzV9uIGs8arUzsmh7n\n0DPzvIMcEWUICSNc9f5X5xlUQfrC7YIAkFST/nmz9fmf75/b2fF5fLMGrVYp\naF8gg/Tp1PzG5ANDMUHnSAD5S3mgu/lbTxhFurwSob94pu2gr3WoUMsByhbp\nXoPHr6K+DfBTw3vcDuqlZX7zHnEnMNHVDswOVrNy0vo/T+w/6B0Ni9lJovVz\nfhtiVroZSHL3bwW90lBNGNr2NE95+YHc5kdIp1haov6CyAjsmVpZ0GQNJD0v\ncTxR\r\n=0bZV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf83T/Cvrlaig55o9Thjp2Nr8STqYlQO5Yo9jDNc62GQIhANV2YiBLjSsPeLmdcoxQim7ZygONoasVH6lY4fu3sRlb"}]},"_npmUser":{"name":"bunko","email":"2leg@immaster.cn"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.0-beta_1622699958452_0.08617007859471748"},"_hasShrinkwrap":false},"1.0.0-beta1":{"name":"@uni/video","version":"1.0.0-beta1","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"readme":"# chooseVideo \n\n[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![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\">\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| opthons.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\"> |\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\"> |\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/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![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\">\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","readmeFilename":"README.en-US.md","bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.0-beta1","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-Cex9z11fpI1myfy6tlig6MkV31DCUJqX4N/p0ZblkqvnyxHVtlvwz2pHlbGy4VA1Kd0lw9BM5YYevOHEN+EQZQ==","shasum":"1b413cc2bc64ebc2165b12ca8f6e264da25c308a","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.0-beta1.tgz","fileCount":78,"unpackedSize":92695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvgPpCRA9TVsSAnZWagAAj5cQAJn8aTA9tkUw0a+2n7Im\ndXNzMmfPnHVD5IANsCoTxoRSGaHyJiqdlhrEC4gLymeLmtFpxlba0VV200Dn\nMVjaqX/MKECUiH4LoENJS987h/hPagcEloSh09ljepaULcYkwiurMx4Cvlwv\nM/W0nfaXFpOPkHuhXI3h9XesPuQZGKpoZ+inoySFxAym98yD23V4fuAZKLQH\nOvxPJiCYLzE3d9RhllAvEG8rmN4L+b1PGcZN30pSQqdZLUy8euOVDzxXib+j\nqVb+eWksbrBHUpqi+I5emK60FC3xZk5ESyaX8Tghqbd/uES3Uhf7454gxPDb\nbPUquo244+fBH5vko8pjtth/pT0C+iiuYzADgm+NyBqlRL6TcGXDQlIEX/S+\nRPXgG6PFuaS5NZOk08l+BxzLU28Ri2HWdsP9DJSqf9U33RbvIBwlThqu9DcY\nKNdvZprtmtgx4h6H2oW3AdrlnVGlU7FpVc6gfkMk66qsikMNaeL2MtM5eVdC\njvyEuw4dQ+vOpKRq400ZxU2yaXyWMYdUSsoUFRyYqrr2tZ3yFOmCIVSsXY7T\n/oYJ41km0IaP2Jfz21rtkTzt3PevEpEr4uDeU2BRf4WBHAoVFff1Y01f78nu\nxKo/DVauMbuvjmYBpJvbfl8iBOk9SV2kwam1+QougFg2dzyj3CLSkfUtz0Xk\nJf+I\r\n=s4vN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7MfdAeKUZ1bFNgowHlmCu7+uVqNExWU9B90/n/HV84AiEA02mvqn1uysJXs14eqzcyK9Kv4pRNeVCgShBFuQ0qiGk="}]},"_npmUser":{"name":"bunko","email":"2leg@immaster.cn"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.0-beta1_1623065576868_0.25798217920368605"},"_hasShrinkwrap":false},"1.0.0":{"name":"@uni/video","version":"1.0.0","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.0","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-83vbRIF7mShb2Fu2AH7V/9joHEiWjdZGpyFi3cSInV1pYQnbLwre57hEwF4Dp3o3oF8K+ugLyFMhn5Ag7Q77fg==","shasum":"edeae7bc65072bd68000e507f1dd3899c9ed19ab","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.0.tgz","fileCount":3,"unpackedSize":11221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvt5tCRA9TVsSAnZWagAAYbYP/24PZ+bUvXva5o6GlYK9\nrSma0VEi6zO2KMzKs6I0JFBRytJUzYP7ttoU1oZ2MD8U7sUgZI5t+DW6Uy6E\nlEaalbk1uw9lpYhznqLU1/mi3E1KQluoHtRimZ7AFdgzIYNf6keeyo/24t0V\nezCnVF2t6lwMz5dJcOuMp1Zzk5svGZbmM5eH1nT2fa7yzITqxCJyGIkKXE1b\nAb5rlJabJrevL1qiQJj2bMpQ0S7H+ggZSSSeGIyLc+EZWaXMBg6HDG2uTkO/\nnH9TkAcoXNTh+CX0xbhOoWGyOMRDfzge67sSVGAwHrV/rYI1CoHtqHOlidRS\nnDdNGL4xMKkV06BlQ4PcQznF/Bw7NMR9sZq1+gFkuJnpVpIM0OXXcSIBlUTS\n005zwdNTJox1P/yoo9sk1vbMSTIVi2SkYbNl7yyk/Fswd0TYS1z2TzWrf1Zg\nGDnl9f4hit4XWokVHEUaxEE+SMuR6s+44VM9p/y10KwD22L8/RNWd5vsCO9t\nzjlufWDNWgOvbc1k5gbRybSEhvDBsgg6JotpykUrlAZiKq0Hwk7TIReKusN8\nKGWSRKsNT1HLhqweM3G16/7BUvfvEQPacKx/0b3bvnT3igpAA5tUT7Ur836V\n0Dui9zc0h6t7RgM7l7nVzyg8V7k1MDoFzsYEGR+/XvbZJ9RGpmu592410GZ7\nXJAo\r\n=VLTN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1goLHKp+AuHQPcC7gwd8pse+IzM8dVvw7GoyDIaK/zAIhAMpN5Z+49ZykFdxll7/55jGcWmlrh2KaXhHryp39S24L"}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.0_1623121517782_0.3606411232456739"},"_hasShrinkwrap":false},"1.0.1":{"name":"@uni/video","version":"1.0.1","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.1","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-+wK58dSphpJ3LtOoro3qR9cjaSMClzLvn5I3d57RnlVlAbPPpKbO1AwQlAyf14+kKxPEUHz1yyL9mHDyAlUewg==","shasum":"60004884f42c41ecc7093b1a1a7ee7cc69c48691","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.1.tgz","fileCount":3,"unpackedSize":11221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvuBeCRA9TVsSAnZWagAA1jwP/0gTwxYz2TxJ4sVTb/vZ\nv+HtRLAahXj/17BXLJJwES57LaPCFi0Qdcyv795XTgA/ubLBACfRfs4BYBrs\nWteTSI0nWLRlLMvP+2nCFwDUdEhGR8n81hDawCwNaFF+lNftwNXFTPcMxr4X\nIHR99VSH4pcR50KbYZeFv51gtzINsSe0BuNxji6VR3cpf6ngSyQmhsqYBc/e\npeohveP39bNrxgV3DSIRhDacVKZQw9hUFp+iQRF5GG8ridM+u7HdgbIIaRDR\n0ZtIA+fLiAlX3OM+BLsCqQYEWS9WEdNdKn1jL+OJ7zk0u9H3U09Q/sXSlD95\n40A2QeavkLmao3tEPR0YevRKmlmMgywlLVuTGuUjS8m3YknehUNlsbFY7nWt\nFlFZhsFJgpGnNhiPmpVtsE9NNYheP51GwDBhmGwbmen+DjDxstBk/P5g+VLM\nn2eFTynMkns8/isTCx8TT1+W03NPMO/X5v9qKh0eN6KD4zyjUbvKXSzezY5G\nmgI40DfvR4s8YK+6qGph035scKMujRxECW4b/ppjtoU9NXStOvNQIw9kh+tj\nkyqcG6inaLhfYJZzoywVKlryNA1ENs0nCqWZSUIak20bhK7OE4lt61evpCJi\nl4P2gg+CbadUTHzhrgptyEdhX6909fHbuHqva/7VTVC17TTnK43RhVCXsuJJ\nqFs6\r\n=5Xem\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAeU69YrEd5eFwm5eHavI63Lh8VVmqnslKaLfBsZPQPAiEAs00U2UYA/kQlwvzKWgH4MK57S3QGClNS8ewjxq8Xcr4="}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.1_1623122014050_0.4250941493447258"},"_hasShrinkwrap":false},"1.0.2":{"name":"@uni/video","version":"1.0.2","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.2","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-UPKEQN827MWgt9JtJHGRHRfr5hB4MHMMJVTzYa2PBD1QmrV4anZzNik1Uv2oWBrTf1U90cGzx0umVJbluT4hSg==","shasum":"34c3778b886ae95ef4dc64ae6f6656c189813270","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.2.tgz","fileCount":78,"unpackedSize":92689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvuNXCRA9TVsSAnZWagAAnF4QAJj5JQoD/0AsnGh4QOyI\nDbwsHWrxY2G71XfhOcmMloM446962zIYPDLU6vHweQsE1ILiV264g5TF4Cq6\nBsUPzRPLqEj4we6MFbzQFTbjgUOTFzxthgv1cQCetdG0KwMAYqCLfhtzabpb\nD/wQFq6bIV8RkF7lhmyaMa2Vr3yY6pPpNG2yKGKdZyuAFyKK8zg60Rk7shy6\n5P6ivTddCwMM8/Sc/At0tPIYCHkEicGmp1osVLqXxgYLrItbCuEPbMqVuKh7\nsKINbFK9OQkPd0If7REskl2fkQGsB/yXiXrTeJqEZgUpndOrYSH9gKslGZ0W\ntKAtbl6zGOGzjm1TgwK7Z10+xzu+CRSHEl7G+yFVxvkj6VSWhO1NN2Xbhen9\nO+M1CiM/GSS7V+S84rLrS5c22R1sRlGWga0v0Ftl1qf5j2TI0RHWyzhaAAnD\n01ij1XGJjPkEqnCUkwtxPQ6cUo1qmld56GJgWbmYTAHRX+5cGvLLYqCrfAvK\njJdWfPhDt5nUPoS5ziog19jt9VkNB3k0bCkZtsrUl/wFWHwNS4Rdd2HlZYoe\nahwMVyWo290yeFVP7jH+EH7d1dKz/KKjzru/ubpT/YB4LFW0oOLByMgkfvwy\n/PSdPSXsolsB8jd4PDPk6FpfUxR1cfNkPoMBNXoTBTW0Nhu5w/N1LVV10e3t\nraTj\r\n=+THx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAH9t2gTP1E6DEa9ycu37Q45Ily1zBCkFD/HCl/Q+YgmAiB4awwxBD0CVHoFrdXORCVTYqEuBL3XELR3DakDe2MoUA=="}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.2_1623122774869_0.5535723109700694"},"_hasShrinkwrap":false},"1.0.3":{"name":"@uni/video","version":"1.0.3","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.5"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.3","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-s9WIfDoceFVYxlPevStxp5i8/hpBX7b1FVf5bKEK2IHAKHWnXnhjrDeLtbSq1FH8xdiOZjiE4Pi35tcSJqvoKw==","shasum":"9d328911ac4fdfdd6f1f7d9e33f6a44c7922f7cd","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.3.tgz","fileCount":84,"unpackedSize":112592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5BZDCRA9TVsSAnZWagAAh38P/A1IDtTL2ObidlifhC+U\n7xuwdoNGt6VmBLJ4g6D2obaKKYPI4rxJ+no9QiBnwMbQFEoTXEQXycpXuCpT\nbOMsyyzbu+Oa+bNWljVAAA6ozYzrFG7lFfjHF5Y1M7WZ+jgLERHIIzjZeybn\n7Pe8VtdomR5y18YlI36KLzNNoF4snjJp71EhPMGkKhaF1oGkcGiYyKWLTKk8\nlLVPkTI75dDis+R7bUXJV0vzQRG7tEQsjudds+JeL2X2G49AElF09JnK4F1X\nk8mGvHMQ4Epl5arhoUUTwGWNfzEdaWaioVyuC4tFUdv/Vcwb8iB87wlbnL0o\nAHUa/TZEcmBjaUiWSx1O54z0NBua9CqPeSOTK5izuZmITplAHgvrVKyJeJgN\nbmvS4RJ+kx0R9KkWLKnLzEX5nGpNOjVuxKH4/o7utXxMkB/+/4BybURmaU2u\nFaV9uX6FOzd+bgmXlMBzn9VT3+YAnWW5CzxK9iY6YJvLD1N4IiVeDYpSBmAi\nk2Fy8118CFKqJttT0xtgwYwWqjs5mKKoiznmdK7+bZzikPYl+Qxdx0VMqICB\nGFtu6MMpdCTlPzjiMzszFdHQ/U2S1g+HCuufv3W9Ac+cc/y4xoQ0vEqmWavv\nMp3/FhLAgznfRGVHHEAtYkyst5baOpHHgAeZD19w6syjc9O15Ti2Mrl4aYq3\nJ0V+\r\n=rkqy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvImtk1U2jIAzC2UmgcDPTly2fNiLduoBqPYgNfvfimAiEA809kFtzb0YU0YD8gEwGGIEzakde4YK55l6eQwsFBU30="}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.3_1625560643502_0.8594136384666298"},"_hasShrinkwrap":false},"1.0.4":{"name":"@uni/video","version":"1.0.4","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","default":"./es/index.js"},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.5"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.4","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-ccQiMw8ZF87976tgGS7Cnn7m68Vwo4pX5pOLGw5gGtEUER8HuUt2puxxMl1qyY97eMtYL/tDle3pp9+PyW3JRA==","shasum":"851bb99bd9af92558899e356bd08fd78620dce71","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.4.tgz","fileCount":108,"unpackedSize":125201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFLoqCRA9TVsSAnZWagAA/UYQAI4T010cm97qHuZerGE2\nZI+QW4OO4NixvJ+qVqaFlfh6A5EmhSZKYAyYYFIYFDhpTdAcQzjFQ5YGXXO6\nNFA1xB9q9tkm0rDaK6WP67FpHvMz3HRaQzm6endRSvj5+EHV/XAaurzijDAV\nYSfHwouiIMf93CzJORz0U5C4hP37LmoIj3JGD8ZdwoO/BGvLjGR2XhXhESi4\n9za7Dq/ORfZkzMERB+x7lld0EfN6F6LIupVTTlfWm4veI5sVfp++6csv42jM\nAk5p1IeG7d7EKM0BH1ftUMhKxSh78ttIovtp2bOqZWd/52uu6kfPO66gA1D5\nhazVT0SJEiK2X3mW1Gji5P/EtRpNJajGRmauMxbwvHKBDBbJDkIFxsXFuz5M\nuOGK+jIXMEXjWw97aEcBeZ33z459vxXD3WnqxaysR3GJhyv0k//xA1nutuu3\nnIrf6vb5FCzZ9rSE0QGxQMVIEo0yVRfBFfGiWksdakw77uptSleQAFl2j7rT\nHkMjJz/e5sdXqO7E9pQsRYHDr9VSctzW18OaWLUlURQBKmnneBa+pOqI4G6D\nQcgs3ZYkQCzBC31xKiCLKLh90bDbbH7SzhcNU6Ha7pdP8yw8tAHyN5xykvXk\nBNB/RVVp5c4SMl0ac7wslpZS//WpNSDjYrhbiRbhxC5I26wSlrX+MbDrbyI+\nZGPK\r\n=7gm1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwHsyAy/zkylr8IzSL0qTtvxg/Durv3h5NvXMtA7AqxAIhANynpiKnRYuSnEgSWiDlcboFpPQTAIQErZCOf37svM3s"}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.4_1628748330559_0.23839002793330422"},"_hasShrinkwrap":false},"1.0.5-beta":{"name":"@uni/video","version":"1.0.5-beta","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":"./es/index.js"},"./":"./"},"dependencies":{"@uni/action-sheet":"^1.0.7"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"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","readmeFilename":"README.en-US.md","bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.5-beta","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-p9Uhi3WMQEngxLTght5jmbnETh/juPb9VFCLWpE/A2ZI/nIxeH8mnnYS8McM1KY5ngVL3gJY4qxd4CQbb0lxxg==","shasum":"b096ecef268cb53f66fbc1c3c0dcfa883388093b","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.5-beta.tgz","fileCount":108,"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","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrWSD26ibVX8jeygpiXem13S5kFXT0f6S0QB1JK+mzwQIgOjlsPwzeR6gcn3qmQKCjvto9F3SIsemEBYRs3wqFSmA="}]},"_npmUser":{"name":"bunko","email":"2leg@immaster.cn"},"directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.5-beta_1629253735888_0.5667491594928307"},"_hasShrinkwrap":false},"1.0.5-beta1":{"name":"@uni/video","version":"1.0.5-beta1","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":"./es/index.js"},"./":"./"},"dependencies":{"@uni/action-sheet":"^1.0.7-beta"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"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","readmeFilename":"README.en-US.md","bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.5-beta1","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-V7xDnEXraC1l+yna7AsAopDhpFcf9qhiDhZD+GwpUf0YT9yWc35cGLBiuFLZOoIQtGhC4iEsxce5vJzYXjtv3w==","shasum":"7d7cb1ca114019d7184988e0eb0ad84bc9f4e9a0","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.5-beta1.tgz","fileCount":108,"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","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDk8OCmUZF/bOIRO8yGWAGSg+rgp25jDMDdNOyOvVlT/wIhAPuKsdKQQbtgBrpalGBhf0ozGhS3aQzCz6dY+3xYyHPc"}]},"_npmUser":{"name":"bunko","email":"2leg@immaster.cn"},"directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.5-beta1_1629256444048_0.03717858400754803"},"_hasShrinkwrap":false},"1.0.5":{"name":"@uni/video","version":"1.0.5","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":"./es/index.js"},"./lib/":"./lib/","./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.5"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.5","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-UtPAJnfT+db3+3U88gDIod8MnMdy7Q5z+hHkosHN30IgaOuMlmTWRBg0Yr/+tyKZIj4Sfp887cYsNZWNgSA91w==","shasum":"bdbf8315c617d543a356609def12fa9b12b837bc","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.5.tgz","fileCount":108,"unpackedSize":128707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHKsGCRA9TVsSAnZWagAA2ekP/1RHt5tp0a879JaqqTOU\nr1kFhYQIOUdxiGZeLuMmLMkShOjtMNP8ErOiWLYJitSCwmHI54GfT48cukmW\ndY/AxUzYDGoFMh1GhKB9hRfthjFxeVh0zhaZu/8tR15MvZK3QjGTN2VIC5oh\nL/le6Rf3OgUyN5/e0t/2oJj0vgyeGn83Kx4aWtGnJjv8UUBGppt/evqlkvPB\nME5t1JHv39pov17LqSkOGyXveuEmB1wM6BEbcRMP9UrwC7HVyJQaYC+/4hZI\nto0E0ora6WHkeXUBZ5aLUHm3pW5oM9shKkksxMyzHB3ydqVf57+0UIBhGDhg\nXhbAUtBCdAfk1y31poeZF0F+vTomg4MrW7nEm9NgIfpDXCM8b18u+pZbRIJp\nH+XPPVdeZh+MwpdZ4HLzzbjLvWHLcInxNyqBEisTuPgYp/EBeIzkIya334+h\ne80T9AHG1HDaB05ty/SCSj50EqXSW+xsH/6rB8sRGnLNMMazLFA/qwgDFZNo\nMm6po1L/Eoqkg5eAjh1iEEaEbMwMD0uH4xmDgyVXYjkxu5d4sgk9XgvAmmVT\n8Ot1Z4e/dnkEZ+aR31lSdgrIrbQy11EsZ/P5gaS7SFW9R0Ag6cjd/6PgUCqi\ntgigtsCR/pctbHrqqAifFikBV0X2Q7xJS1RNs9g9+q7ADUVAg4GqQLzbCQ82\n4lD6\r\n=Ws5f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJ7ZL5p6379xerzYbnES+Y4Ri8Ina6JP1QDQGpmZJhPAiEA38ikeT5SctgB4UQstxGO1ZyIKKOgF173HPBxUWa9JMo="}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.5_1629268742221_0.2002328989216937"},"_hasShrinkwrap":false},"1.0.6":{"name":"@uni/video","version":"1.0.6","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":"./es/index.js"},"./lib/":"./lib/","./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.7"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.6","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-iMqKMukI9S87AVY+fwTeUiM4jo0QbTEnF+Plbrv8GtPQOyYeaM9jzPeOBMF2xmbLTQuu2faQFS6l6QDZkErpXA==","shasum":"8272932a4d20474adef7c4ccff98d29c6e4dcd97","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.6.tgz","fileCount":108,"unpackedSize":136334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJGLVCRA9TVsSAnZWagAA+fwQAI2x/iedAVVj0tIwMLGi\nkRHny2W//zPR/+jZdmun+5TSToaSXYzEFkYglisk8ujjlNvEHdzhq2LJ3hcO\n+r4s1x4tQ3fsU9e1Yy5uoJHXdn34xU1YMLZ2C8lsC0kS1X+f3mUlfELc8XE/\nGHDOyWA7fPy4ypwdAVFvV32So47zON4l7Vtvb152uNzKw1Uv/BQNAyJkJUPj\nF5DNxRaSC2OGQnnPuPdGGQfvhTKMtpBKEdFgF6uRrQmEzQE5P26W+wcvZsVA\nYqixxgL4JWWLhNPuSgzcDiPQoheN+zKfh0WaZx/BY9iXiHnapgMPNmU0wC7g\nHUZs/nLg5zhhiYoMRHNHz/11zUIe36KeGb0GsQmICnXpPVVnljl/lumqutWN\nHBJJdgvRBTUCmykkdWzbywGpwfXUkPerODmArzzDrDR3VUmguqpPtzMOYmf2\n6NqUoGUzxzNbtbUIhEFcwzKSCATsZarmjZtKAy71WVVpE2qrGbumb1+Lr7VY\nxbfDAXhkoRlio7LjJmWFoJ5kaJCi48hByvUsQ+ZLTpPO54TZsi7uu/KygUSo\nVNKtO6mvxH7P0gsFEAxPyvvxxZthwS0s2GZC6HW0hm2Vi1X3yGDXfYGl0g4s\nEcxh9iAqeEVyRlHX36WIeaRBlS4lLxsLaZ2bQj8wQxmYcG7zCQkzqHTmZUj3\nGDb0\r\n=vEJ/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEzfVuu9YnhTqfAIPF8/WlMHpU0Id3BBqu7qw8DIvlXAIhAN1SozwvugSOCwUag6cGKBtGxpB+s1aivO8L+NNAKsuC"}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.6_1629774548943_0.45132154924515033"},"_hasShrinkwrap":false},"1.0.7":{"name":"@uni/video","version":"1.0.7","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":{"require":"./lib/index.js","import":"./es/index.js","default":"./es/index.js"}},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.7"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.7","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-TIkavN5dUE6uieNAWQcOSVy/vMDoOfIuQ0ZB2XOyTMpKnacUf1f/0zMo8pPJ/DBJf8XaxlcPeU/F4usjWjdiSQ==","shasum":"a195d404a631f8a7c010bc3b6e73d4c69036fc1a","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.7.tgz","fileCount":112,"unpackedSize":221265,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKnz0icNM90RvZyxvnRGwo8hL08HpBRTrKKW2SvRRoYAiEAyY41IhVj87iaThR7ybEWae/GI1np5mfEKYVoZAwz1ew="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSLcpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvAQ//cXNwgze0X1P5GnG0o0ISe/tVUz7K9a5T8bMRPWHmzXDykYKv\r\nFcurwQGvPOUPG7hVczX1M9xJtz6vUVYpXNHsH6d87xiBIz+Eh0ERk2D0ZJq6\r\nuSbQk5nnZbau69buN6kwQJ3fOSlOlFtDhUqaXmdCh517Hin4I/9sp39yFSWB\r\nx4HmPApdcGSbyCD60l1Fg02F7XJhtF5ZmKdpDULiShExChyIZXrTHsuZaErD\r\nNv1Gi5DGkfqliQzZMQhdRXezll9eYuNZ45aMCCLlHMSRbj0zL9gEo6hFJIUL\r\nmLOqO5z88SBFPv5EUjQJKOEhSDIryD3OWGmf5ymJIONpBzRLVqH6dvdbEz/s\r\nHjgHCBb1UmyjgeqoShoKUCpjtwhliIbYsMda2KphDX44h8z16AoznGihk66R\r\nLpJqUE7/GaJKfYP5ha06tu7YU5YjXjfF7uVwNwcgaYJB8KwKKhD8uk+zw8/M\r\njBqFYm8PDZ2Vl8C3Xo+/97cCCe1yqEr5cLMj1bsQIE7f6f1/xBaOmRcRLjHT\r\npMa9VqtgqMBSx/rhMQmhcpunJNeBcMvXp8X+hbvsImWAGZL1MqumwCZh+dNA\r\nCSQoj0awczIY2kuSRT7iaJ6gZcZNfAyye3UXZO97a6jsWQlXmoeLe9I5zGpQ\r\nccwhpCM1cIYJPRwKMYjfHqvTo2Gw2fw0B4g=\r\n=iOAg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"bunko","email":"gh@ian7.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.7_1682487081450_0.07940488833454151"},"_hasShrinkwrap":false},"1.0.8-beta.0":{"name":"@uni/video","version":"1.0.8-beta.0","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":{"require":"./lib/index.js","import":"./es/index.js","default":"./es/index.js"}},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.7"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"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","readmeFilename":"README.en-US.md","gitHead":"44f41978af01f03fa9acac8699989243f1d988eb","bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.8-beta.0","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-A6v0ZkS5YYHBqm+/ihEIS9DmzsZgAc3bdNibUs7U1agxiXTTPA5TI5u/QLSYrBgPGvEutsD3v9HosW5zy/tLdg==","shasum":"8d2b4c346362a29ba7786cfdc1fd65e9cf78a71c","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.8-beta.0.tgz","fileCount":112,"unpackedSize":221501,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBxICayvzmyyrXQ/L4VEouQDGd7ha/a6Ki5Xnrv+ntNwIhAN2eJWvFSUFrABq/9lMbygFPKuQbnss3QC9Wqg40K1MP"}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"bunko","email":"gh@ian7.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.8-beta.0_1684317365679_0.5059525145637624"},"_hasShrinkwrap":false},"1.0.8":{"name":"@uni/video","version":"1.0.8","description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"exports":{".":{"web":"./es/web/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","miniapp":"./es/ali-miniapp/index.js","baidu-smartprogram":"./es/baidu-smartprogram/index.js","kuaishou-miniprogram":"./es/kuaishou-miniprogram/index.js","default":{"require":"./lib/index.js","import":"./es/index.js","default":"./es/index.js"}},"./*":"./*"},"dependencies":{"@uni/action-sheet":"^1.0.7"},"repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"license":"BSD-3-Clause","author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"homepage":"https://github.com/raxjs/universal-api#readme","_id":"@uni/video@1.0.8","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-Gzo+7Qsq5jmBxcW/B9EF0l77nneBeuHuCBUIVSetSTCQtjdxoF9LF/K3UZE2Z20Raq7/MLrtaDa2KqeLmwWu8A==","shasum":"bc88fff825133d6898501f2133e368ebfdb0f7fd","tarball":"https://registry.npmjs.org/@uni/video/-/video-1.0.8.tgz","fileCount":112,"unpackedSize":221675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDh+tZ8TkwqIXmEk+ia/DukRToOip9p/rkUXINYai9KegIgbHBRNFR1ru9bWhN1iZq3Rqkb2vzPTcDS/GU200D/Pu4="}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"bunko","email":"gh@ian7.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/video_1.0.8_1684378940105_0.6744197468914122"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-03T05:59:18.146Z","1.0.0-beta":"2021-06-03T05:59:18.589Z","modified":"2023-05-18T03:02:20.452Z","1.0.0-beta1":"2021-06-07T11:32:57.067Z","1.0.0":"2021-06-08T03:05:17.961Z","1.0.1":"2021-06-08T03:13:34.249Z","1.0.2":"2021-06-08T03:26:15.034Z","1.0.3":"2021-07-06T08:37:23.606Z","1.0.4":"2021-08-12T06:05:30.769Z","1.0.5-beta":"2021-08-18T02:28:56.121Z","1.0.5-beta1":"2021-08-18T03:14:04.210Z","1.0.5":"2021-08-18T06:39:02.412Z","1.0.6":"2021-08-24T03:09:09.157Z","1.0.7":"2023-04-26T05:31:21.662Z","1.0.8-beta.0":"2023-05-17T09:56:05.902Z","1.0.8":"2023-05-18T03:02:20.288Z"},"maintainers":[{"name":"bunko","email":"gh@ian7.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"description":"[![npm](https://img.shields.io/npm/v/@uni/video.svg)](https://www.npmjs.com/package/@uni/video)","homepage":"https://github.com/raxjs/universal-api#readme","repository":{"type":"git","url":"git+ssh://git@github.com/raxjs/universal-api.git"},"author":{"name":"rax"},"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"license":"BSD-3-Clause","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","readmeFilename":"README.en-US.md"}