From aa68aae034ffa27cd41eb9b7522bb2f775bb7ff7 Mon Sep 17 00:00:00 2001 From: Justin Ribeiro Date: Tue, 26 Nov 2019 09:52:13 -0800 Subject: [PATCH] feat(time): add video start time attr (#6) --- README.md | 8 ++++++++ demo/index.html | 36 +++++++++++++++++++++++++++++------- lite-youtube.js | 3 ++- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7ce7e89..e282375 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ - It's responsive 16:9 - It's accessible via keyboard and will set ARIA via the `videotitle` attribute - It's locale ready; you can set the `videoplay` to have a properly locale based label +- Set the `start` attribute to start at a particular place in a video - You can set `autoload` to use Intersection Observer to load the iframe when scrolled into view. - Loads placeholder image as WebP with a Jpeg fallback @@ -84,6 +85,13 @@ Height and Width are responsive in the component. ``` +## Set a video start time + +```html + + +``` + ## AutoLoad with IntersectionObserver Uses Intersection Observer if available to automatically load the YouTube iframe when scrolled into view. diff --git a/demo/index.html b/demo/index.html index f48620d..a4a13fd 100644 --- a/demo/index.html +++ b/demo/index.html @@ -1,8 +1,11 @@ - + - - + + lite-youtube demo