Avatar

Any plans to support YouTube Videos? (Features)

by Magma, Friday, March 03, 2017, 03:56 (201 days ago)

Do you have any plans to support embedding YouTube videos natively?

At the moment I use the hack I found on this site which works ok but it's not ideal, you cannot go full screen and you often get a text warning "The YouTube Flash API was officially deprecated"

Avatar

Any plans to support YouTube Videos?

by Auge ⌂ @, Friday, March 03, 2017, 11:29 (201 days ago) @ Magma

Hello

Do you have any plans to support embedding YouTube videos natively?

No, not at the moment.

At the moment I use the hack I found on this site which works ok but it's not ideal, you cannot go full screen and you often get a text warning "The YouTube Flash API was officially deprecated"

Embedding videos is really tricky. Youtube is not the only video provider. When we include the an embedding of video/audio(?) from external sites we have to provide a solution, that is not dedicated to only one video site.

I did a little quick reearch on youtube.com and on vimeo.com.

Youtube offers an URL for sharing a video, that leads to the page of the video, and a HTML-fragment for embedding the video on a different site. Generally I found the same procedure on vimeo.com, but the HTML-fragment differs.

An example from Youtube:

<iframe width="560" height="315" src="https://www.youtube.com/embed/…" frameborder="0" allowfullscreen></iframe>

Youtube offers the fragment with only an iframe.

An example from Vimeo:

<iframe src="https://player.vimeo.com/video/…" width="640" height="384" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="https://vimeo.com/…">This - That</a> from <a href="https://vimeo.com/…">Whom</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

Vimeo offers the fragment as default with the iframe but additionally with a paragraph with informations about the video and the uploader. One can change the settings, so the fragment corresponds with the one from Youtube, but one must change the enhanced options for this. Not everyone will know, how to do this.

<iframe src="https://player.vimeo.com/video/…?byline=0&portrait=0" width="640" height="384" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

At that point we would have a similar structure for these two video providers. I've no idea who further providers are and how they handle the external embedding.

But that's irrelevant. I will not incorporate a function to include external HTML-code at all! Never ever! I hope, that the other team members agree with me. When we allow this form of HTML-code (an iframe), we will allow much to much.

The doable alterative would be to only include the URL from the fragment and to generate an iframe with the same attributes and the same size for every video provider with a script. The question is, is this easily operateable for the visitors of a forum? One needs a manual to extract the correct part of the fragment or we need a proper way to automate this (in JavaScript and PHP).

Idea:

put the complete HTML-fragment into a form field what starts an automatic check (via JavaScript) of the input for …

- … an iframe
- … the src-attribute of this iframe
- … maybe for the width- and height-attributes

Put the values into hidden fields.

After sending the data to the server an PHP-script checks the presence of the values in the hidden fields. When the values was transmitted from the form, the PHP-script takes these values, checks and stores them in the posting. If the values was not transmitted, the PHP-script performs the above described checks and extractions itself and does it's own tasks afterwards (checking and storing them).

This might be a way.

Tschö, Auge

--
further development of mlf1

Avatar

Any plans to support YouTube Videos?

by Magma, Saturday, March 04, 2017, 07:12 (200 days ago) @ Auge

Like I say, with the YouTube hack I found in a thread on this site I'm able to click the 'flash' button and paste in a YouTube share link and the video shows up.


So I'm not advocating removing the 'flash' button but what I would like to know is what the 'flash' button was for though? I mean if I click the 'flash' button on this site it asks for a flash url, without the YouTube hack what url are you meant to put in this box?

I just don't understand what the purpose of the 'flash' button was for?

Avatar

Any plans to support YouTube Videos?

by Auge ⌂ @, Sunday, March 05, 2017, 13:27 (199 days ago) @ Magma

Hello

So I'm not advocating removing the 'flash' button …

I do! Flash is a dead technique. More and more browsers remove the flash plugin or require a button click from the visitor to activate the plugin at least.

… but what I would like to know is what the 'flash' button was for though?

It was introduced, mainly to embed videos. At that time Flash was the common way to do this.

I mean if I click the 'flash' button on this site it asks for a flash url, without the YouTube hack what url are you meant to put in this box?

I thoght, I was verbose enough, when I showed the URLs for embedding, Youtube and Vimeo provided to me. I described the actual status how the video providers offers their way of embedding and what I think we have to do, to support it.

I just don't understand what the purpose of the 'flash' button was for?

See above.

Tschö, Auge

--
further development of mlf1

RSS Feed of thread
powered by my little forum