Installation
Updated: 2026-05-15 10:36:09
This section guides you through installing and configuring the Polyv Live Player SDK in a WeChat Mini Program project.
Prerequisites
- WeChat Developer Tools
- npm or yarn package manager
Environment Configuration Preparation
1. Configure Legal Domain Names
Log in to the WeChat Official Platform, enter the Mini Program management console, and under "Development & Services" -> "Development Management" -> "Development Settings", add the request legal domain name.
https://player.polyv.net;https://livejson.polyv.net;https://live.polyv.net;https://rtas.videocc.net;https://rtas-2.videocc.net;https://api.polyv.net;https://live-normal.polyv.net;
Installation Steps
1. Install via npm
WeChat Mini Program npm Installation Guide
npm install @polyv/wx-live-player-core
# 或使用yarn
yarn add @polyv/wx-live-player-core
2. Build npm
- In WeChat Developer Tools, click
工具->构建npmon the menu bar - Wait for the build to complete
3. Use npm After Build Completion
import PolyvLive from '@polyv/wx-live-player-core'
4. Install via CDN Download
curl https://websdk.videocc.net/wx-live-player-core/latest/polyv-live-player.js -O
Frequently Asked Questions
Q: What if the npm build fails?
A: Please check the following:
- Ensure the npm package has been installed correctly
- Verify the dependencies in package.json are correct
- Try deleting the node_modules directory and reinstalling
- Try downloading the CDN link as an alternative to npm installation
Q: Does the npm installation method count towards the Mini Program package size?
A: Yes, the npm installation method counts towards the Mini Program package size.
Next Steps
- Quick Start - Learn how to use the player SDK
- API Reference - View the complete API documentation
