Opened 10 years ago
Last modified 7 years ago
#653 accepted enhancement
Add capability for embed codes to show media on other websites
|Reported by:||Nick||Owned by:|
I'm looking for the ability to provide my mediagoblin users the ability to copy and paste a snippet of code - a la youtube or vimeo - to display media in another website.
For images, it's pretty trivial once the infrastructure for configuring and displaying the embed code is in place.
Change History (7)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
|Status:||new → in_progress|
comment:3 by , 10 years ago
Why not using the video HTML5 markup with the WebM source file where it is supported and a Java applet as a fallback using JogAmp + LibAV elsewhere?
You should look at this:
Of course, I would prefer a solution without plug-in and the support of applets in OpenJDK isn't optimal (whereas Icedtea Web Start works very well).
We could use Ogg Theora and WebM with the video HTML5 markup and just display an understandable error message when the browser can't support those formats because of a lack of codec or because it is too old to support HTML5.
comment:4 by , 9 years ago
What is the current situation of this request for enhancement? In the meantime I use the thumbnail in some HTML code as a clickable image that leads to the GNU Mediagoblin page containing the video but:
- the thumbnail is really small
- it's not very explicit
- I would prefer playing the video in the same web page
embed_func could return some code to embed the videojs player.
comment:5 by , 9 years ago
Like #409, I would be interested in any status updates related to embedding standards.
Has this issue had any updates?
comment:6 by , 7 years ago
|Priority:||major → minor|
|Status:||in_progress → accepted|
I'm un-assigning this ticket, since it hasn't seen any progress, but would be a great feature to have.
comment:7 by , 7 years ago
Marking as small-sized as Chris has scoped this fairly clearly above.
I think this would be fairly easy to add, actually. I imagine this working the following way:
Each media type currently provides a
mediagoblin/media_types/video/__init__.py. Add to that media type two new fields:
(request, media), and returns a string of text to appear in a copy/paste embed code box.
(request, media)as arguments and returns a response. More on this in a second.
For some media types such as images, embed_func might be enough. Embedding an image might really just be as simple as providing the text:
But for videos and audio, yes we should probably take an
<iframe/>approach... so in that case those functions need to provide an embed view. Hence there should be a new view added to the
MEDIA_MANAGERthat would be at a url like:
and which has a view roughly like:
I think that should probably cover the needs of this! Does that seem fairly sensible?