JSPM

@netless/white-video-plugin2

2.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 99
    • Score
      100M100P100Q79959F
    • License MIT

    a video plugin for white-web-sdk which can play video in whiteboard room and sync to everyone in room

    Package Exports

    • @netless/white-video-plugin2

    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 (@netless/white-video-plugin2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    white-video-plugin2

    https://www.npmjs.com/package/@netless/white-video-plugin2

    :注意包名为 @netless/white-video-plugin2,为了兼容 1.x 发了个新包。

    :以下是 2.x 版本的接口,和 1.x 不兼容。如果你有回放中使用了 1.x,可以参考 本项目 做兼容性处理。

    用法

    // 创建 plugins
    const plugins = createPlugins({ "video2": videoPlugin2 });
    plugins.setPluginContext("video2", {
        identity: identity === Identity.creator ? "host" : ""
    });
    // 初始化 sdk 时添加 plugins
    let sdk = new WhiteWebSdk({ plugins });
    
    let room = await sdk.joinRoom(...);
    // 在房间内添加插件教具
    room.insertPlugin("video2", {
        originX: -240, originY: -43, width: 480, height: 86,
        attributes: { src: url, poster: url2, isNavigationDisable: false },
    });

    参数

    interface Context {
        /** 必填,有操作权限者为 "host",观看者为 "guest" */
        identity:"host" | "guest";
    }
    
    interface Attributes {
        /** 视频地址 */
        src: string;
        /** 封面地址 */
        poster?: string;
        /** 是否隐藏标题栏 */
        isNavigationDisable?: boolean;
    }

    License

    The MIT License.