Opened 12 years ago
Last modified 8 years ago
#653 accepted enhancement
Add capability for embed codes to show media on other websites
Reported by: | Nick | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | programming | Keywords: | embed, small |
Cc: | Parent Tickets: |
Description
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.
Without having researched it, I'd imagine what would probably be done for video is some sort of iframe? Or alternatively, a javascript snippet with parameters that add the video.js player to the existing page and then includes the video element in its place. I could look at how other video players handle this too.
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 , 12 years ago
comment:2 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → in_progress |
comment:3 by , 11 years ago
Hi
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:
https://jogamp.org/bugzilla/show_bug.cgi?id=686
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 , 11 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 , 10 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 , 8 years ago
Owner: | removed |
---|---|
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 , 8 years ago
Keywords: | small added |
---|
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
MEDIA_MANAGER
; seemediagoblin/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 theMEDIA_MANAGER
that 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?