From 1faaf37fcda77332e8e97591d75790e7067e9501 Mon Sep 17 00:00:00 2001 From: Thomas Jaggi Date: Mon, 27 Mar 2023 12:00:48 +0200 Subject: [PATCH] Add dnt attribute --- lite-vimeo.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lite-vimeo.ts b/lite-vimeo.ts index 471563d..3a0e02a 100644 --- a/lite-vimeo.ts +++ b/lite-vimeo.ts @@ -113,6 +113,10 @@ export class LiteVimeoEmbed extends HTMLElement { } } + get dnt(): string { + return this.getAttribute('dnt') || '0'; + } + /** * Define our shadowDOM for the component @@ -292,7 +296,7 @@ export class LiteVimeoEmbed extends HTMLElement { const apValue = ((this.autoLoad && this.autoPlay) || (!this.autoLoad)) ? "autoplay=1" : ""; const srcUrl = new URL( - `/video/${this.videoId}?${apValue}&#t=${this.videoStartAt}`, + `/video/${this.videoId}?${apValue}&dnt=${this.dnt}&#t=${this.videoStartAt}`, "https://player.vimeo.com/" );