Bitmovin 玩家 Yospace 整合
这是一个开源项目,可以使用有Bitmovin Player Web SDK的第三方组件(Yospace).
维护和更新
该项目不是定期维护或更新时间表的一部分。 关于更新请求,请进一步参考下文的指导意见.
对该项目的捐款
作为一个开源项目,我们高兴地接受希望使用该项目的社区的任何和所有改变、更新和修正。 请看 捐款额 详细了解如何捐款.
报告玩家错误
如果您遇到与玩家相关的错误,请通过支持出票系统提高这个.
需要更多帮助吗?
如果您需要帮助更新此项目( 更新、 修改、 修饰或其他) , 且由于任何原因无法贡献, 请向您的 Bitmovin 帐号团队提出您的请求, 该团队可以讨论您的请求 .
支助和苏丹解放军免责声明
作为一项开源项目,而不是核心产品提供,与该项目有关的任何请求、问题或查询都被排除在客户可能与Bitmovin或其他第三方服务提供者或公司共同参与该项目的任何SLA和支持条款之外。 任何更新都完全由贡献者自行决定.
谢谢你的贡献!
使用量
这种集成完全囊括了Yospace的使用. 创建玩家后, 它可以像普通人一样使用 比特莫文玩家 举个例子.
应用程序样本
- 遵照指示 Yospace 开发者 6.4 步骤 1 添加 Yospace 的私人 npm 注册到您的设置
- 运行
npm install - 运行
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 作为您构建的一部分并添加所需的多填充.
与国家预防机制
- 安装 Yospace 代理管理 SDK :
npm i -S @yospace/admanagement-sdk- 提示: Yospace 使用私人的国家预防机制登记册,您需要登录使用
authToken指定您的用户账户。 指示:
- 转到 https://yospacerepo.jfrog.io/ 互联网档案馆的存檔,存档日期2013-12-21
- 点击右上方的用户菜单
- 点击
Set Me Up在菜单中 - 选择
NPM - 点击
Search for Repository选择javascript-sdk或者说javascript-sdk-release - 点击
Generate Token & Create Instructions按钮。 这将显示所有所需的细节 .
- 提示: Yospace 使用私人的国家预防机制登记册,您需要登录使用
- 安装 Bitmovin 玩家 Yospace 集成 :
npm i -S @bitmovin/player-integration-yospace - 导入
BitmovinYospacePlayer输入代码 :import { BitmovinYospacePlayer } from '@bitmovin/player-integration-yospace'; - 导入 Bitmovin
Player代码中的核心 :import { Player } from 'bitmovin-player/modules/bitmovinplayer-core'; - 将相关的 Bitmovin 播放器模块添加到
Player使用静态对象Player.addModule(...)API (英语). 请注意:bitmovinplayer-advertising-core财务报告和审定财务报表bitmovinplayer-advertising-bitmovin这是这种融合所要求的,必须提供. - 创建新的玩家实例,并通过
BitmovinPlayerStaticAPI页:1new BitmovinYospacePlayer(Player, container, config) - 装入 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.
推荐 Yospace DVRive 流查询参数
-
建议数字 :
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 环境
- 使用指定的节点.js版本
.nvmrc - 设置您访问 Yopspace 的私人 npm 注册
- 运行
npm ci - 使用
npm run start运行 webpack dev 服务器
分支与发展
- 这个repo使用语义化的版本. 特性和错误修正应在单独的特性分支中执行,从
main树枝. - 应针对
main分支 - 公关应当始终包含更新 变动情况 文件
验证和发布
- 特别是当更新 Yospace SDK 时,此工程应该随后验证 https://developer.yospace.com/sdk-documentation/javascription/userguide/yosdk/latest/en/validate-yur-app.html 互联网档案馆的存檔,存档日期2014-12-21。可以使用以下步骤的样本页来完成这项工作:
- 运行
npm start - 打开
localhost:8080?validation=true在浏览器中 - 从列表中选择一个源开始播放和验证日志. 或者您可以添加 URL 参数
autoLoadSource=1(以装入列表中的第一个来源). - 保存控制台日志并上传到 Yospace 验证工具
- 运行
- 重新发布新版本完全自动化. 它可以使用 发布新版本 Github 行动
main树枝。 工作流程将:- 根据当前版本自动在
package.json变动情况[Unreleased]页:1CHANGELOG.md - 构建项目
- 标记在 git 中的新发行
- 在 GitHub 上创建新版本
- 发布更新到 无
- 根据当前版本自动在
原则
- 比特莫文玩家不应被包入由此集成构建所创建的JS文件. 为此,类型可以被导入和使用,但不能被导入/使用代码(包括字符串enums!)