sshrshnv / tgstorage

Advanced "Saved Messages" of the Telegram. Store your notes, checklists, links, photos and any documents in Telegram Cloud.
https://tgstorage.com
GNU General Public License v3.0
252 stars 32 forks source link

Ability to mount as a local folder #3

Closed saifshaikh1805 closed 2 years ago

saifshaikh1805 commented 2 years ago

Hey, great work! I am working on a similar project where you can mount telegram to local folder on PC. It also has ability to create folders. I am trying to do it with FUSE filesystem. It works great but I am stuck and not sure how I can buffer video files. It would be great if you can help.

sshrshnv commented 2 years ago

You can preload any file size using upload.getFile method.

  1. Html <video src="..." preload="auto"> tag is created.
  2. Browser requested a certain file size.
  3. Request is handled by the service worker (or server).
  4. Required number of bytes with the range header are given in the response.

Also you can use canplay and canplaythrough events to detect, when video is ready to play. Not all videos support streaming.

saifshaikh1805 commented 2 years ago

Yes, I'm using the upload.getFile. But I'm not building a web app. I'm building a filesystem to mount telegram storage as local folder on PC. Are you familiar with FUSE filesystem?

sshrshnv commented 2 years ago

Unfortunately no