@bitmovin/player-integration-yospace

中文文档
2.11.0发布于 2026/10/23MITTypeScriptCommonJS构建来源已验证近 30 天下载 2253

Bitmovin 玩家的 Yospace 集成

中文使用文档
文档目录18 节
  1. 维护和更新
  2. 对该项目的捐款
  3. 报告玩家错误
  4. 需要更多帮助吗?
  5. 支助和苏丹解放军免责声明
  6. 使用量
  7. 应用程序样本
  8. 基本设置
  9. 高级设置
  10. Ti
  11. 网络操作系统
  12. 推荐 Yospace DVRive 流查询参数
  13. 限制
  14. 发展、贡献、发行
  15. 设置 Dev 环境
  16. 分支与发展
  17. 验证和发布
  18. 原则

Bitmovin 玩家 Yospace 整合

这是一个开源项目,可以使用有Bitmovin Player Web SDK的第三方组件(Yospace).

维护和更新

该项目不是定期维护或更新时间表的一部分。 关于更新请求,请进一步参考下文的指导意见.

对该项目的捐款

作为一个开源项目,我们高兴地接受希望使用该项目的社区的任何和所有改变、更新和修正。 请看 捐款额 详细了解如何捐款.

报告玩家错误

如果您遇到与玩家相关的错误,请通过支持出票系统提高这个.

需要更多帮助吗?

如果您需要帮助更新此项目( 更新、 修改、 修饰或其他) , 且由于任何原因无法贡献, 请向您的 Bitmovin 帐号团队提出您的请求, 该团队可以讨论您的请求 .

支助和苏丹解放军免责声明

作为一项开源项目,而不是核心产品提供,与该项目有关的任何请求、问题或查询都被排除在客户可能与Bitmovin或其他第三方服务提供者或公司共同参与该项目的任何SLA和支持条款之外。 任何更新都完全由贡献者自行决定.

谢谢你的贡献!

使用量

这种集成完全囊括了Yospace的使用. 创建玩家后, 它可以像普通人一样使用 比特莫文玩家 举个例子.

应用程序样本

  1. 遵照指示 Yospace 开发者 6.4 步骤 1 添加 Yospace 的私人 npm 注册到您的设置
  2. 运行 npm install
  3. 运行 npm start

基本设置

平台要求

Yospace Ad 管理 SDK (英语:3.10.0 和更新的) 轮船 现代 JavaScript 语法 并需要在运行时环境中具备以下特性: fetch, (中文(简体) ), Headers, (中文(简体) ), URL, (中文(简体) ), Promise, (中文(简体) ), Number.isNaN, (中文(简体) ), Map, (中文(简体) ), Array.from, (中文(简体) ), Array.prototype.at, (中文(简体) ), Object.hasOwn, (中文(简体) ), setTimeout 财务报告和审定财务报表 setInterval。Yospace不提供多填充。 当瞄准没有完全支持的平台(如更古老的Tizen或WebOS设备)时,确保将 Yospace SDK 作为您构建的一部分并添加所需的多填充.

