Configure ApsaraVideo for VOD
Configure ApsaraVideo for VOD
Follow these steps:
1. Activate ApsaraVideo for VOD: Go to https://vod.console.aliyun.com/ and click Activate Service. On the ApsaraVideo for VOD page, purchase a plan that fits your needs. (If your plan's data transfer quota is exhausted, videos will not play. To resolve this, purchase a data transfer plan. Similarly, if you reach your storage limit, purchase a transcoding pack and a storage plan to upload more videos.)
2. Add a domain name: After activation, click Go to ApsaraVideo for VOD console in the dialog box. On the console page, click Add Domain Name, enter the required information, and click Submit.
Domain name information:
Add a prefix such as v. to the domain name bound to your website's backend (for example, v.example.com).
Type: VOD system bucket.
Port: 80.
Acceleration Region: Select a region based on your needs.
3. Click the back arrow icon (←) to return to the domain management page. To copy the CNAME record value, hover over the icon next to your domain's configuration status and click the copy icon in the pop-up.
4. In the left-side navigation pane, under Products and Services, search for and click Domains to open the domain console. Navigate to domain management > DNS settings and click Add DNS Record.
DNS record information:
Record type: CNAME.
Host record: v.
Record value: Paste the CNAME record value that you copied.
You can leave the other fields at their default values.
5. Configure Alibaba Cloud API credentials: Hover over your profile avatar and click AccessKey Management > Get Started with a RAM User's AccessKey. On the Users page, create a new RAM user.
Note: For improved security, use a RAM user for authorization and grant it only video-related permissions.
6. Grant permissions: On the Users page, for the user you created, click Add Permissions. Search for and select the "SMS", "ApsaraVideo for VOD", and "CDN" permissions, then click OK to complete the authorization.
7. Obtain the AccessKey ID and AccessKey Secret: Click the logon name of the user you created, then navigate to Authentication Management > Create New AccessKey.
In the dialog box, select third-party access as the use case, check the I confirm that I must create an AccessKey checkbox, and click Continue creating.
8. Return to your website's backend and open the designer. Navigate to Function > Function > ApsaraVideo for VOD. Paste the AccessKey ID and AccessKey Secret into their respective input boxes.
In your website's backend designer, open the Function menu, expand the ApsaraVideo for VOD group, and add the component to the canvas. Select the component and click the Edit button on its toolbar to open the video source panel. In the panel, switch to the ApsaraVideo for VOD tab, paste your AccessKey ID and AccessKey Secret, and click save and validate.