质量采集默认关闭;粒度分为 basic(基础)、standard(标准)、detailed(详细),开关由 enabled 独立控制。在创建 SDK 会话前调用 odd.quality.setup({ enabled: true, level: 'standard', endpoint: '/api/paas/quality/batches', samplePercent: 100 }) 启用 Player直播/点播、游戏、RTC、IM采集。Player复用媒体事件统计播放缓冲,剔除暂停/seek/后台时间;没有呈现帧回调时不伪造首帧。odd.quality.status() 返回队列与丢弃计数,flush() 尽力推送当前批次,close() 停采并丢弃尾量。默认 HTTP 出口不带 Cookie;接收端的 202 仅表示内存受理。可用 setup(config, async (events, signal) => { ... }) 替换批量出口;适配器必须遵守取消信号。源码清单已接入,release 尚未重建。
Famicom keyboard / 游戏键位:odd.Famicom.Input.Keyboard 提供默认的 KeyboardEvent.code → Famicom.Key 映射;input.keyboard() 返回副本,input.keyboard(mapping) 校验并替换映射,成功返回 true,非法映射返回 false 且保持原值。替换会清除旧按键状态,须重新按下才生效;宿主负责设置界面与保存偏好。Input.isKeyboard(mapping) 可用于加载前校验。默认 Select=G、Start=H、B=J、A=K,方向键与 WASD 均可移动。
Input.Keyboard exposes the default code-to-button map. input.keyboard() returns a copy; input.keyboard(map) validates and replaces it, clears held inputs, and returns a boolean. Input.isKeyboard(map) validates persisted mappings. Preferences and the settings UI belong to the host. Browser regression: serve this repository and open test/famicom.input.html after bash compile.sh.
详细设计、接口与配置统一维护在知识库及专题索引。本 README 保留项目与使用入口;带迭代号或旧 schema 的内容仅作历史/兼容参考,部署以现行专题和实际配置为准。
2.5.25:独立 Player/RTC/IM 的产品皮肤与网站已确认配色同步,字号、尺寸、圆角和安全留白保持。加载 css/odd.products.css 会自动加载 odd.brand-tokens.css,再用 ui.skin({brand,theme}) 选择品牌/深浅。颜色由相邻 www 的 scripts/sync-sdk-brand-tokens.mjs 生成并随本仓提交;独立使用或编译 SDK 不需要 www,也不加载网站背景。详见 皮肤同步。
Player 新增 H.265 原生优先与 WASM 回退,FFmpeg 7.0.1 C 源码、scalar/SIMD 产物与可复现脚本随仓库提供。
聚合 App SDK 已移除。产品应用直接组合独立 Player、RTC、IM、Famicom 实例和可选 UI;巨蟹直播、天秤会议、双子通信的业务流程由网站产品层实现。odd.min.js 仅是独立 SDK 的合并分发文件,不提供 odd.App/odd.app。源码构建配方已更新,未重建 release。
频道普通消息:具名用户使用稳定设备与持久存储;在线广播和可靠消息沿原消息接口,媒体发现仍使用 events。
Shared regional discovery / 共享地域入口:接口说明。IM、RTC、Player复用公开地域提示;媒体目标、凭据和原子分配保持各自职责。
正常密钥轮转已接入按需重取:HTTP 明确凭据失效最多重试一次;频道 IM 新连接主动取新票据。已建立的连接不因普通换钥断开。
IM fetch(conversationId, cursor, limit)一次获取一页,默认50、可请求1–64条;不加查询速度/次数限制。页保存后的自动COMMIT同样免于查询限速,连接背压及原存储预算保留。实际页可因编码预算少于请求条数,继续使用nextCursor翻页。
R-075 新增RTC 产品参与接口:同一实例多路发布/订阅共享用户凭据与参与生命周期。节点WHIP/WHEP、独立资源管理证明和平台调度回调已有源码接线;调度、分发与运行覆盖按知识库对应专题分别记录。
产品直播的WHIP/WHEP、HTTP-FLV/CMAF已接新版App凭据与独立媒体证明,复用既有credentials回调;直播不注册RTC参与,按所属live产品计字节。本次仅源码接线,release未重建。
R-070 的独立视图、共享订阅、AppID 握手绑定与模块设置见 组合接口。本轮在 dev 分支迭代;网站已运行源代码组合构建和设置页浏览器检查,实时服务联调仍未执行。
odd.js is a modular Web SDK family for media playback, real-time communication, instant messaging, and cloud gaming. It provides a shared browser foundation together with independent Player, RTC, IM, and Famicom SDKs; keeps protocol and runtime logic separate from optional UI plugins; and supports multiple independently managed instances. The corresponding server-side runtime for communication, signaling, media routing, and cloud gaming is odd.d.
odd.js 是面向媒体播放、实时通信、即时消息与云游戏的模块化 Web SDK 系列。它以共享浏览器基础库为底座,提供 独立的 Player、RTC、IM、Famicom SDK,并将协议及运行时逻辑与可选 UI 插件分离,支持多个实例独立运行。通信、信令、媒体路由及云游戏所需的配套服务器为 odd.d。
- QQ 群:528109813
- Skype: live:670292548
- Email: [email protected]
BSD 3-Clause License (NOTICE)
IM accepts short signed tickets as well as legacy opaque tickets. The IM example uses /session im.admissionVersion to avoid periodic v1 channel renewal in v2; the business session still has an expiry. Live-channel creation and explicit timed / permanent restrictions replace the old ambiguous banned/muted member writes. An active subscription may request a fresh ordinary grant after a low-frequency restriction event; closed subscriptions and media publishers are not resurrected.
For credentials.version=2, native HLS loads the signed manifest URL directly and refreshes its proof at 75% of playbackUntil, without playback POST/PATCH/DELETE. Refreshing replaces the native media URL and can affect continuity; this was not exercised in a browser. v1 behavior below remains available. External DASH clients can use the same signed GET URL; no native DASH module is included.
SRC supports protected HLS on browsers with native HLS playback. Supply an
explicit streamId, a configured manifest URL, mode: 'live', and an async
credentials(context) callback. The context includes protocol HLS, format
cmaf or mpegts, connectionId, decimal-string generation, renew, and signal.
Forward only the media API fields; keep connectionId/generation unchanged when
renew is true. Return the backend credential response including playbackUntil.
SRC opens a bounded playback session, uses per-session HttpOnly cookies and
crossOrigin = 'use-credentials', renews before expiry, and stops the permission
on stop, error, ended or destroy. Changing sources cancels pending work. A lost
DELETE is bounded by the node's playback lifetime. Renewal does not reload the
video or allocate each fragment. Configure exact media-server CORS and a
same-site HTTPS deployment; cookie restrictions still apply. No DASH decode
module or HLS software decoder is added, and no release bundle is rebuilt.
See example/player/protected-hls.md for the source-level integration example.
This delivery was reviewed as source only; no build, test or browser was run.
E08a connects optional strict-durability IndexedDB storage, partition-bound UUIDv7 sends, durable receive/COMMIT and reconnect recovery to the M=1 server source. See configuration and the storage contract. The existing UI remains M=0. No release bundle was rebuilt and no build, test or browser verification was performed.
E08a 已接通可选 IndexedDB、分区 UUIDv7、先落盘后确认及原 ID 重连恢复的 SDK/服务端源码; 现有 UI 仍走 M=0。参见接入及适配器契约。 未重建 release,未编译、测试或运行浏览器。
网站审批后的只读呈现:IM 只读会话。