Steemit Condenser contributions: 3Speak embedded player support

View this post on Hive: Steemit Condenser contributions: 3Speak embedded player support

3Speak is a relatively new video publishing platform in the Steem ecosystem. However, it was missing an official support in This work is to allow support for the following requirements:

  • Render an embedded player when you add a plain URL to a valid 3Speak video URL.
  • Allow the use of a valid 3Speak iFrame player
  • Replace 3Speak generated image HTML with their embedded player.

What's involved

What's usually involved in adding support for an embedded video player is a little bit tedious (read repetitive) and I'm planning to find a way to make this simpler in the future:

  1. update helmet directive to allow 3Speak domain names
  2. come up with regular expressions to detect 3Speak URL, video ID and HTML markup
  3. update the MarkdownViewer component to generate the embedded player code
  4. come up with a regular expression to inform the sanitizer whitelist 3Speak's specific iframe code

New logic for embedded players

A new logic was added for 3Speak: replacing their linked image with an embedded player. Up until now, there was only two ways of rendering an embedded player on

  1. a URL in plain text
  2. an iframe HTML code

However, when a user upload a video on 3Speak, their system creates a blog post with a big image linking to the 3Speak page. The code looks something like this:

The thing is the HTMLReady tool only allows replacement of text nodes but the Mardown code above has already been replaced with its HTML equivalent, hence bypassing HTMLReady. So I had to preprocess the HTML before it gets passed to HTMLReady.

Replacing 3Speak generated code

Plain URL and iframe code

Vote for my witness
Support @quochuy Witness.jpg
On Steem, Witnesses are playing the important role of providing a performant and safe network for all of us. You have the power to choose 30 trusty witnesses to package transactions and sign the blocks that will go in the Steem blockchain. Vote for me via SteemConnect to help me do more useful projects for the communities.

Comments 21

that will be awesome

24.12.2019 04:36

This is so sorely needed! Thank You! Just witness voted you via my proxy @theusersparty :)

I was talking to some other users about pooling money together to have features developed for Condenser. Would you be interested in that?

24.12.2019 05:20

Thank you! I appreciate.
The cash pool is a cool idea, however:

  • My available time is restricted, I already have a day job with long commute during which I’m already working on projects. I wouldn’t mind picking up tasks I consider doable in what ever time I have available.
  • You need to make sure that the tasks will be accepted by Steemit Inc. I have ability to code and add features but whether the feature will be added is up to them.

Still cool idea as other devs on the platform might raise their hands and participate.

Posted using Partiko iOS

24.12.2019 05:35

Yea, I think that's one of the main issues, a lot of the people we might ask almost certainly have day jobs and are busy.
What I was thinking about doing was submitting features purely as designs first and hopefully getting feedback from Steemit as to whether it's a feature they'd be interested in merging, then if it is, paying to have it developed. Hoping to get something small just to establish a process, anyway, thanks for replying!

24.12.2019 05:43

very interesting...

24.12.2019 08:45

Your post has been manually curated by FreeVoter Team.You can earn liquid steem by delegating SP to @freevoter !! We are now paying 100% daily earnings and 90% curation reward to our delegators !! Join Discord for more information. Thank you !!

24.12.2019 11:34

It is good

24.12.2019 12:12

Very good and very interesting. Thank you for informationn @fujie

24.12.2019 12:21

Good sharing 👍

24.12.2019 13:24

I dont understand most of your work but I know it all awesome. 😁

Keep it up anh!

24.12.2019 14:56

Nice but long

24.12.2019 15:03

Merry Christmas^^ Happy New Year!

24.12.2019 15:11

Much appreciated work @quochuy!! It's really fantastic to see this type of development happen organically like this! :)) love Steem!

24.12.2019 18:36

Rất vui khi được đọc những bài viết như vậy!

25.12.2019 03:46

Pals, lets take a poor guy like me and make kn christmas little smile on his face by add some of card or cards on his account like gift from sky...:) just thought.. best regards!

25.12.2019 11:43

25.12.2019 15:54

Thanks for the post.

27.12.2019 22:15

Thanks for the post.

29.12.2019 07:48

Hi nice post

14.02.2020 21:39