Skip to content

Add video id data attribute for video widget

Currently we embed videos with the data-url data attribute and substitute the domain to youtube-nocookie in the JS. This could be regarded as misleading.

The video should embed whatever is in data-url as-is.

We could add a data-id data attribute which would make embedding videos easier for devs as they would not need to look up the embed URL, and we could make our request with youtube-nocookie without doing substitutions on the URLs which could be prone for bugs.

We could also add a data-type to differentiate playlists ids from video ids. Nevermind, this can be done by simply looking at the PL prefix on IDs.

Edited by Olivier Goulet