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

Adar Bronstein June 4, 2012

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

4 votes
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 5, 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 :)

Adar Bronstein June 5, 2012

Thank you so much, it works perfectly and just the thing we need !! :)

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2012

not big but definitely clever!

Ellen Feaheny [AppFusions]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2012

hahah!

Classic David! You JS hack you! :)

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 7, 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.

1 vote
Verhás István
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2012

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

0 votes
Verhás István
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2012

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.

0 votes
Verhás István
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2012

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.

Adar Bronstein June 5, 2012

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

Suggest an answer

Log in or Sign up to answer