feat: 运行时回调可切换 + HLS/DASH 引擎开箱即用 + React/Vue 回归测试 - #47
Merged
Merged
Conversation
- core: 新增 setCallbacks(),onPrev/onNext/onSavePrefs 等可在运行时新增/替换/移除 - core: bindPersistence/bindProgressMemory 的写入目标每次读取当前回调,支持远端/本地运行时切换 - core: hls.js/dashjs 从 optional peer 改为常规 peer,npm 安装自动带上 - react: useBrowserLayoutEffect 创建 player 并维护 ref,父组件 layout effect 即可用 - react: hasXxx 变化时同步 setCallbacks;回调函数替换通过稳定代理动态生效 - vue: hasListener() 检测 prev/next 事件监听,未监听时按钮禁用;watch + onUpdated 同步回调 - test: 新增 react 2 个 + vue 4 个回归测试(ref 时机、回调切换、按钮状态、持久化远端/本地) - 根 test 命令改为三包全跑
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本轮改动(第四轮 review 修复 + 前三轮遗留)
core:运行时回调可切换
setCallbacks():onPrev/onNext/onSavePrefs/onSaveProgress 等可在运行时新增/替换/移除bindPersistence/bindProgressMemory写入目标每次读取当前回调,远端/本地存储运行时自由切换SweetPlayerCallbacks类型导出core:HLS/DASH 引擎开箱即用
hls.js/dashjs从 optional peer 改为常规 peer,npm 7+ 安装 core 自动带上,Chrome/Firefox HLS 与 DASH 不再因缺依赖失败React
useBrowserLayoutEffect创建 player 并维护 forwarded ref,父组件 layout effect 阶段即可读取实例hasXxx布尔驱动 setCallbacks 同步(回调有/无切换),函数替换通过稳定代理动态生效Vue
hasListener()检测 prev/next 事件监听,未监听时按钮保持禁用测试(新增���覆盖历史盲区)
changeset: minor(三包联动)