与国家预防机制

  1. 安装 Yospace 代理管理 SDK : npm i -S @yospace/admanagement-sdk
    • 提示: Yospace 使用私人的国家预防机制登记册,您需要登录使用 authToken 指定您的用户账户。 指示:
    1. 转到 https://yospacerepo.jfrog.io/ 互联网档案馆的存檔,存档日期2013-12-21
    2. 点击右上方的用户菜单
    3. 点击 Set Me Up 在菜单中
    4. 选择 NPM
    5. 点击 Search for Repository 选择 javascript-sdk 或者说 javascript-sdk-release
    6. 点击 Generate Token & Create Instructions 按钮。 这将显示所有所需的细节 .
  2. 安装 Bitmovin 玩家 Yospace 集成 : npm i -S @bitmovin/player-integration-yospace
  3. 导入 BitmovinYospacePlayer 输入代码 : import { BitmovinYospacePlayer } from '@bitmovin/player-integration-yospace';
  4. 导入 Bitmovin Player 代码中的核心 : import { Player } from 'bitmovin-player/modules/bitmovinplayer-core';
  5. 将相关的 Bitmovin 播放器模块添加到 Player 使用静态对象 Player.addModule(...) API (英语). 请注意: bitmovinplayer-advertising-core 财务报告和审定财务报表 bitmovinplayer-advertising-bitmovin 这是这种融合所要求的,必须提供.
  6. 创建新的玩家实例,并通过 BitmovinPlayerStaticAPI 页:1 new BitmovinYospacePlayer(Player, container, config)
  7. 装入 a YospaceSourceConfig 使用您的 Yosace HLS/ DASH URL 。 这是一个 PlayerConfig 带有 Yospace 专用扩展名。 最重要的扩展是 assetType,需要设置。 此外,HLS是在 DASH 之前被选中的,所以如果用户想要播放破碎流,hls配置必须省略.
const playerConfig: PlayerConfig = {
  key: 'YOUR-PLAYER-KEY',
};

const playerContainer = document.getElementById('player');
const bitmovinYospacePlayer = new BitmovinYospacePlayer(Player, playerContainer, playerConfig);

// Create the UI afterwards (see https://github.com/bitmovin/bitmovin-player-ui for details)
const uiManager = UIFactory.buildDefaultUI(player);

// Load a new yospace source
const source: YospaceSourceConfig = {
  // omit 'hls' field if dash stream is intended
  hls: 'your yospace url',
  dash: 'your yospace url',

  // The type of the asset, can be imported: `import { YospaceAssetType } from '@bitmovin/player-integration-yospace';`
  assetType: YospaceAssetType.VOD,
  // one of:
  // - bitmovin.player.ads.yospace.YospaceAssetType.LINEAR
  // - bitmovin.player.ads.yospace.YospaceAssetType.VOD
};

bitmovinYospacePlayer.load(source);

高级设置

政策

由于不同的使用案例可能有不同的规则,我们提供 BitmovinYospacePlayerPolicy 可执行的接口. 在此策略中, 您可以定义在播放时允许哪些动作 .

您可以在初始化后通过拨打 :

bitmovinYospacePlayer.setPolicy(...); // pass in your policy object which implements BitmovinYospacePlayerPolicy

我们还规定了一项违约政策.
见 BitmovinYospace Player 政策 更多细节.

配置

您可以将第三个可选参数传递给玩家构造器 :

const yospaceConfig: YospaceConfiguration = {
  debug: true,
  resourceTimeout: 10, // Timeout in seconds for Yospace analytics beacons and resource requests (Yospace SDK default: 5)
};
// ...
const bitmovinYospacePlayer = new BitmovinYospacePlayer(Player, playerContainer, conf, yospaceConfig);

Ti

Tizen 配置

  • 包含以下切换到玩家配置 :
tweaks: {
    ...
    file_protocol : true, // Required if app is being loaded from file system
    app_id : "Ff4zhu5kqV.TizenBitmovinPlayerAppMode" // This should be your Tizen App Id which needs to be allow-listed in Player License and optionally, Analytics License
}
  • 确定 app id 在您的玩家许可证中被允许列出
  • 在那个 YospaceConfig 设置参数 YospaceConfig.disableServiceWorker 改为 true
  • 在那个 YospaceConfig 设置参数 YospaceConfig.useTizen 改为 true
// Yospace configuration
const yospaceConfig = {
    ...
    disableServiceWorker: true, // Disable Service Worker for Tizen Web App use
    useTizen: true,
};

蒂森·德莫

  • 运行 npm run build-tv
  • 导入 tizen 文件夹(作为 General - > 现有工程) 输入 Tizen Studio 并运行为 Tizen Web 应用程序,或用 tizen-tv 扩展名打开 Visual Studio 代码中的文件夹.

网络操作系统

