{"_id":"@edmingle/rn-video-sdk","_rev":"3-c293f6edbc4d47553fffed0515befeca","name":"@edmingle/rn-video-sdk","dist-tags":{"latest":"0.1.11"},"versions":{"0.1.9":{"name":"@edmingle/rn-video-sdk","version":"0.1.9","keywords":["react-native","video","edmingle","sdk","webview"],"license":"SEE LICENSE IN LICENSE","_id":"@edmingle/rn-video-sdk@0.1.9","maintainers":[{"name":"arnab15c","email":"arnab@edmingle.com"},{"name":"harshitsharaff","email":"harshit@edmingle.com"}],"homepage":"https://edmingle.com","bugs":{"url":"https://github.com/Edmingle/edmingle-rn-player-sdk/issues"},"dist":{"shasum":"6067bee74683aa0af62bcf5ea6faf97263bf281c","tarball":"https://registry.npmjs.org/@edmingle/rn-video-sdk/-/rn-video-sdk-0.1.9.tgz","fileCount":34,"integrity":"sha512-NxiUoWOXIOP8D+LDz77bAEA8MQztV/X3xV3BAiKo/Q/AMWewcqBqEvMac/Z4ySjL6YWfeYX4T65LKBV8reGANQ==","signatures":[{"sig":"MEYCIQD9lDLQJoOjVp4yV3RscEHN5jc1dG5ySb/6LMUg5eeI1QIhAKIvt9LGdGWbmo9hZZsQpLTua8CrEi6PEklCv1zFotgF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75752},"main":"lib/commonjs/index.js","types":"lib/typescript/index.d.ts","module":"lib/module/index.js","gitHead":"20d4d4043476faeb0383dd6472d3cb6746767f2e","scripts":{"build":"bob build && node scripts/minify-lib.mjs && node scripts/bundle-types.mjs","prepare":"bob build && node scripts/minify-lib.mjs && node scripts/bundle-types.mjs","selfcheck":"tsc selfcheck/progress.ts selfcheck/apibase.ts --outDir .selfcheck --module commonjs --target es2019 --esModuleInterop --strict && node .selfcheck/selfcheck/progress.js && node .selfcheck/selfcheck/apibase.js","typecheck":"tsc --noEmit"},"_npmUser":{"name":"arnab15c","email":"arnab@edmingle.com"},"repository":{"url":"git+ssh://git@github.com/Edmingle/edmingle-rn-player-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"React Native SDK to fetch Edmingle teaching materials and play their videos in an embedded player, with resume and progress reporting.","directories":{},"_nodeVersion":"20.20.2","react-native":"lib/module/index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"react":"18.2.0","terser":"^5.49.0","typescript":"^5.4.0","@types/react":"^18.2.0","react-native":"0.74.0","dts-bundle-generator":"^9.5.1","react-native-webview":"13.16.0","react-native-builder-bob":"^0.30.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":">=11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rn-video-sdk_0.1.9_1785575867812_0.6033005999336511","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module"]}},"0.1.10":{"name":"@edmingle/rn-video-sdk","version":"0.1.10","keywords":["react-native","video","edmingle","sdk","webview"],"license":"SEE LICENSE IN LICENSE","_id":"@edmingle/rn-video-sdk@0.1.10","maintainers":[{"name":"arnab15c","email":"arnab@edmingle.com"},{"name":"harshitsharaff","email":"harshit@edmingle.com"}],"homepage":"https://edmingle.com","bugs":{"url":"https://github.com/Edmingle/edmingle-rn-player-sdk/issues"},"dist":{"shasum":"ee86083628775ed52c1a3dc7f01cac1485f09554","tarball":"https://registry.npmjs.org/@edmingle/rn-video-sdk/-/rn-video-sdk-0.1.10.tgz","fileCount":34,"integrity":"sha512-+QdGmlaUM+N1z4Pv16xY7wi5sfGZcjJ7RFQGppq0XjzC0GC582wiVo6vV+lVT/Q/ZIbPdzY71pb1qwXI1Tvb2Q==","signatures":[{"sig":"MEQCIGwaHmBCRh95dawdDW/J4O36VZqsw5hktTDbiXkcFqKaAiALDJtbKORnOcvBurRP1rLMuu5yFii26tuIF33OBDAlow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75753},"main":"lib/commonjs/index.js","types":"lib/typescript/index.d.ts","module":"lib/module/index.js","gitHead":"633d9d0fa567400d2d6c741995593bbbfea1d163","scripts":{"build":"bob build && node scripts/minify-lib.mjs && node scripts/bundle-types.mjs","prepare":"bob build && node scripts/minify-lib.mjs && node scripts/bundle-types.mjs","selfcheck":"tsc selfcheck/progress.ts selfcheck/apibase.ts --outDir .selfcheck --module commonjs --target es2019 --esModuleInterop --strict && node .selfcheck/selfcheck/progress.js && node .selfcheck/selfcheck/apibase.js","typecheck":"tsc --noEmit"},"_npmUser":{"name":"arnab15c","email":"arnab@edmingle.com"},"repository":{"url":"git+ssh://git@github.com/Edmingle/edmingle-rn-player-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"React Native SDK to fetch Edmingle teaching materials and play their videos in an embedded player, with resume and progress reporting.","directories":{},"_nodeVersion":"20.20.2","react-native":"lib/module/index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"react":"18.2.0","terser":"^5.49.0","typescript":"^5.4.0","@types/react":"^18.2.0","react-native":"0.74.0","dts-bundle-generator":"^9.5.1","react-native-webview":"13.16.0","react-native-builder-bob":"^0.30.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":">=11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rn-video-sdk_0.1.10_1785576210914_0.9014106443609324","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module"]}},"0.1.11":{"name":"@edmingle/rn-video-sdk","version":"0.1.11","publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"repository":{"type":"git","url":"git+ssh://git@github.com/Edmingle/edmingle-rn-player-sdk.git"},"description":"React Native SDK to fetch Edmingle teaching materials and play their videos in an embedded player, with resume and progress reporting.","main":"lib/commonjs/index.js","module":"lib/module/index.js","types":"lib/typescript/index.d.ts","react-native":"lib/module/index.js","scripts":{"typecheck":"tsc --noEmit","selfcheck":"tsc selfcheck/progress.ts selfcheck/apibase.ts --outDir .selfcheck --module commonjs --target es2019 --esModuleInterop --strict && node .selfcheck/selfcheck/progress.js && node .selfcheck/selfcheck/apibase.js","build":"bob build && node scripts/minify-lib.mjs && node scripts/bundle-types.mjs","prepare":"bob build && node scripts/minify-lib.mjs && node scripts/bundle-types.mjs"},"keywords":["react-native","video","edmingle","sdk","webview"],"license":"SEE LICENSE IN LICENSE","homepage":"https://edmingle.com","peerDependencies":{"react":"*","react-native":"*","react-native-webview":">=11.0.0"},"devDependencies":{"@types/react":"^18.2.0","dts-bundle-generator":"^9.5.1","react":"18.2.0","react-native":"0.74.0","react-native-builder-bob":"^0.30.0","react-native-webview":"13.16.0","terser":"^5.49.0","typescript":"^5.4.0"},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module"]},"_id":"@edmingle/rn-video-sdk@0.1.11","gitHead":"1951a83bc85121e0da2b93bccd967ca4959da786","bugs":{"url":"https://github.com/Edmingle/edmingle-rn-player-sdk/issues"},"_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-VOkTwsanJOFuJruG+IV5+XTDf5pdCu6JNt3cUV3uoiWscYhzLDC5JDOpgmVF9WIa/WxWtpDxvjgjAj7ENV/Pww==","shasum":"ebdab82b82fcae0bc5ce2165ac790906c34a81e1","tarball":"https://registry.npmjs.org/@edmingle/rn-video-sdk/-/rn-video-sdk-0.1.11.tgz","fileCount":34,"unpackedSize":76233,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEsCr00N5RwCZuN/jW9B43oOSPxjdVon/1NUnwIlji2jAiANPsBZ5sATmL0mLVNgPoj2vSKgQ3aEAqvCj6kGy39geQ=="}]},"_npmUser":{"name":"arnab15c","email":"arnab@edmingle.com"},"directories":{},"maintainers":[{"name":"arnab15c","email":"arnab@edmingle.com"},{"name":"harshitsharaff","email":"harshit@edmingle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rn-video-sdk_0.1.11_1785685892585_0.15209960819760537"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-01T09:17:47.671Z","modified":"2026-08-02T15:51:32.918Z","0.1.9":"2026-08-01T09:17:47.966Z","0.1.10":"2026-08-01T09:23:31.067Z","0.1.11":"2026-08-02T15:51:32.735Z"},"bugs":{"url":"https://github.com/Edmingle/edmingle-rn-player-sdk/issues"},"license":"SEE LICENSE IN LICENSE","homepage":"https://edmingle.com","keywords":["react-native","video","edmingle","sdk","webview"],"repository":{"type":"git","url":"git+ssh://git@github.com/Edmingle/edmingle-rn-player-sdk.git"},"description":"React Native SDK to fetch Edmingle teaching materials and play their videos in an embedded player, with resume and progress reporting.","maintainers":[{"name":"arnab15c","email":"arnab@edmingle.com"},{"name":"harshitsharaff","email":"harshit@edmingle.com"}],"readme":"# @edmingle/rn-video-sdk\n\nReact Native SDK that fetches an Edmingle teaching material by `material_id` and plays its video inside an embedded player.\n\n## Install\n\n```sh\nnpm install @edmingle/rn-video-sdk react-native-webview\n# or\nyarn add @edmingle/rn-video-sdk react-native-webview\n```\n\n`react-native-webview` is a peer dependency. On iOS run `cd ios && pod install`.\n\nUse of this SDK is governed by the [LICENSE](LICENSE) and requires a current Edmingle service agreement. The package is proprietary; reverse engineering and redistribution are restricted — see [LICENSE](LICENSE).\n\n## Quick start\n\n```tsx\nimport { EdmingleVideoPlayer } from '@edmingle/rn-video-sdk';\n\nexport default function Screen() {\n  return (\n      <EdmingleVideoPlayer\n        authKey=\"YOUR_SDK_AUTH_KEY\"\n        userApiKey=\"STUDENT_API_KEY\"\n        materialId={19997}\n        classId={8197}\n        orgId={2}\n        onProgress={(p, material) => {\n          // p.seconds, p.percent, p.duration\n          console.log('watched', p.seconds, 'of', material.material_name);\n        }}\n        onViewed={(m) => console.log('completed', m.material_id)}\n        onEnded={(m) => console.log('finished', m.material_id)}\n        onError={(e) => console.warn(e.message)}\n      />\n  );\n}\n```\n\nThe component:\n\n1. Fetches the learner for `classId` — the origin every later call uses, plus the watermark identity\n2. Fetches the teaching material for `materialId`\n3. Loads its video in the embedded player\n4. Resumes from where the student last stopped\n5. Tracks watch time and reports it to the LMS\n6. Emits `onProgress` at most every `progressIntervalMs`\n\n\n## Progress, \"mark as viewed\", and resume\n\n- **Resume** — playback picks up where the student last stopped. If that position falls within the last 10 seconds of the video, playback restarts from 0 instead.\n- **Watch time** — only seconds *actually watched* count, so scrubbing to the end does not bank watch time or complete the material.\n- **Completion** — the material is marked viewed once the student has watched the completion percentage configured on it, counting earlier sessions too. `onViewed` fires at the same point. Pass `autoMarkViewed={false}` to keep the `onViewed` callback but skip marking the video as complete on the LMS.\n\n\n## Props\n\n| Prop | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `style` | `ViewStyle` | `{ width: '100%', aspectRatio: 16/9 }` | Player box. The default keeps the video uncropped; pass `flex: 1` to fill the parent slot instead (any other shape crops, since the embed cover-fills) |\n| `authKey` | `string` | — | SDK license key issued for your integration (required). Separate from `userApiKey`; without a valid key the SDK will not run |\n| `userApiKey` | `string` | — | Student API key/token (required) |\n| `materialId` | `number \\| string` | — | Material id (required) |\n| `classId` | `number \\| string` | — | Class id (required) |\n| `orgId` | `number \\| string` | — | Organization id (required) |\n| `enableWatermark` | `boolean` | `true` | Kill switch for the dynamic watermark |\n| `autoplay` / `muted` | `boolean` | `true` / `false` | Playback options |\n| `autoMarkViewed` | `boolean` | `true` | Mark the material viewed automatically on completion. `false` still fires `onViewed` — mark it yourself |\n| `progressIntervalMs` | `number` | `5000` | Max rate for the `onProgress` callback |\n| `onMaterialLoaded` / `onLearnerLoaded` / `onProgress` / `onViewed` / `onEnded` / `onError` | callbacks | — | |\n\n## Watermark\n\nThe player applies a dynamic watermark on its own for DRM videos. The watermark displays the learner's email on the first line, and their phone number on the second line. The watermark configuration can be changed from the Admin Panel.\n\n## Lower-level API\n\nHeadless helpers require the same `authKey` as the player (plus their usual params). Without a valid SDK license key they throw before making any request.\n\n- `fetchLearnerSummary(params)` — the learner lookup on its own, returns the `learner_summary` object or `null`.\n- `fetchMaterial(params)` — fetch a material yourself, returns the parsed `MaterialResponse`.\n- `postSecondsPlayed(params)` / `postMaterialViewed(params)` — report watch progress and completion yourself.\n- `createProgressTracker(config)` — the watch-time accounting on its own, player-agnostic.\n\n\n`react-native-webview` is pinned to `13.16.0` as a devDependency: `13.17.0` changed its type declaration to `class WebView<P = undefined>`, and `WebViewProps & undefined` reduces to `never`, so every prop fails to typecheck and the declaration build breaks. Don't bump it until upstream restores `P = {}`. The `peerDependencies` range stays open — apps can use any version.\n","readmeFilename":"README.md"}