abdisalan / blog-code-examples Goto Github PK
View Code? Open in Web Editor NEWHome to code examples for my blog and YouTube channel
Home Page: https://abdisalan.com
License: MIT License
Home to code examples for my blog and YouTube channel
Home Page: https://abdisalan.com
License: MIT License
When I create my own code by referring your blog on dev.to, It returns an error "Requires Range header". and If I download your code from here and run it, It works fine. Can you help me to figure out the issue?
I'm trying out http-video-stream at the moment. I made each stream chunk contain 10^6 bytes, so I was expecting requests to look like this:
bytes=0-
bytes=1000000-
bytes=2000000-
bytes=3000000-
bytes=4000000-
bytes=5000000-
...
But from the console logs, they actually look like this:
bytes=0-
bytes=393216-
bytes=524288-
bytes=655360-
bytes=1655361-
bytes=2655362-
bytes=3655363-
...
bytes=30804228-
Why is that?
mongo-http-video
Borwser Opera Gx, Chromium, Google Chrome
I even update all the package dependency
events.js:377
throw er; // Unhandled 'error' event
^
MongoInvalidArgumentError: Stream start (63537152) must not be greater than stream end (0)
at handleStartOption (E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\gridfs\download.js:292:19)
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\gridfs\download.js:241:36
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\utils.js:510:9
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\cursor\abstract_cursor.js:480:68
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\utils.js:510:9
at completeEndSession (E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\sessions.js:147:17)
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\sessions.js:157:13
at maybePromise (E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\utils.js:496:5)
at ClientSession.endSession (E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\sessions.js:133:41)
at cleanupCursor (E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\cursor\abstract_cursor.js:533:32)
Emitted 'error' event on GridFSBucketReadStream instance at:
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\gridfs\download.js:244:27
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\utils.js:510:9
[... lines matching original stack trace ...]
at cleanupCursor (E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\cursor\abstract_cursor.js:533:32)
at E:\Node\blog-code-examples\mongo-http-video\node_modules\mongodb\lib\cursor\abstract_cursor.js:480:24
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.