cms icon indicating copy to clipboard operation
cms copied to clipboard

feature: Download videos for offline use

Open morgankar opened this issue 6 months ago • 10 comments

Is your feature request related to a problem? Please describe. I'm always frustrated when I cant view the videos offline especially in college libraries and during long train journeys as then I dont have access to wifi and have to rely on mobile data which honestly runs out very soon when watching the video halfway through.

Describe the solution you'd like A way to save videos offline similar to youtube on desktop. Youtube encrypts the downloaded videos and can be viewed only via the youtube website. Similar thing can be done to 100xdevs website i guess.

Describe alternatives you've considered There are no alternatives to this to be honest.

Additional context Please add a "download" button for each of the lectures similar to this one.

Image

morgankar avatar May 22 '25 03:05 morgankar

@hkirat @devsargam I have made a PR for this issue. and these are the features that i have added -

1- Videos can be downloaded by users to watch later. 2- Downloads are encrypted and can only be viewed via website only. 3- The player will also use the offline copy if its available.

Shivamvashist avatar May 24 '25 07:05 Shivamvashist

@Shivamvashist does the getKey() generates a new key per user/session as the comment says or per browser tab?

SimantaRajSarma avatar May 26 '25 07:05 SimantaRajSarma

@Shivamvashist does the getKey() generates a new key per user/session as the comment says or per browser tab?

@SimantaRajSarma Hi Simanta No, it doesnt generate the new key per session or user or even tab.

It is generated perr function call and its not stored in any storage or db. So the key generated will be different everytime . thus you cant decrypt the video as the key will be different and won't persist after any other function call.

Shivamvashist avatar May 26 '25 07:05 Shivamvashist

@Shivamvashist the code runs on browser right? so what if I modify these functions to not use any encryption and store the raw Blob? i can easily download the complete video into my local machine right?

SimantaRajSarma avatar May 26 '25 12:05 SimantaRajSarma

@Shivamvashist the code runs on browser right? so what if I modify these functions to not use any encryption and store the raw Blob? i can easily download the complete video into my local machine right?

@SimantaRajSarma Yes, you are right! Can you suggest me on what approach i should follow to make it secure? Should i use persistent and user bound encryption keys?

Shivamvashist avatar May 26 '25 17:05 Shivamvashist

@Shivamvashist the code runs on browser right? so what if I modify these functions to not use any encryption and store the raw Blob? i can easily download the complete video into my local machine right?

@SimantaRajSarma Yes, you are right! Can you suggest me on what approach i should follow to make it secure? Should i use persistent and user bound encryption keys?

@Shivamvashist you can do it with PWA! YouTube does it!

https://web.dev/articles/pwa-with-offline-streaming https://developers.google.com/codelabs/pwa-training/pwa03--going-offline#0

SimantaRajSarma avatar May 27 '25 08:05 SimantaRajSarma

@Shivamvashist the code runs on browser right? so what if I modify these functions to not use any encryption and store the raw Blob? i can easily download the complete video into my local machine right?

@SimantaRajSarma Yes, you are right! Can you suggest me on what approach i should follow to make it secure? Should i use persistent and user bound encryption keys?

@Shivamvashist you can do it with PWA! YouTube does it!

https://web.dev/articles/pwa-with-offline-streaming https://developers.google.com/codelabs/pwa-training/pwa03--going-offline#0

@SimantaRajSarma Thanks man! Will take a look and work on it. and i just followed u on X, couldn't dm you, can we connect there?

Shivamvashist avatar May 27 '25 08:05 Shivamvashist

@Shivamvashist the code runs on browser right? so what if I modify these functions to not use any encryption and store the raw Blob? i can easily download the complete video into my local machine right?

@SimantaRajSarma Yes, you are right! Can you suggest me on what approach i should follow to make it secure? Should i use persistent and user bound encryption keys?

@Shivamvashist you can do it with PWA! YouTube does it! https://web.dev/articles/pwa-with-offline-streaming https://developers.google.com/codelabs/pwa-training/pwa03--going-offline#0

@SimantaRajSarma Thanks man! Will take a look and work on it. and i just followed u on X, couldn't dm you, can we connect there?

@Shivamvashist yep, followed you back!

SimantaRajSarma avatar May 27 '25 14:05 SimantaRajSarma

Is anyone working on it?

morgankar avatar Jun 17 '25 10:06 morgankar

Yes, do you want to work together ?

Shivamvashist avatar Jun 17 '25 18:06 Shivamvashist