An implement of this article Play YouTube Videos Through Lightning Web Components
Lightning Embed Video Demo page
There are two ways to install Lightning Web Components Embed Video:
- Using a Scratch Org: This is the recommended installation option. Use this option if you are a developer who wants to experience the app and the code.
- Using an Unmanaged Package: This option allows anybody to experience the sample app without installing a local development environment.
- Set up your environment. Follow the steps in the Quick Start: Lightning Web Components Trailhead project. The steps include:
- Install Salesforce CLI
- Install Visual Studio Code
- Install the Visual Studio Code Salesforce extensions, including the Lightning Web Components extension
- If you haven't already done so, authenticate with your org
sfdx force:auth:web:login
- Clone the repository:
git clone https://github.com/hanabiiii/lightning-embed-video.git
cd lightning-embed-video
- Deploy the app to your org:
sfdx force:source:deploy -x manifest/package -u [your-account]
- Assign the Embed Video permission set to your account:
sfdx force:user:permset:assign -n Embed_Video -u [your-account]
-
Go to your org, in App Launcher, select the Embed Video app.
-
Provide your Youtube Data API key to retrieve Youtube playlist info. For more information, please go to this link.
-
Click this link to install the Embed Video unmanaged package in your org.
-
Select Install for All Users
-
In App Launcher, select the Embed Video app.