Skip to content

feat: add ohos support#25

Merged
Predidit merged 1 commit intoPredidit:mainfrom
ErBWs:kazumi-pr
Feb 9, 2026
Merged

feat: add ohos support#25
Predidit merged 1 commit intoPredidit:mainfrom
ErBWs:kazumi-pr

Conversation

@ErBWs
Copy link

@ErBWs ErBWs commented Feb 9, 2026

@Predidit

增加 ohos 的支持

因为现在 ohos 的 libmpv 已经支持使用 GitHub action 进行构建,同步到这个仓库可以更方便的增加 hls 广告跳过功能

* add ohos libs

* add platform support

* chore: gitignore

* remove sign

* fail to load dynamic library

* Create VideoOutput.ets

* maybe useless

* clean lookup

* texture is not working

* fix ohos  texture

* work

* add cmake download script

* clean test code

* fix: cannot use wakelock on ohos

* fix: another try to fix wakelock

---------

Co-authored-by: Aloereed <huzheng.zg@qq.com>
@Predidit
Copy link
Owner

Predidit commented Feb 9, 2026

这个实现我没有任何意见,我并不能看懂 ohos 部分的代码,但是看上去它们没有任何侵入性,不会破坏现有的部分

虽然引入了 wakelock_ohos ,但是这是个托管在 pub.dev 上的标准的依赖,没有引入任何 pub.dev 和 github 之外的依赖

现在如果要适配广告过滤,应该只要给 ohos 的 ffmpeg 移植现有的补丁就行了

真遗憾 alex 没有接受这个分支

@Predidit Predidit merged commit 7d1e3f8 into Predidit:main Feb 9, 2026
19 checks passed
@ErBWs ErBWs deleted the kazumi-pr branch February 9, 2026 09:55
@ErBWs
Copy link
Author

ErBWs commented Feb 9, 2026

现在如果要适配广告过滤,应该只要给 ohos 的 ffmpeg 移植现有的补丁就行了

是的,我后面准备将构建脚本的仓库转移到一个组织中并建立一个 fork 来应用补丁,不过我现在还卡在怎么适配 kazumi 新的 webview 逻辑

@Predidit
Copy link
Owner

Predidit commented Feb 9, 2026

是的,我后面准备将构建脚本的仓库转移到一个组织中并建立一个 fork 来应用补丁,不过我现在还卡在怎么适配 kazumi 新的 webview 逻辑

我觉得修改 KazumiDialog ,实现一个全局 ovserlay ,向这个 overlay 填充 1x1 的 webview 可能是不错的解法?

此外, kazumi 主分支的 media_kit 已经指向我们当前的最新提交,这样 ohos 分支在这里应该不再有 diff

@Predidit
Copy link
Owner

Predidit commented Feb 9, 2026

遗憾的是,我并不能实际编写和测试 overlay 的相关代码,因为 PlatformView 和 ovserlay 的交互一直很奇怪,我不能在没有 ohos 设备的情况下测试它们

@ErBWs
Copy link
Author

ErBWs commented Feb 9, 2026

这样 ohos 分支在这里应该不再有 diff

应该还不是完全一样,因为主仓库没有 override media_kit_libs_ohos

我重新调整了 ohos 分支的 pubspec,通过 pubspec_overrides.yaml 来覆盖 ohos 的插件,让 pubspec.yaml 与主仓库一致,但是需要在 pubspec.yaml 增加 ohos 的 inappwebview 和 media_kit。

Github 现在正在遭遇网络问题,我的 ci 也 fail 了没能成功发布新版本,我预计今天下午或者晚上给主仓库提交一个 pr 来同步 pubspec 的改动,不知道是否可以接受。具体修改可以看这个 commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants