/
YouTube in Confluence macro usage

YouTube in Confluence macro usage

This app has been retired from the Atlassian Marketplace
See the announcement blogpost – We're retiring YouTube in Confluence – for more information.

YouTube in Confluence supports embedding individual videos and also playlists.

When you paste a YouTube URL into the Confluence editor it will attempt to generate the correct embed URL and display an embedded video.

Macro Parameters

Macro Parameter Name

Description

Macro Parameter Name

Description

Width

Defaults to full width, but can be specified as a pixel value e.g. 600

Height

Defaults to 600 pixels, but can be specified as a pixel value e.g. 400

Aspect Ratio

Use this instead of a height to maintain correct aspect ratios at all screen sizes.

There are a variety of aspect ratio, but the most common are:

  • 16 / 10 or 16 / 9 for landscape

  • 1 / 1 (square)

  • 9 / 16 or 10 / 16 for portrait videos.

Examples of supported YouTube URLs

Description

URL pattern examples

Expected macro output

Description

URL pattern examples

Expected macro output

Normal video URLs

https://youtube.com/watch?v={} https://m.youtube.com/watch?v={} https://www.youtube.com/watch?v={}

Example:
https://www.youtube.com/watch?v=FEhPhnkX4SA

Normal videos with a specific start time

https://youtube.com/watch?v={}&start=30 https://m.youtube.com/watch?v={}&start=30 https://www.youtube.com/watch?v={}&start=30

Note that the start time is in seconds only, e.g. &start=30

Example:
https://www.youtube.com/watch?v=1AnG04qnLqI&start=30

/v/ URLs

https://youtube.com/v/{} https://www.youtube.com/v/{}

Example:
https://www.youtube.com/v/FEhPhnkX4SA

/v/ URLs with a specific start time

Note that the start time is in seconds only, e.g. &start=30

Example:
https://www.youtube.com/v/1AnG04qnLqI?start=30

Short link video URLs

Example:
https://youtu.be/FEhPhnkX4SA

Short link video URLs with a specific start time

Note that the start time is in seconds only, e.g. &start=30

Example:
https://youtu.be/1AnG04qnLqI?start=30

Playlist URLs

Example:
https://www.youtube.com/playlist?list=PL-9DkOQ9HIokIRFTQIlSnCIjIRdQcnARw

Embed URLs

Example:
https://www.youtube.com/embed/FEhPhnkX4SA

Embed URLs with a specific start time

Note that the start time is in seconds only, e.g. ?start=30

Example:
https://www.youtube.com/embed/1AnG04qnLqI?start=30

Embed playlist URLs

Example:
https://www.youtube.com/embed/videoseries?list=PL-9DkOQ9HIokIRFTQIlSnCIjIRdQcnARw

Â