Is there a way to embed a video link in Jira?

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 !

4 answers

1 accepted

3 votes
David Simpson Community Champion Jun 05, 2012

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 :)

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! :)

David Simpson Community Champion Apr 07, 2013

If you're going to start adding cruft like this to the Announcement Banner, perhaps add it as an external JavaScript file. You could host it on another server for easier access if required.

This feels slightly nicer:

<script src="/path/to/hackfest.js"></script>

hackfest.js is of course your big pile of nasty hacks.

You have at least two choices to add video links itself:

  • URL type customfield
  • Web link adding a new link and selecting the web link type

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

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

134 views 0 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you