{"_id":"@achingbrain/videostream","_rev":"3-d48e71a228f049a92e312398e8d299ab","name":"@achingbrain/videostream","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@achingbrain/videostream","version":"0.0.1","description":"Streams data from a file-like seekable object into a `video` or `audio` node (a HTMLMediaElement)","main":"videostream.js","repository":{"type":"git","url":"git://github.com/jhiesey/videostream.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 0","build-example":"browserify example/index.js > example/built.js","start":"http-server example","prepare":"webpack"},"author":{"name":"John Hiesey"},"license":"MIT","files":["dist","mp4-remuxer.js","videostream.js"],"dependencies":{"binary-search":"^1.2.0","inherits":"^2.0.1","mediasource":"^2.0.0","mp4-box-encoding":"^1.1.1","mp4-stream":"^2.0.0","multistream":"^2.0.2","pump":"^1.0.1","range-slice-stream":"^1.2.0"},"devDependencies":{"browserify":"^14.0.0","http-server":"^0.8.5","uglifyjs-webpack-plugin":"^1.2.0","webpack":"^3.11.0"},"gitHead":"c730a19bcca87b4b8bbd7702e1a37dd59b22808f","bugs":{"url":"https://github.com/jhiesey/videostream/issues"},"homepage":"https://github.com/jhiesey/videostream#readme","_id":"@achingbrain/videostream@0.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"dist":{"integrity":"sha512-Mr5ZynEd7kFr18tQaN9+wnWAwyy7yT3B2XyDDP6RAXXRzhhoXKXruqun0tNa/xR51PUkIKu2+r0Z6cMl32BHpw==","shasum":"35a8ac57d2f7d889297e3a15eacb1a2b22309ee0","tarball":"https://registry.npmjs.org/@achingbrain/videostream/-/videostream-0.0.1.tgz","fileCount":7,"unpackedSize":503550,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZ2bVbXxPD7Hit/d8ged9r5OKNEQawfu4MeGMgxDnbLAiB9Zj/0brUb4tOY+Cfb/mqgG/MCLnal83MvMG5JiZR+Kw=="}]},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/videostream_0.0.1_1519039779859_0.2930590553952712"},"_hasShrinkwrap":false},"0.0.2":{"name":"@achingbrain/videostream","version":"0.0.2","description":"Streams data from a file-like seekable object into a `video` or `audio` node (a HTMLMediaElement)","main":"videostream.js","repository":{"type":"git","url":"git://github.com/jhiesey/videostream.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 0","build-example":"browserify example/index.js > example/built.js","start":"http-server example","prepare":"webpack"},"author":{"name":"John Hiesey"},"license":"MIT","files":["dist","mp4-remuxer.js","videostream.js"],"dependencies":{"binary-search":"^1.2.0","inherits":"^2.0.1","mediasource":"^2.0.0","mp4-box-encoding":"^1.1.1","mp4-stream":"^2.0.0","multistream":"^2.0.2","pump":"^1.0.1","range-slice-stream":"^1.2.0"},"devDependencies":{"browserify":"^14.0.0","http-server":"^0.8.5","uglifyjs-webpack-plugin":"^1.2.0","webpack":"^3.11.0"},"gitHead":"c730a19bcca87b4b8bbd7702e1a37dd59b22808f","bugs":{"url":"https://github.com/jhiesey/videostream/issues"},"homepage":"https://github.com/jhiesey/videostream#readme","_id":"@achingbrain/videostream@0.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"dist":{"integrity":"sha512-JebNfwNHWgEQlPGqmFU5Lj8TUIykpY27LR+RE/KvZEWS+RzOQybW0cA8jZOaKSCZ7LNghl0rUICeZmHddc7tRg==","shasum":"0196baa601299e072ed9384efebc7786eb897141","tarball":"https://registry.npmjs.org/@achingbrain/videostream/-/videostream-0.0.2.tgz","fileCount":7,"unpackedSize":504927,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACT2iScCTuuodcbVxYdJaPejoFHFjSrKye84NOsNzMLAiEAzahogafKWUivznSWMJ7AtIi6wTvUKh2OQX7CEH1MZ7k="}]},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/videostream_0.0.2_1519040889157_0.8933890755539462"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-19T11:29:39.752Z","0.0.1":"2018-02-19T11:29:39.957Z","modified":"2022-04-04T11:11:00.626Z","0.0.2":"2018-02-19T11:48:09.221Z"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"description":"Streams data from a file-like seekable object into a `video` or `audio` node (a HTMLMediaElement)","homepage":"https://github.com/jhiesey/videostream#readme","repository":{"type":"git","url":"git://github.com/jhiesey/videostream.git"},"author":{"name":"John Hiesey"},"bugs":{"url":"https://github.com/jhiesey/videostream/issues"},"license":"MIT","readme":"# Videostream\n\nStreams data from a file-like seekable object into a &lt;video&gt; or &lt;audio&gt; node (a `HTMLMediaElement`).\nSeeking the media element will request a different byte range from the incoming\nfile-like object.\n\nFor now only mp4 files are supported. The goal is to support\nmost files that conform to ISO/IEC 14496-12.\n\nVersion 2 is completely rewritten and substantially more robust\nthan the previous version that relied on mp4box.js. The only major regression\ncompared to the previous architecture is that fragmented mp4 files aren't\nsupported. If this is a problem I may add support again at some point.\n\nSupport for most other formats will take significant work.\n\n## Usage\n\nVideostream just exports a function. Use it like this:\n\n``` js\nvar exampleFile = {\n\tcreateReadStream: function (opts) {\n\t\tvar start = opts.start;\n\t\tvar end = opts.end;\n\t\t// Return a readable stream that provides the bytes\n\t\t// between offsets \"start\" and \"end\" inclusive\n\t}\n}\n\nvar VideoStream = require('videostream');\n\nvar elem = document.createElement('video');\nvar videostream = VideoStream(exampleFile, elem);\n\nelem.addEventListener('error', function () {\n  // listen for errors on the video/audio element directly\n  var errorCode = elem.error\n  var detailedError = videostream.detailedError\n  // videostream.detailedError will often have a more detailed error message\n})\n```\n\n### Errors\n\nHandle errors by listening to the `'error'` event on the `<video>` or `<audio>` tag.\n\nSome (but not all) errors will also cause `videostream.detailedError` to be set to\nan error value that has a more informative error message.\n\n## License\n\nMIT. Copyright (c) John Hiesey.\n","readmeFilename":"README.md"}