-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments, no blockers. We should set up deploy previews on these repos.
top: 0; | ||
left: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, use inset
which allows setting all 4 props at once
top: 0; | |
left: 0; | |
inset: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep it in mind.
the iframe still has a 100% width and height which in some cases was preferred over right: 0 and bottom: 0. I forget the exact details around it.
else this.removeAttribute('playsinline'); | ||
} | ||
|
||
get poster() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to support poster
? I'd expect that either the youtube embed will be showing it or that users will use media-chrome's poster image element.
set volume(val) { | ||
if (this.volume == val) return; | ||
this.loadComplete.then(() => { | ||
this.api?.setVolume(val * 100); | ||
}); | ||
} | ||
|
||
get volume() { | ||
if (!this.isLoaded) return 1; | ||
return this.api?.getVolume() / 100; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need to keep a cache of values like for volume so that you can get the updated value immediately, since the operation is async. Probably not a blocker, but something to think about.
@@ -0,0 +1,542 @@ | |||
// https://developers.google.com/youtube/iframe_api_reference | |||
|
|||
const EMBED_BASE = 'https://www.youtube.com/embed'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be worth supporting youtube-nocookie.com when enabled via some flag so that it doesn't use cookies
https://support.google.com/youtube/answer/171780?hl=en-GB#zippy=%2Cturn-on-privacy-enhanced-mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker and could be implemented later on.
adds the code + tests from https://github.com/luwes/youtube-video-element