npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lizhi-web-sdk

v0.1.1

Published

互动白板开放平台 SDK 让您不用复杂的编程即可实现在线 ppt 等文档解析、课件预览、直播互动的能力,本文档主要介绍如何通过各平台 SDK 进行快速接入.

Downloads

1

Readme

互动白板开放平台 SDK

欢迎使用立知开发者工具套件,互动白板开放平台 SDK 让您不用复杂的编程即可实现在线 ppt 等文档解析、课件预览、直播互动的能力,本文档主要介绍如何通过各平台 SDK 进行快速接入。

工具套件说明

  • web SDK: 用于在 web 中接入互动白板,提供覆盖全部课件元素的操作和高度自定义的接口。
  • Andriod SDK: 对 web sdk 的封装,主要用于简化安卓平台的接入内容。
  • IOS SDK: 对 web sdk 的封装,主要用于简化苹果设备的接入内容。
  • Jave SDK: 用于后端接口的接入,主要用于获取课件访问码(accessCode)、创建直播房间等。

从 url 中打开

该方式仅针对部分需要简单预览互动的场景,仅仅支持课件初始化,无法调用 web sdk 接口。

websdk.test.imlizhi.com?urlParams=true&accessType=share&accessCode=61ac94e2925a48d7ab5aa6892aa630f8&roomId=281474982062580&token=704ebad652d34df480fb601c097b89e8&uid=1
  • urlParams: boolean 表明是否启用 url 传递参数模式。
  • accessType,accessCode,token,roomId,uid: string 课件初始化参数。

从 HTML(CDN) 引入 Web SDK

Web SDK 下载

<!--index.html-->
<script src="http://websdk.test.imlizhi.com/doc/webSDK.js"></script>
<script>
  const webSDK = new WebSDK();
  webSDK.send({
    name: 'init',
    params: {
      accessCode: '61ac94e2925a48d7ab5aa6892aa630f8',
      token: '704ebad652d34df480fb601c097b89e8',
      accessType: 'share',
      roomId: '281474982062580',
      uid: '1',
    },
  });
</script>

以上代码将打开 accessCode 关联的一份课件,并同步房间内其他用户的操作。

从 npm 引入 Web SDK

安装

npm i @lizhi/web-sdk

使用

// index.js
import WebSDK from 'lizhi-web-sdk';
const webSDK = new WebSDK();
webSDK.send({
  name: 'init',
  params: {
    accessCode: '61ac94e2925a48d7ab5aa6892aa630f8',
    token: '704ebad652d34df480fb601c097b89e8',
    accessType: 'share',
    roomId: '281474982062580',
    uid: '1',
  },
});

从 webView 中引入 web SDK

  1. 准备工作: 初始化 webView 并定位到地址: websdk.test.imlizhi.com
  2. 在 webView 中运行初始化接口,初始化后即可调用其他接口操作。
// 调用接口进行课件初始化
window.webProxy.send({
  name: 'init',
  params: {
    accessCode: '61ac94e2925a48d7ab5aa6892aa630f8',
    token: '704ebad652d34df480fb601c097b89e8',
    accessType: 'share',
    roomId: '281474982062580',
    uid: '1',
  },
});
// 调用接口获取当前课件页ID
window.webProxy.send({
  name: 'enow.stage.getCurrentSlideId',
  params: {},
  // 通过 callback 的方式返回结果
  cbKey: 123,
});
// 异步通知接口返回结果,nativeProxy 为 jsbridge 由调用方实现并接收返回值
window.nativeProxy.callback({ cbKey: 123, result: 'slideId' });

引入 Android SDK

引入 IOS SDK

引入 Java SDK