Any plans to support YouTube Videos? (Features)
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.
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.
- … 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.
further development of mlf1