Package Exports
- @polyv/webar
- @polyv/webar/lib/polyv-webar.common.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polyv/webar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@polyv/webar
接入方式
// 外链引入
<script src="https://cdn.polyv.net/webar/polyv-webar.umd.js"></script>
<script>
// 判断是否支持
const isSupport = PolyvWebArSDK.PlvAr.isSupport();
const ar = new PolyvWebArSDK.PlvAr({
input?: MediaStream,
background?: {
type: 'image',
src: string
}
});
</script>参数
SDK初始化时支持以下参数:
| 参数 | 说明 | 类型 | 是否必传 |
|---|---|---|---|
input |
输入源 | MediaStream | 否 |
background |
背景参数 | Object | 否 |
ps: 可参考腾讯美颜SDK背景分割部分