Re: [fossil-users] How to Embed WebM Videos to Fossil Wiki Pages?

2018-01-03 Thread Ron W
On Wed, Jan 3, 2018 at 1:27 PM, 
wrote:
>
> Date: Wed, 3 Jan 2018 19:04:20 +0200
> From: Martin Vahi 
> To: fossil-users@lists.fossil-scm.org
> Subject: [fossil-users] How to Embed WebM Videos to Fossil Wiki Pages?
> Message-ID: 
> Content-Type: text/plain; charset=utf-8
>
>
> I know that the way to embed an image is by
>
> ![name of the link]()
>
> but it does not seem to work with the WebM videos.
>

Both Fossil wiki syntax and Fossil Markdown syntax allow including HTML
markup, so you should be able to include the video as an HTML video element
and not have to rely on Fossil to generate the needed HTML.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to Embed WebM Videos to Fossil Wiki Pages?

2018-01-03 Thread Warren Young
On Jan 3, 2018, at 10:04 AM, Martin Vahi  wrote:
> 
> I know that the way to embed an image is by
> 
>![name of the link]()
> 
> but it does not seem to work with the WebM videos.
> 
>https://www.webmproject.org/

There is no standard syntax for embedding video into Markdown.  Sources:

https://daringfireball.net/projects/markdown/syntax
http://spec.commonmark.org/0.28/#images
https://www.fossil-scm.org/index.html/wiki_rules

The best you can do, short of getting Fossil to add nonstandard syntax — which 
is the problem that lead to the development of CommonMark — is to wrap an image 
thumbnail in a video link:

https://stackoverflow.com/questions/14192709/

If the video is going to live in the Fossil repository, the video link will be 
an embedded documentation link (/doc/trunk/path/to/video.webm) so you will also 
need to edit the MIME type list in src/doc.c, adding this:

{ "webm", 4, "video/webm" },
{ "mkv", 4, “video/x-matroska" },

You must then use one of those two file name extensions in the embedded 
documentation URL.

This does mean the video won’t play inline within the rendered Markdown page.  
Clicking the link will take you to another page with the video playing.

If that’s a problem for you, solving it would bring us right back to 
nonstandard syntax, it begs a bunch of questions, such as “How do you specify 
autoplay?” and “How do you control all of the other  attributes?”

> I suspect that
> I asked something similar in the past

Yup:

https://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg22536.html
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to Embed WebM Videos to Fossil Wiki Pages?

2018-01-03 Thread Francis Daly
On Wed, Jan 03, 2018 at 07:04:20PM +0200, Martin Vahi wrote:

Hi there,

I am not related to the fossil project, so don't take this as any way
official.

> I know that the way to embed an image is by
> 
> ![name of the link]()
> 
> but it does not seem to work with the WebM videos.

It is probably worth being very clear about what you are seeing and
wanting.

The above syntax is (according to
https://www.fossil-scm.org/xfer/md_rules) a way of including in-line
images within markdown-formatted pages.

When you say "it does not seem to work", do you mean "it does not become
"img src=" in the output html"; or "it does become "img src=" in the
output html, but I want it to become something else instead"?

I suspect that the answer is the latter, which means that it *does*
work as it is designed to.


What you (presumably) want is for some markdown syntax that will
become "video src=" in the output html, possibly with some extra words
included. It would probably be good if you can specific exactly what
output-html you want, in order to avoid any unnecessary guessing.


Rather than the fossil-project making up its own markdown syntax for
embedded videos, can you point to a description of the markdown syntax
that is already well-known for embedding videos? That might inspire
someone who is interested to write the code to implement things.

Note that I can see, for example,
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#videos
which says

"""
Image tags with a video extension are automatically converted to a video player.
The valid video extensions are .mp4, .m4v, .mov, .webm, and .ogv.
"""

(personally, I think that "match the extension" is the wrong thing
to do; but I'm neither designing the spec nor intending to write the
implementation, so my opinion is less important)

and which converts the markdown-input

"""
![Sample Video](img/markdown_video.mp4)
"""

into the html-output

"""

Sample Video

"""

when I look at it.

Is that "the" authoritative source for markdown-for-video? Is "exactly
that list of five extensions" the thing that fossil should deal with?

Note that currently (I think) the fossil markdown-parser does not try
to interpret what you write inside the () -- it is a string which is
html-escaped before being written.

Perhaps it would be better to have different markdown syntax for video,
so that the markdown-parser could continue not to care about the content
of the (); and could also allow any future video format to be handled
seamlessly.

Is there another markdown-family that has addressed video before now? What
syntax did they use?


As I understand it, if the browser sees " The lack
> of WebM video support seems to be something that
> I seem to stumble upon repeatedly.

I suggest that the best "next step" is for you to define your desired
input-to-output mappings, ideally with reference to places that have
considered doing the same thing before now. If there were syntaxes that
were rejected, it would be good to know why. If there were syntaxes that
were accepted, it would be good to see how well they work in practice.

Without thinking much about it, perhaps

!![]()

would be suitable for a video element -- it resembles the current image
element of ![](), but is different enough that one will not be confused
for the other.

(But perhaps that breaks something else in the markdown-syntax-rules. Who
knows?)

Good luck with it.

If no-one cares to write the code, then it cannot be integrated.

If no-one cares to write the spec, then it is unlikely that someone will
be convinced to write the code.

f
-- 
Francis Dalyfran...@daoine.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users