Điểm qua paulirish/lite-youtube-embed: 6.4k sao trên GitHub, viết chủ yếu bằng HTML. A faster youtube embed.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Use the lite-youtube-embed npm package or download from this repo and use src/.
To use the custom element you will need to:
Include the stylesheet within your application
Include the script as well
Use the lite-youtube tag via HTML or JS.
Be happy that you're providing a better user experience to your visitors
<!-- Include the CSS & JS.. (This could be direct from the package or bundled) -->
<link rel="stylesheet" href="node_modules/lite-youtube-embed/src/lite-yt-embed.css" />
<script src="node_modules/lite-youtube-embed/src/lite-yt-embed.js"></script>
<!-- Use the element. You may use it before the lite-yt-embed JS is executed. -->
<lite-youtube videoid="goiWrNiaT0I" playlabel="Play: Crayon Physics Deluxe - Trailer HD"></lite-youtube>
Privacy note: the default embed uses youtube-nocookie.com. On browsers that need
the YouTube IFrame Player API, the API script also loads from youtube.com.
Use poster-image-availability.html to determine what poster images are available for you.
Access the YouTube Iframe Player API
Use the js-api param: <lite-youtube videoid="goiWrNiaT0I" js-api>.. Then you can use IFrame Player API:
const player = await document.querySelector('lite-youtube').getYTPlayer();
player.seekTo(15); // jump to 15 seconds
Demo: Iframe Player API usage
One-tap playback in Safari on iPhone and iPad
Safari on iOS/iPadOS blocks audible playback when the YouTube iframe is created after a tap. To make one-tap playback work with sound, lite-youtube automatically prepares the hidden iframe and IFrame Player API ahead of time on iPhone and iPad Safari (trading off some of its usual loading and privacy benefits on those devices).
See autoplay.md for the browser test matrix, history, and comparison test page.
Add a video title
If you want to display a title prior to loading the full embed, set the title attribute:
YouTube supports a variety of player parameters to control the iframe's behavior and appearance.
These may be applied by using the params attribute.
<!-- Example to show a video player without controls, starting at 10s in, ending at 20s,
with modest branding *and* enabling the JS API -->
<lite-youtube videoid="goiWrNiaT0I" params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1"></lite-youtube>
Note that lite-youtube uses autoplay=1 by default.
Demo: Custom player parameters
Other fast YouTube embeds
<lite-youtube> using shadow DOM: justinribeiro/lite-youtube :+1:
React port 1: ibrahimcesar/react-lite-youtube-embed
React port 2: kylemocode/react-lite-yt-embed
React wrapper: @next/third-parties
Vue port: andrewvasilchuk/vue-lazy-youtube-video
Other third-party facades
Lite Vimeo Embed: luwes/lite-vimeo-embed
<lite-vimeo>: slightlyoff/lite-vimeo
React Live Chat Loader (Intercom, Help Scout, Drift, Facebook Messenger): calibreapp/react-live-chat-loader
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/paulirish/lite-youtube-embed là nguồn chính thức.
paulirish/lite-youtube-embed có bao nhiêu sao?
paulirish/lite-youtube-embed có 6.4k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/paulirish/lite-youtube-embed. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
paulirish/lite-youtube-embed có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho paulirish/lite-youtube-embed. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
paulirish/lite-youtube-embed có trang demo không?
Dự án có trang chủ ở https://paulirish.github.io/lite-youtube-embed/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
paulirish/lite-youtube-embed là gì?
paulirish/lite-youtube-embed (paulirish/lite-youtube-embed) là dự án HTML trên GitHub. Theo mô tả gốc: A faster youtube embed.
Đọc đầy đủ README ở tab phía trên.
lite-youtube-embed có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về lite-youtube-embed.