OneLoveDTube IPFS Uploader v0.8.5: Getting ready for the new DTube.steemCreated with Sketch.

in onelovedtube •  4 months ago 

v0.8.5 update thumbnail.png

Repository

https://github.com/techcoderx/ipfsVideoUploader

What's new

Uploader HTTP API methods ready for integration on d.tube

Commits:

Referring back to the post I made 2 months ago here, I needed a way to implement a proper API auth system so that the upload API calls can be made public while maintaining the restriction to users in whitelist.txt file (if enabled in config.json). This is to make it possible to upload videos to our upload servers directly from the main interface without having the need to leave d.tube for another upload interface.

I managed to do this by collecting the login access token and using that to identify the user, then allow the file upload if the user is in whitelist.txt. The upload API calls will accept both access token from /logincb (in case of a Steem Keychain or plain posting key auth) as well as SteemConnect access token.

Since SteemConnect have updated the public keys of app accounts as announced here, it is safe to collect the access token as app owners already have the posting key of the app account that users delegate their posting authority to when logging in with SteemConnect.

An investigation was performed on 24th of February 2019 to find out how users are authenticating to the uploader. It lasted for 7 days, and turned out that 1 in 3 users used SteemConnect while the other 2 used Steem Keychain. Therefore, SteemConnect auth will be kept.

Screenshot 2019-03-05 at 6.46.50 PM.png

All uploader API calls are documented here.

Since the API calls are now fully available for any apps to integrate, it is important to add a rate limiter for security reasons (e.g. preventing authentication brute force attacks).

Subtitle uploads

Screenshot 2019-04-20 at 9.39.28 PM.png

Commits:

In order to integrate the uploader with d.tube interface, a missing feature needs to be added, which is subtitle upload (introduced in DTube 0.7 update). Due to the embed player support, only valid WebVTT files will be accepted by the API. All languages in languages.js dependency are supported by the embed player, therefore they are valid for subtitle uploads.

Once the subtitles are uploaded, the user may preview the uploaded subtitle file by clicking on "Preview subtitle" on the respective language, which opens a new browser window that loads the file from IPFS.

Thumbnail swap tool

Screenshot 2019-04-20 at 10.01.17 PM.png

Commits:

Uploaded a wrong thumbnail by mistake? Or just want to change your DTube video thumbnails regardless of how you uploaded it?

When logged in, a user may switch to thumbnail swap mode by clicking the mode switch button located at the top right corner. Now all it takes to replace a video's thumbnail is to provide the link to the video that needs a thumbnail replacement, and uploading a new thumbnail through the same /uploadImage call, but with type URL parameter set to thumbnails so that the upload will be treated as a thumbnail by the API server.

The Steem post will be updated by replacing the snaphash in json_metadata, and replacing the second link in Steem article body to the link to the newly uploaded thumbnail.

Other updates

  • Unit testing has been added thanks to the feedback received from the previous update. They can be run with npm test command.
  • Sync script has been created to sync pins from uploads with other IPFS nodes, which may be run with one simple command. Usage: ./sync.sh <hash type> [Steem username]

Roadmap

When DTube 0.9 rolls out, the next update (v0.9) of the uploader may include the following:

  • Avalon blockchain support (blockchain for DTC tokens)
  • Revival tool to make unplayable videos playable again on DTube
  • Scheduled uploads
  • Usage data checker

Github account

https://github.com/techcoderx

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  • Great post with images and explanations of coding choices. You're only missing code samples.
  • Good commit messages and comments in the code.
  • You should remove the console.log() if the user don't need it.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @helo! Keep up the good work!

ohh that's really a lot of things, well-done brother !!!

thumbnail swap and better subtitles! <3

@techcoderx I just tried it and it is working, but maybe you could change this:

Screen Shot 2019-04-22 at 10.40.20 am.png

It says "new upload" and if you click on it will show

Screen Shot 2019-04-22 at 10.41.38 am.png

That's very confusing. Maybe it should show "Thumbnail Swap" in the first place, so that people could see it right away.. What do you think?

That's a valid point. I was thinking about this too and I plan to extend this to a revival tool of dead videos on DTube so that it becomes playable again.

Maybe I should use a dropdown menu for this 🤔

I would appreciate the dropdown menu 😬

@techcoderx oh that thumbnail swap will be nice! Many times I regret the thumbnail I used and now theres a way to change it. Thanks for adding such a useful feature.

Looking forward to the roadmap features as well! Thanks for supporting d.tube!

Things are starting to take shape and I'm starting to see real value with some dapps and services, this being one of them so well done!

Nice to know it

Posted using Partiko Android

Hey, @techcoderx!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

This post has been included in the latest edition of The Steem News in 10 posts - a compilation of the key news stories on the Steem blockchain.

Hi @techcoderx!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @techcoderx! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 1000 as payout for your posts. Your next target is to reach a total payout of 2000

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Thank you @techcoderx for the updates
I don't understand half the tech jargon but I know that you can now replace a bad thumbnail and that alone tells me that everything else is taking us to a DTube that's going to be very exciting :D

Hello!

This post has been manually curated, resteemed
and gifted with some virtually delicious cake
from the @helpiecake curation team!

Much love to you from all of us at @helpie!
Keep up the great work!


563.png

Manually curated by @solominer.