Hey guys,
I'm looking for a way to embed a Youtube or Vimeo video in an issue as part of the task or in the comments section and I was wondering if it's possible..
Thanks a lot !
OK, this is a nasty hack just for you. It's not big or clever...
Paste this into the Announcement Banner section:
<script> AJS.toInit(function(){ AJS.$('a[href^="http://www.youtube.com/watch?v="]').each(function(){ AJS.$(this).append('<iframe width="420" height="315" src="http://www.youtube.com/embed/' + AJS.$(this).attr('href').substring(31) + '" frameborder="0" allowfullscreen></iframe>'); }); }); </script>
It'll work for YouTube videos with a URL in this format: http://www.youtube.com/watch?v=RcVyl9X3gFo but not this format: http://www.youtube.com/watch?v=RcVyl9X3gFo&feature=related
Elaborate the nasty hack with more JavaScript
You have at least two choices to add video links itself:
If you are looking for a solution to really embed the video than you need some development. It could be an Application link plugin or a Remote issue link plugin. As a third alternative it could be a new Renderer.
Well I was thinking about actually embedding a video in a comment.
I am not a developer and I guess that if there isn't a plugin or a simple way to do it then I can't have it.
Thank you
Thank you so much, it works perfectly and just the thing we need !!
not big but definitely clever!
hahah!
Classic David! You JS hack you!
Another non hacking solution is to use the built in html macro of Jira. By default it is disabled for XSS security reasons but after enabling (as it is detailed at the comments of https://confluence.atlassian.com/display/JIRA/Editing+Rich-Text+Fields) you can use any embedding e.g.
{html} <iframe width="560" height="315" src="https://www.youtube.com/embed/v41Z7eOxMZ0" frameborder="0" allowfullscreen> </iframe> {html}
If wiki style renderer is configured for the field. https://confluence.atlassian.com/display/JIRA/Configuring+Renderers
I have a good news for you. We have just released "Video macros" on https://marketplace.atlassian.com/plugins/com.verhas.atlassian.macro.video . Give it a try. It is free and easy to use, no hacking, no configuration, no XSS risk. If you like please rate it voting for codegeist before 16. July 2012.
And thanks again for inspiration.
It looks like you're new here. Sign in or register to get started.