You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi.
I need to create a macro to display a video or image in a video player.
Having the following code.
## @param tipe:title=Tipo de recurso|type=enum|enumValues=Imagen,Vídeo|required=true|default=none|desc=Elige un tipo (requerido)
## @param image:title=URL de la imagen|type=string|required=false|desc=Introduce la URL de la imagen (requerido)
## @param video:title=URL del vídeo|type=string|required=false|desc=Introduce la URL del vídeo (requerido en caso de vídeo)
## @param width:title=Width|type=string|required=false|default=45%|desc=Ancho (es recomendable dejar como está y solo ajustar si es necesario)
#set ($attachment = $content.getAttachmentNamed($paramvideo))
#if ($paramtipe && $paramtipe=="Imagen")
<img style="margin:0px auto !important; display:block;" class="teaser"
#if ($paramimage && $paramimage.length()>0) src="$paramimage" #end
#if ($paramwidth && $paramwidth.length()>0) width="$paramwidth" #end
>
#end
#if ($paramtipe && $paramtipe=="Vídeo")
<div style="margin:0px auto !important; display:block; text-align:center !important;">
<video style="margin:0px auto !important; display:block; text-align:center !important;" controls
#if ($paramimage && $paramimage.length()>0) src="$paramvideo" poster="$paramimage" #end
#if ($paramwidth && $paramwidth.length()>0) width="$paramwidth" #end
>
<img style="margin:0px auto !important; display:block;" class="teaser" width="$paramwidth" src="$paramimage">
Si tienes problemas para visualizar el vídeo, haz clic <a target="_blank" href="$paramvideo">aquí</a>.</p>
</video>
</div>
#end
Can I use something similar to the next param to replace the url field for an upload selection?
@param file:title=File|type=Allow Upload|required=false|desc=Select a video do use
Regards