HTML5 media embed

We’ve talked about this:

https://www.loomio.org/d/hAd4SHYa/enable-html5-video-audio-tags

https://www.loomio.org/d/L0GCaZqf/cross-posting-mediagoblin

https://diasp.org/posts/3518976

Now redmatrix can do that.

Is it a good idea to look as it redmatrix does and make in Diaspora?

This seems to me a very imporant business, I have no knowledge of code enough to put my hands, is there anything I can do?

Do you think that this is a priority for diaspora?
How complicated is it?


Note: This discussion was imported from Loomio. Click here to view the original discussion.

1 Like

I would like this feature. I often spread podcast episodes on diaspora*, but they aren’t listened to or shared as much as videos.

@juansantiago

This seems to me a very imporant business, I have no knowledge of code enough to put my hands, is there anything I can do?

  • Find a person who can code it
  • Post a bounty to reward someone to code it

ok, I will seek help from my friends.
Where are the rewards for diaspora code published?

You can find the details here https://www.bountysource.com/teams/diaspora/bounties

Thanks @rich1

I don’t think this would be complicated. It’d be basically a little tweak of the MD parsing to make ![]() syntax to detect and embed the media directly. But, as diaspora uses a gem to parse the MD, it’d be more an upstream issue.

Hello. I have a functioning workaround for this featue.

I implemented just like @augier said. You can find a working example here:
https://podricing.pw/posts/323

How to install this feature:

wget http://hastebin.com/raw/oyicomazeq -O app/assets/javascripts/html5Embed.js
echo "//= require html5Embed" >> app/asset/javascripts/main.js

This is an aditional javascript file thats embed to the rest of the pod’s javascript code.

Does it work with <audio> tags also, @nolcip ?

@augier

html5 players </ video> also play audio formats such Ogg , we can assume that run, but, good question.

@augier sure, technically it should work. Aesthetically, though, Itd show an ugly black box.

I added ogg support to the script. You can see it working here:

https://podricing.pw/posts/10426

Install:

wget http://hastebin.com/raw/xeqafeyile -O app/assets/javascripts/html5Embed.js
echo "//= require html5Embed" >> app/asset/javascripts/main.js

@juansantiago what’s the syntax used by RedMatrix?

Redmatrix uses a kind of BBcode itself, but I haven’t managed to get the integration with diaspora work and to see what comes to our side.

Proposal: Use the link syntax for embedding


Outcome: Though it would be technically the easiest, I don’t think we should accept this proposal, because we don’t have anything close to consensus.

Votes:

  • Yes: 13
  • Abstain: 0
  • No: 9
  • Block: 2

Note: This proposal was imported from Loomio. Vote details, some comments and metadata were not imported. Click here to view the proposal with all details on Loomio.

@comradesenya I think you should detail a bit the pro and the cons of the link syntax ([]()) versus the embedding syntax (![]())

Well, actually ![]() is not a standard and not even an extension. The CommonMark people are still discussing the syntax as we do. And they have alternative proposals like !audio[]() syntax. I also have an idea just now come to my head - to use text inside the square brackets to mark media type like ![embed:audio alt_text](url).

I’ll try to sum up details a little bit later.

The link syntax([]())
pros:
Will look nice even with software, which doesn’t support embedding.
cons:
Will be unable to post a link without embedding.
The image syntax ![]()
pros:
The syntax is unambiguous if the software supports it. Proposed and used by somebody in the CommonMark community.
cons:
Looks bad if used with unsupported software (e.g. older versions of diaspora). Require more work to deal with tumblr export and mobile versions of diaspora.

cons:
Will be unable to post a link without embedding.

What do you mean?

I mean, that if you post [title](http://example.com/file.webm), then it’ll be replaced with embed, and you can’t have it as a usual link.