JSPM

@polyv/webar

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q52136F
  • License ISC

A Polyv WebAr Project

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背景分割部分