Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
include:
- arch: arm64
target: aarch64-apple-darwin
runner: macos-15
runner: macos-26
- arch: x64
target: x86_64-apple-darwin
runner: macos-15-intel
runner: macos-26
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
Expand All @@ -81,7 +81,6 @@ jobs:
key: native-v2-macos-${{ matrix.target }}-${{ hashFiles('xtask/src/main.rs', 'third_party/patches/**') }}
- name: Build native dependencies
run: |
test "$(uname -m)" = "${{ matrix.arch == 'arm64' && 'arm64' || 'x86_64' }}"
cargo run --locked -p xtask -- deps build --all \
--profile "$PROFILE" --target "${{ matrix.target }}"
- name: Build C API library
Expand Down Expand Up @@ -112,7 +111,7 @@ jobs:

ios:
name: iOS device staticlib
runs-on: macos-14
runs-on: macos-26
timeout-minutes: 150
env:
IPHONEOS_DEPLOYMENT_TARGET: "13.0"
Expand Down Expand Up @@ -141,7 +140,7 @@ jobs:

tvos:
name: tvOS simulator staticlib
runs-on: macos-14
runs-on: macos-26
timeout-minutes: 150
env:
TVOS_DEPLOYMENT_TARGET: "13.0"
Expand Down
86 changes: 73 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Release

# Build prebuilt erika_capi bundles and attach them to a GitHub Release.
#
# Trigger: push a tag like `v0.1.4` to publish. Use the manual "Run workflow"
# Trigger: push a tag like `v0.1.5` to publish. Use the manual "Run workflow"
# button (workflow_dispatch) to dry-run the builds without publishing (the
# publish job is gated on a tag ref).
#
# Bundles (per platform): liberika_capi.{dylib,a} / erika_capi.dll + libs /
# erika_capi.xcframework / Android ABI archives / OpenHarmony shared libraries,
# iOS/tvOS erika_capi.xcframework bundles / Android ABI archives /
# OpenHarmony shared libraries,
# plus erika.h, LICENSE (MPL-2.0), and THIRD_PARTY_NOTICES.md. Native deps
# (FFmpeg/libass/...) are statically linked via the `lgpl` profile.
#
Expand All @@ -26,7 +27,6 @@ permissions:

env:
PROFILE: lgpl
IPHONEOS_DEPLOYMENT_TARGET: "13.0"
ANDROID_API_LEVEL: "26"
ANDROID_NDK_VERSION: "29.0.14206865"
CARGO_TERM_COLOR: always
Expand All @@ -37,18 +37,18 @@ jobs:
name: macOS ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 150
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
strategy:
fail-fast: false
matrix:
include:
- arch: arm64
host_arch: arm64
target: aarch64-apple-darwin
runner: macos-15
runner: macos-26
- arch: x64
host_arch: x86_64
target: x86_64-apple-darwin
runner: macos-15-intel
runner: macos-26
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -63,7 +63,6 @@ jobs:
key: native-v2-macos-${{ matrix.target }}-${{ hashFiles('xtask/src/main.rs', 'third_party/patches/**') }}
- name: Build native deps + erika_capi
run: |
test "$(uname -m)" = "${{ matrix.host_arch }}"
cargo run -p xtask -- deps build --all --profile "$PROFILE" --target "${{ matrix.target }}"
ERIKA_NATIVE_PROFILE="$PROFILE" ERIKA_NATIVE_TARGET="${{ matrix.target }}" \
cargo build -p erika_capi --release --target "${{ matrix.target }}"
Expand All @@ -89,7 +88,7 @@ jobs:
macos-universal:
name: macOS universal
needs: macos
runs-on: macos-15
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -118,8 +117,10 @@ jobs:

