mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-16 02:44:51 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61ee6238d5 | ||
|
|
a7717dfcb9 | ||
|
|
337f338224 | ||
|
|
72328aacf6 |
@@ -43,16 +43,12 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
|
||||
- name: Install npm dependencies (bun)
|
||||
- name: Install/Typecheck/Build
|
||||
# We use a `prepare` script that run builds to support git installs.
|
||||
run: bun install
|
||||
|
||||
- name: Build lib
|
||||
run: bun run build
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
# No NPM_TOKEN: auth happens via OIDC trusted publishing (id-token: write above).
|
||||
# Provenance is generated automatically, so NPM_CONFIG_PROVENANCE is not needed.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GIT_AUTHOR_NAME: ${{ github.actor }}
|
||||
GIT_AUTHOR_EMAIL: '${{ github.actor }}@users.noreply.github.com'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# omni
|
||||
# react-native-omni
|
||||
|
||||
A library to have real players on android and web. It uses VLC on android and
|
||||
videojs v10 on the web (ios not implemented yet, PR welcome)
|
||||
@@ -53,14 +53,6 @@ subtitles rendering:
|
||||
|
||||
<summary>ass rendering</summary>
|
||||
|
||||
#### Fonts
|
||||
|
||||
JASSUB only renders glyphs for fonts it has, and does **not** ship a usable
|
||||
default font. Provide the fonts a subtitle references through
|
||||
`source.fonts` (an array of font-file URLs). Optionally set
|
||||
`subtitleAssets.jassub.fontUrl` as a fallback for styles whose font isn't
|
||||
listed. If no matching font is available, that text simply won't appear.
|
||||
|
||||
#### Cross-origin isolation
|
||||
|
||||
jassub's wasm is multi-threaded and relies on `SharedArrayBuffer`, which
|
||||
|
||||
+8
-4
@@ -14,6 +14,7 @@
|
||||
"typecheck": "tsc --noEmit && tsc -p plugin/tsconfig.json --noEmit",
|
||||
"build:plugin": "tsc -p plugin/tsconfig.json",
|
||||
"build": "bun run typecheck && bob build && bun run build:plugin",
|
||||
"prepare": "bun run build",
|
||||
"codegen": "nitrogen --logLevel=\"debug\" && node post-script.js",
|
||||
"release": "semantic-release"
|
||||
},
|
||||
@@ -48,7 +49,10 @@
|
||||
"workspaces": [
|
||||
"example"
|
||||
],
|
||||
"repository": "https://github.com/zoriya/react-native-omni.git",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zoriya/react-native-omni.git"
|
||||
},
|
||||
"author": "Zoe Roux",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/zoriya/react-native-omni/issues",
|
||||
@@ -76,9 +80,9 @@
|
||||
"typescript": "^7.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "19.2.7",
|
||||
"react-native": "0.86.0",
|
||||
"react-native-nitro-modules": "0.36.1"
|
||||
"react": ">=19.0.0",
|
||||
"react-native": ">=0.86.0",
|
||||
"react-native-nitro-modules": ">=0.36.0"
|
||||
},
|
||||
"react-native-builder-bob": {
|
||||
"source": "src",
|
||||
|
||||
+6
-1
@@ -108,7 +108,11 @@ export const OmniView = ({
|
||||
const ref = useRef<HTMLVideoElement>(undefined!);
|
||||
|
||||
const src = player.source?.src[0];
|
||||
const Tech = src?.uri.endsWith("m3u8") ? HlsJsVideo : Video;
|
||||
const isHls =
|
||||
src?.mimeType?.toLowerCase().includes("mpegurl") ||
|
||||
src?.uri.split(/[?#]/)[0]?.toLowerCase().endsWith(".m3u8") ||
|
||||
false;
|
||||
const Tech = isHls ? HlsJsVideo : Video;
|
||||
|
||||
const config = useMemo<HlsMediaConfig | undefined>(() => {
|
||||
const headers = src?.headers;
|
||||
@@ -144,6 +148,7 @@ export const OmniView = ({
|
||||
.map((subtitle) => (
|
||||
<track
|
||||
key={subtitle.id}
|
||||
id={subtitle.id}
|
||||
kind="subtitles"
|
||||
src={subtitle.link}
|
||||
srcLang={subtitle.language}
|
||||
|
||||
Reference in New Issue
Block a user