Node JS - HTTP Streaming

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024
  • And last but not least, we will be talking about streaming to browsers and upload files from browsers as well.
    If you wish to support me, here is my patreon page:
    www.patreon.co...
    Github: github.com/web...

ความคิดเห็น • 44

  • @jaycodes8790
    @jaycodes8790 2 ปีที่แล้ว +4

    love the video so informative , well explained with a bit of humour(in the start)

  • @CodingWithChaim
    @CodingWithChaim 2 ปีที่แล้ว +2

    really liked this video, very clear. Makes me wanna play around with this for a side project

  • @abdulazeez.98
    @abdulazeez.98 ปีที่แล้ว +1

    This series was gold!
    Thank you very much.

  • @amitmishra9424
    @amitmishra9424 3 ปีที่แล้ว +6

    please add a series on header also. It would be great help to the developers like me 🤘🏻

  • @WebDevJourney
    @WebDevJourney  3 ปีที่แล้ว +1

    Alright guys, I know this is a long video but I promise you that you will not regret it... or maybe you will.

  • @mnengwa
    @mnengwa ปีที่แล้ว +1

    Thanks for the video. It gave me a nice head start. I can see that we are now able to import an async version of stats and use it like so...
    import { stat } from 'fs/promises';
    const {size} = await stat(filename);

    • @soniablanche5672
      @soniablanche5672 ปีที่แล้ว

      In the example I think it makes more sense to do a fs.statsync before starting the server and store the filesize as a global variable, the filesize should never change. On every request he is checking its size, which is not necessary lol

    • @mnengwa
      @mnengwa ปีที่แล้ว

      @@soniablanche5672 Makes sense, would consider a refactor 👍

  • @joshipiano
    @joshipiano 3 ปีที่แล้ว +2

    Really nice work... Good concepts explained with simple examples

  • @viktorpoliushko2015
    @viktorpoliushko2015 2 ปีที่แล้ว +2

    21:10 you said that you don't do it now. Do you use some modern way to work with streams or it was only about headers?
    It was a great playlist. Hope to see more advanced-level videos about streams and how do you use them in "real" projects.
    P.S. Merry Chrismas!

  • @namesare4fools
    @namesare4fools ปีที่แล้ว

    ur channel is seriously underrated

  • @devstuff3278
    @devstuff3278 3 ปีที่แล้ว +2

    Uffff, vales un billón papi, jajaja thank You bro

  • @abhaysoni8631
    @abhaysoni8631 3 ปีที่แล้ว +2

    yes please make a video on headers and how to use them to make better web application , Thank you @Web Dev Journey.

  • @Nexjsdeveloper
    @Nexjsdeveloper 3 ปีที่แล้ว +1

    So enjoyable tutorial ! (A little fun)

  • @mandyratta6970
    @mandyratta6970 2 ปีที่แล้ว +1

    "Content-Length" should be {end-start+1} not {start-end+1} . Honestly this confused me a lot .But a really helpful video.

    • @soniablanche5672
      @soniablanche5672 ปีที่แล้ว +1

      True. If you want to actually test if the range headers are working you can add [Content-Disposition: attachment; filename="filename"] header. This will tell your browser to download the file instead of playing it (unless you force it to play it in your browser configurations). If the ranges and sizes don't make sense the download will hang or give you an error. Also it's a good way to test if resumable download is working.

  • @russelldriver6394
    @russelldriver6394 2 ปีที่แล้ว +2

    Question! (start - end) for Content-Length returns a negative, shouldnt it be (end-start)? also can you explain why we use size -1 for for end , why do we need to deduct 1 byte?

  • @be_b_50_ankitkumar_singh79
    @be_b_50_ankitkumar_singh79 3 ปีที่แล้ว

    I appreciate your explanation more than your voice :)

    • @WebDevJourney
      @WebDevJourney  3 ปีที่แล้ว

      Did you just say my voice is annoying Or I talk to much?

    • @be_b_50_ankitkumar_singh79
      @be_b_50_ankitkumar_singh79 3 ปีที่แล้ว

      @@WebDevJourney Not at all Sir, it's just that your explanation was much better (relatively) and that's the reason I am watching more and more videos further. I was searching on your channel for the video in which you will be teaching to stream a video that's available online, but didn't found it. It would be very helpful if you can make one soon. :)

  • @princechisomaga8681
    @princechisomaga8681 2 ปีที่แล้ว

    Thank you for this great work

  • @maskman4821
    @maskman4821 3 ปีที่แล้ว +1

    This is pretty cool tutorial, can you please make a webcam streaming nodejs server tutorial because it is much more practical and useful than video !!!

    • @WebDevJourney
      @WebDevJourney  3 ปีที่แล้ว +2

      You can build one yourself by using WebRTC. Here is a link that can help you get started webrtc.github.io/samples/
      if you can not figure it out, then ill try my best to create a video around this topic

    • @maskman4821
      @maskman4821 3 ปีที่แล้ว +1

      @@WebDevJourney I have read that sample codes, it is browser api, not nodejs server, I am talking about server side webcam streamg, it is ok if you dont know, I got the working source codes just it is kinda complicated, a lot of nodesjs api involved ...

    • @WebDevJourney
      @WebDevJourney  3 ปีที่แล้ว +3

      @@maskman4821 Honestly I do not know how to do that. Sorry that I couldn't be more of help to you.

  • @datapro007
    @datapro007 ปีที่แล้ว

    I learned a lot. Thank you.

  • @hmmoniruzzaman8537
    @hmmoniruzzaman8537 ปีที่แล้ว

    Great video. Really helped.

  • @saulgood2548
    @saulgood2548 3 ปีที่แล้ว +1

    I appreciate this video. Do you have any suggestions on where I can look to stream audio in Nodejs?

  • @Daniel-nb3kk
    @Daniel-nb3kk ปีที่แล้ว

    Thank you so much!

  • @abdouspaindz5270
    @abdouspaindz5270 ปีที่แล้ว

    Thanks

  • @meisammofidi13
    @meisammofidi13 3 ปีที่แล้ว

    Perfect! One question and how to do readStream from rtmp and then do writeStream to another rtmp? Nodejs does not support rtmp :-(

  • @Ericsicons
    @Ericsicons 3 ปีที่แล้ว

    thank you very much

  • @amitmishra9424
    @amitmishra9424 3 ปีที่แล้ว

    Good content.

  • @germanduterte7110
    @germanduterte7110 ปีที่แล้ว

    I subscribed to him

  • @muhammadabdurrehman4044
    @muhammadabdurrehman4044 ปีที่แล้ว

    Urgent plz if someone know how to set header range in react native video cant seem to find anything on it, any hepl will be much appreciated.

  • @Cutrexxx
    @Cutrexxx 2 ปีที่แล้ว

    Content-Length: start-end is allways a negative number isn't it like that?

  • @__fireworks
    @__fireworks 10 หลายเดือนก่อน

    nice

  • @user-qy6ml5iz1o
    @user-qy6ml5iz1o 5 หลายเดือนก่อน

    do it with client side rendering its a server side rendering and it not suitable for production

  • @alihadi7756
    @alihadi7756 3 ปีที่แล้ว

    Can you please demonstrate how can we fetch a video from the internet and pipe it th the browser or an endpoint?
    I'm dying here man I've been looking for ages and I've got nothing. If you can't make a video just give me a code snippet. PLEASE

    • @WebDevJourney
      @WebDevJourney  3 ปีที่แล้ว +1

      hope this answers your question stackoverflow.com/questions/11944932/how-to-download-a-file-with-node-js-without-using-third-party-libraries

    • @alihadi7756
      @alihadi7756 3 ปีที่แล้ว

      @@WebDevJourney thank you very much, but what if the file was very large?? That'll consume memory, so how can I pipe it directly to the browser without saving it??

    • @WebDevJourney
      @WebDevJourney  3 ปีที่แล้ว +1

      @@alihadi7756 well if you wanted to, just pipe it to res. So... "pipe(res)"

    • @alihadi7756
      @alihadi7756 3 ปีที่แล้ว

      @@WebDevJourney thank you very much.

  • @N5O1
    @N5O1 ปีที่แล้ว

    спасибо! ушел писать свой твитч