ios:
name: iOS (XCFramework)
runs-on: macos-14
runs-on: macos-26
timeout-minutes: 180
env:
IPHONEOS_DEPLOYMENT_TARGET: "13.0"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -165,6 +166,65 @@ jobs:
name: erika-capi-ios
path: dist/*.zip

tvos:
name: tvOS (XCFramework)
runs-on: macos-26
timeout-minutes: 240
env:
TVOS_DEPLOYMENT_TARGET: "13.0"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
- name: Install native build tools
run: brew install nasm meson ninja pkg-config
- name: Cache native dependencies
uses: actions/cache@v4
with:
path: third_party
key: native-v2-tvos-release-all-min${{ env.TVOS_DEPLOYMENT_TARGET }}-${{ hashFiles('xtask/src/main.rs', 'third_party/patches/**') }}
- name: Build native deps + erika_capi (device + simulators)
run: |
set -euo pipefail
for ENTRY in \
"aarch64-apple-tvos|appletvos|arm64-apple-tvos${TVOS_DEPLOYMENT_TARGET}" \
"aarch64-apple-tvos-sim|appletvsimulator|arm64-apple-tvos${TVOS_DEPLOYMENT_TARGET}-simulator" \
"x86_64-apple-tvos|appletvsimulator|x86_64-apple-tvos${TVOS_DEPLOYMENT_TARGET}-simulator"
do
IFS='|' read -r T SDK CLANG_TARGET <<< "$ENTRY"
SDKROOT="$(xcrun --sdk "$SDK" --show-sdk-path)"
BINDGEN_KEY="${T//-/_}"
export SDKROOT
export "BINDGEN_EXTRA_CLANG_ARGS_${BINDGEN_KEY}=--target=${CLANG_TARGET} -isysroot ${SDKROOT}"
cargo run --locked -p xtask -- deps build --all \
--profile "$PROFILE" --target "$T"
ERIKA_NATIVE_PROFILE="$PROFILE" ERIKA_NATIVE_TARGET="$T" \
cargo +nightly rustc -Z build-std=std,panic_abort --locked \
-p erika_capi --lib --release --target "$T" \
--no-default-features --features libass --crate-type staticlib
done
- name: Assemble XCFramework
run: |
mkdir -p out hdr
cp crates/erika_capi/include/erika.h hdr/erika.h
lipo -create \
target/aarch64-apple-tvos-sim/release/liberika_capi.a \
target/x86_64-apple-tvos/release/liberika_capi.a \
-output out/liberika_capi-sim.a
xcodebuild -create-xcframework \
-library target/aarch64-apple-tvos/release/liberika_capi.a -headers hdr \
-library out/liberika_capi-sim.a -headers hdr \
-output out/erika_capi.xcframework
- name: Package
run: |
bash packaging/bundle.sh erika-capi-tvos \
dist/erika-capi-tvos.zip out/erika_capi.xcframework
- uses: actions/upload-artifact@v4
with:
name: erika-capi-tvos
path: dist/*.zip

windows:
name: Windows ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -449,7 +509,7 @@ jobs:

release:
name: Publish Release
needs: [macos, macos-universal, ios, windows, android, openharmony]
needs: [macos, macos-universal, ios, tvos, windows, android, openharmony]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
Expand All @@ -466,8 +526,8 @@ jobs:
body: |
Prebuilt `erika_capi` C ABI bundles (static `lgpl` profile),
for macOS arm64, macOS x64, macOS universal, Windows x64,
Windows ARM64, iOS, and Android arm64-v8a, armeabi-v7a, x86_64,
and x86, plus OpenHarmony arm64.
Windows ARM64, iOS, tvOS, and Android arm64-v8a, armeabi-v7a,
x86_64, and x86, plus OpenHarmony arm64.

Each archive contains the library, `include/erika.h`, `LICENSE`
(MPL-2.0), and `THIRD_PARTY_NOTICES.md`. See
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@

## Unreleased

## 0.1.5 - 2026-08-03

### Platform support and release artifacts

- Added the tvOS Flutter plugin and native target support for Apple TV devices
and arm64/x86_64 simulators, including Metal presentation, Apple audio and
VideoToolbox integration, subtitles, danmaku, screenshots, and HTTP sources.
- Added `erika-capi-tvos.zip`, containing a tvOS device and universal simulator
`erika_capi.xcframework`, to the automated GitHub Release workflow.
- Added opt-in OpenHarmony prebuilt consumption: the plugin CMake build can
download the tagged `liberika_capi.so`, stage it beside
`liberika_flutter.so`, and fall back to a source build on failure.
- Unified macOS, iOS, and tvOS CI/release builds on macOS 26 runners; macOS x64
is cross-built alongside arm64 before the universal archive is assembled.
- Fixed tvOS platform detection during native dependency builds and accepted
valid zero-length HTTP resources without misclassifying them as truncated.

### Subtitle memory fonts

- Added an in-memory subtitle font registry across Rust, the C API, Dart, and
every native Flutter embedding. Hosts can inspect font faces, select ordered
fallback sets, replace font data, and clear the registry without writing font
files to disk.
- Preserved ordered fallback in the bundled libass build, shared TTC/OTC data
across faces, and invalidated renderer caches when a same-path font is
replaced so active subtitle tracks immediately use the new data.
- Kept registry and selected-font generations separate, replayed libass codec
private data after renderer recreation, and added OpenHarmony and tvOS C API
coverage for the complete memory-font surface.

### Playback recovery

- Added explicit buffering transitions when audio and video input starves. The
playback clock now freezes during a stall and reanchors to recovered media
time instead of running ahead and causing a prolonged frame drop or black
screen after data resumes.

## 0.1.4 - 2026-07-30

### Compatibility notes
Expand Down
Loading
Loading