├── .editorconfig ├── .github └── workflows │ └── lhci.yml ├── LICENSE ├── index.html ├── package-lock.json ├── package.json ├── readme.md ├── src ├── lite-yt-embed.css └── lite-yt-embed.js ├── testpage ├── poster-image-availability.html └── poster-image-summary.html ├── variants ├── custom-poster-image.html ├── js-api.html ├── multiple-embeds.html ├── params.html ├── pe.html ├── solo.html ├── title.html └── yt.html ├── vercel.json └── youtube-thumbnail-urls.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | 10 | # prettier custom things 11 | quote_type = single 12 | max_line_length = 160 13 | 14 | [src/] 15 | indent_size = 4 16 | indent_style = space 17 | insert_final_newline = true 18 | -------------------------------------------------------------------------------- /.github/workflows/lhci.yml: -------------------------------------------------------------------------------- 1 | name: Build project and Run Lighthouse CI 2 | on: [push] 3 | jobs: 4 | lhci: 5 | name: Lighthouse CI 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v4 9 | - uses: actions/setup-node@v3 10 | with: 11 | node-version: 16 12 | - name: npm install, build 13 | run: | 14 | npm install 15 | - name: run Lighthouse CI 16 | run: | 17 | npm install -g @lhci/cli@0.12.x 18 | lhci autorun --collect.staticDistDir=./variants --upload.target=temporary-public-storage 19 | env: 20 | LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Paul Irish 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
lite-youtube
This poster image (aka thumbnail) is 1280px instead of the default (hqdefault), which is 480px.
13 | This is embedded with custom parameters to make the playback controls not display on the video. 14 | You may use any parameters supported by the YouTube Player. 15 |
17 | See more at https://github.com/paulirish/lite-youtube-embed#custom-player-parameters 18 |
21 | The following embed has the params controls=0 which turns off the UI controls. 22 |
After 2 seconds, the JS is executed and custom element defined.
...
Add the title attribute to display a title prior to clicking the lite element.