WebOS 配置

  • 包含以下切换到玩家配置 :
tweaks: {
    ...
    file_protocol : true, // Required if app is being loaded from file system
    app_id : "com.bitmovin.yospace.demo" // This should be your WebOS App Id which needs to be allow-listed in Player License and optionally, Analytics License
}
  • 确定 app id 在您的玩家许可证中被允许列出
  • 在那个 YospaceConfig 设置参数 YospaceConfig.disableServiceWorker 改为 true
  • 在那个 YospaceConfig 设置参数 YospaceConfig.useWebos 改为 true
// Yospace configuration
const yospaceConfig = {
    ...
    disableServiceWorker: true, // Disable Service Worker for Tizen Web App use
    useTizen: true,
};

蒂森·德莫

  • 运行 npm run build-tv
  • 打开 WebOS 在Visual Studio代码中带有WebOS TV扩展名的文件夹,或者直接使用WebOS CLI.
  • 建议数字 : yo.pdt=true 财务报告和审定财务报表 yo.lpa=dur

    广告服务器根据实际的片段持续时间生成一个持续时间,计算出与这些持续时间相匹配的PDT标记. 这保证了与Bitmovin Player最新的行为和期望完全相容.

  • 未建议数字 : yo.pdt=sync 财务报告和审定财务报表 yo.lpa=true

    广告服务器将程序 Date Time 标记与源的预定的站点时钟时间表相匹配,优先安排时间与实际的广告时间相匹配. 如果广告中断超过其计划长度(例如,在30s档位的34s),则显示会执行一个时间线重置,导致最近玩家的版本(v8.184.0+)跳过内容重新调整.

  • 折旧数字 : yo.pdt=false (或省略 yo.pdt(中文(简体) )

    无程序日期 时间标记生成 。 这种模式被贬值,不再推荐.

限制

  • 如果使用 EMSG 标记, 在 Safari 的活流中不支持对广告进行跟踪 。 (Safari不支持EMSG标签)

发展、贡献、发行

设置 Dev 环境

  1. 使用指定的节点.js版本 .nvmrc
  2. 设置您访问 Yopspace 的私人 npm 注册
  3. 运行 npm ci
  4. 使用 npm run start 运行 webpack dev 服务器

分支与发展

  • 这个repo使用语义化的版本. 特性和错误修正应在单独的特性分支中执行,从 main 树枝.
  • 应针对 main 分支
  • 公关应当始终包含更新 变动情况 文件

验证和发布

原则

  • 比特莫文玩家不应被包入由此集成构建所创建的JS文件. 为此,类型可以被导入和使用,但不能被导入/使用代码(包括字符串enums!)

版本与发布记录

@bitmovin/player-integration-yospace 共发布 156 个版本,首次发布于 2019/03/14;过去 12 个月发布了 1 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.11.0latest2026/10/2316 天前
2.10.02025/04/171.6 年前
2.9.22025/03/251.6 年前
2.9.12025/02/111.7 年前
2.9.02024/12/051.9 年前
2.8.02024/10/312 年前

关于 @bitmovin/player-integration-yospace 的常见问题

@bitmovin/player-integration-yospace 是什么?

Bitmovin 玩家的 Yospace 集成

如何安装 @bitmovin/player-integration-yospace?

在项目目录运行 npm install @bitmovin/player-integration-yospace,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:bitmovin-player(^8.206.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bitmovin/player-integration-yospace 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bitmovin/player-integration-yospace 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bitmovin/player-integration-yospace 可以商用吗?

@bitmovin/player-integration-yospace 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bitmovin/player-integration-yospace 的下载量有多少?

根据 npm 官方下载统计,@bitmovin/player-integration-yospace 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,253 次,日均约 75 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bitmovin/player-integration-yospace 还在维护吗?

最新版本 2.11.0 发布于 2026/10/23(16 天前);至今共发布 156 个版本,其中过去 12 个月发布了 1 个;首次发布于 2019/03/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。