@ohos-cpf/3rdloop 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/lib/cli.js +22 -5
- package/lib/doctor.js +111 -10
- package/lib/mcp.js +498 -0
- package/package.json +6 -2
- package/vendor/Archive/data/.index/meta.json +7 -0
- package/vendor/Archive/data/.index/search.db +0 -0
- package/vendor/Archive/data/docs/experiences/arkts-check-tool-pitfalls-baseline-comparison.md +13 -0
- package/vendor/Archive/data/docs/experiences/arkts-deep-path-import-recognition.md +31 -0
- package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-entry-file-case-mismatch.md +25 -0
- package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-import-trailing-slash.md +20 -0
- package/vendor/Archive/data/docs/experiences/arkts-library-source-files-may-be-ts.md +18 -0
- package/vendor/Archive/data/docs/experiences/arkts-typedarray-buffer-interface-cast-compile-fixes.md +36 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-compile-error-clustering-fix.md +24 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-doc-expected-value-runtime-probe.md +35 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-fixture-rawfile-testability-injection.md +33 -0
- package/vendor/Archive/data/docs/experiences/code-linter-chinese-comment-false-positive.md +16 -0
- package/vendor/Archive/data/docs/experiences/esobject-new-expression-variable-tracking.md +33 -0
- package/vendor/Archive/data/docs/experiences/filesystem-case-sensitivity-module-resolution.md +31 -0
- package/vendor/Archive/data/docs/experiences/gitcode-clone-redirect-warning-normal.md +13 -0
- package/vendor/Archive/data/docs/experiences/kn_msgvq1w585ec8319.md +77 -0
- package/vendor/Archive/data/docs/experiences/kn_msovnm6rd46de72c.md +98 -0
- package/vendor/Archive/data/docs/experiences/kn_mspt8vntfe708576.md +87 -0
- package/vendor/Archive/data/docs/experiences/kn_mspu1ei77adbbb48.md +133 -0
- package/vendor/Archive/data/docs/experiences/kn_mspubgak8d30bfce.md +128 -0
- package/vendor/Archive/data/docs/experiences/kn_mspug2de3cb1f7c3.md +115 -0
- package/vendor/Archive/data/docs/experiences/kn_skill_opt_001.md +38 -0
- package/vendor/Archive/data/docs/experiences/loop-artifacts-verification-evidence-triangle.md +19 -0
- package/vendor/Archive/data/docs/experiences/macos-bash-replace-build-ps1.md +19 -0
- package/vendor/Archive/data/docs/experiences/macos-bsd-diff-q-illegal-option.md +15 -0
- package/vendor/Archive/data/docs/experiences/migrate-cjs-compatible-api-version-map-limit.md +17 -0
- package/vendor/Archive/data/docs/experiences/mp3agic-arkts-library-behavior-quirks.md +21 -0
- package/vendor/Archive/data/docs/experiences/ohos-face-detection-scan-api-mapping.md +15 -0
- package/vendor/Archive/data/docs/experiences/pr-metadata-and-diff-integrity-verification.md +12 -0
- package/vendor/Archive/data/docs/experiences/rn-coverage-index-signature-pseudo-member-false-negative.md +32 -0
- package/vendor/Archive/data/docs/experiences/rn-memory-check-severity-calibration.md +21 -0
- package/vendor/Archive/data/docs/experiences/rn-platform-specific-api-exclusion-evidence.md +24 -0
- package/vendor/Archive/data/docs/experiences/rn-upstream-version-diff-pitfalls.md +17 -0
- package/vendor/Archive/data/docs/experiences/rn-version-gap-risk-rating-rules.md +13 -0
- package/vendor/Archive/data/docs/experiences/rn-view-lib-native-contract-diff-fabric-spec.md +16 -0
- package/vendor/Archive/data/docs/experiences/rnoh-adapter-package-version-field-semantics.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-arkts-sqlite-rows-array-format.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-dependency-residue-scan-strategy.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-local-lib-dep-use-tgz.md +53 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-prereserve-rntesterlist.md +17 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-template-compatiblesdkversion-upgrade.md +29 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-turbomodule-shell-adaptation-checklist.md +41 -0
- package/vendor/Archive/data/docs/experiences/rnoh-mcp-build-project-tool-risk.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-npm-devdependencies-version-precheck.md +29 -0
- package/vendor/Archive/data/docs/experiences/rnoh-repo-baseline-version-verification.md +13 -0
- package/vendor/Archive/data/docs/experiences/rnoh-repo-upstream-directory-mapping.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-stateless-library-zero-leak-verification.md +31 -0
- package/vendor/Archive/data/docs/experiences/rnoh-template-npmrc-credential-removal.md +15 -0
- package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-codegen-wiring-verification.md +19 -0
- package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-cpp-methodmap-compatibility-check.md +20 -0
- package/vendor/Archive/data/docs/experiences/scenario-doc-vs-source-signature-diff-four-patterns.md +24 -0
- package/vendor/Archive/data/docs/experiences/static-analysis-grep-cross-validation.md +29 -0
- package/vendor/Archive/demo.js +489 -0
- package/vendor/Archive/index.js +43 -0
- package/vendor/Archive/package.json +16 -0
- package/vendor/Archive/src/constants.js +83 -0
- package/vendor/Archive/src/data/stopwords.txt +110 -0
- package/vendor/Archive/src/data/synonyms.json +25 -0
- package/vendor/Archive/src/data/terms.txt +59 -0
- package/vendor/Archive/src/db/sqlite-backend.js +312 -0
- package/vendor/Archive/src/db/sqlite-schema.js +64 -0
- package/vendor/Archive/src/engine.js +501 -0
- package/vendor/Archive/src/index/index-manager.js +203 -0
- package/vendor/Archive/src/index/index-state.js +94 -0
- package/vendor/Archive/src/index/search-text-builder.js +106 -0
- package/vendor/Archive/src/index.js +22 -0
- package/vendor/Archive/src/parser/api-identifiers.js +121 -0
- package/vendor/Archive/src/parser/api-suffixes.js +48 -0
- package/vendor/Archive/src/parser/heading-normalize.js +40 -0
- package/vendor/Archive/src/parser/markdown-splitter.js +215 -0
- package/vendor/Archive/src/search/catalog-routing.js +87 -0
- package/vendor/Archive/src/search/fts-search.js +289 -0
- package/vendor/Archive/src/search/query-normalizer.js +159 -0
- package/vendor/Archive/src/search/query-rewriter.js +72 -0
- package/vendor/Archive/src/search/search-engine.js +72 -0
- package/vendor/Archive/src/search/snippet.js +64 -0
- package/vendor/Archive/src/store/dir-store.js +103 -0
- package/vendor/Archive/src/store/doc-store.js +36 -0
- package/vendor/Archive/src/tokenizer/lexicon.js +151 -0
- package/vendor/Archive/src/tokenizer/tokenizer.js +167 -0
- package/vendor/Archive/src/types.js +86 -0
- package/vendor/Archive/src/utils/hash.js +16 -0
- package/vendor/Archive/src/utils/lock.js +73 -0
- package/vendor/Archive/src/utils/path-safety.js +96 -0
- package/vendor/Archive/src/utils/paths.js +39 -0
- package/vendor/BadCase/rn/INDEX.md +127 -0
- package/vendor/BadCase/rn/cases/KI-001-webview/350/247/206/351/242/221/346/227/240/346/263/225/346/250/252/345/261/217.md +52 -0
- package/vendor/BadCase/rn/cases/KI-002-fastImage/347/203/255/346/233/264/346/226/260/345/233/276/347/211/207/345/244/261/350/264/245.md +37 -0
- package/vendor/BadCase/rn/cases/KI-003-wechat/347/274/251/347/225/245/345/233/276/346/234/254/345/234/260/345/233/276/347/211/207.md +62 -0
- package/vendor/BadCase/rn/cases/KI-004-wechat/345/233/236/350/260/203/346/227/266/345/272/217.md +47 -0
- package/vendor/BadCase/rn/cases/KI-005-geolocation/345/257/274/345/205/245/350/267/257/345/276/204/345/220/216/347/274/200.md +31 -0
- package/vendor/BadCase/rn/cases/KI-006-SmartRefreshLayout/346/231/272/350/203/275/346/214/207/351/222/210/345/264/251/346/272/203.md +55 -0
- package/vendor/BadCase/rn/cases/KI-007-orientation-locker/344/274/240/346/204/237/345/231/250/345/210/235/345/247/213/345/214/226.md +58 -0
- package/vendor/BadCase/rn/cases/KI-008-orientation-locker/344/274/240/346/204/237/345/231/250/345/274/225/347/224/250/350/256/241/346/225/260.md +47 -0
- package/vendor/BadCase/rn/cases/KI-009-pager-view/345/265/214/345/245/227/346/273/221/345/212/250.md +38 -0
- package/vendor/BadCase/rn/cases/KI-010-screens/346/211/213/345/212/277/345/206/262/347/252/201.md +48 -0
- package/vendor/BadCase/rn/cases/KI-011-spring-scrollview/346/211/213/345/212/277/351/207/215/345/244/215/347/273/221/345/256/232.md +49 -0
- package/vendor/BadCase/rn/cases/KI-012-qr-camera/346/250/252/345/261/217/351/200/202/351/205/215.md +59 -0
- package/vendor/BadCase/rn/cases/KI-013-webview/346/267/261/350/211/262/346/250/241/345/274/217/350/203/214/346/231/257/350/211/262.md +37 -0
- package/vendor/BadCase/rn/cases/KI-014-amap-geolocation/345/233/236/350/260/203/347/274/272/345/244/261.md +42 -0
- package/vendor/BadCase/rn/cases/KI-015-reanimated/350/277/220/350/241/214/346/227/266/346/236/220/346/236/204/345/264/251/346/272/203.md +54 -0
- package/vendor/BadCase/rn/cases/KI-016-fs/346/226/207/344/273/266/350/257/273/345/217/226/347/274/226/347/240/201.md +58 -0
- package/vendor/BadCase/rn/cases/KI-017-blob-util/345/217/202/346/225/260/347/274/226/347/240/201/351/224/231/350/257/257.md +39 -0
- package/vendor/BadCase/rn/cases/KI-018-modal/345/274/271/347/252/227/351/227/252/347/203/201.md +53 -0
- package/vendor/BadCase/rn/cases/KI-019-code-push/351/207/215/345/220/257/351/200/273/350/276/221/345/244/261/346/225/210.md +79 -0
- package/vendor/BadCase/rn/cases/KI-020-netinfo/346/225/217/346/204/237/344/277/241/346/201/257/346/263/204/351/234/262.md +60 -0
- package/vendor/BadCase/rn/cases/KI-021-video/346/234/254/345/234/260/350/247/206/351/242/221/346/222/255/346/224/276/345/274/202/345/270/270.md +79 -0
- package/vendor/BadCase/rn/cases/KI-022-audio-recorder-player/346/236/232/344/270/276/347/274/272/345/244/261.md +38 -0
- package/vendor/BadCase/rn/cases/KI-023-svg/346/270/220/345/217/230/347/273/247/346/211/277/345/244/261/346/225/210.md +62 -0
- package/vendor/BadCase/rn/generalization-log.md +55 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.json +328 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.md +382 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.json +1351 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.md +1176 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.json +538 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.md +1488 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.json +211 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.md +35 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.json +2048 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.md +3866 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.md +40 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.json +751 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.md +883 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.json +1544 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.md +2598 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.json +246 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.md +554 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.json +211 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.md +54 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.json +1626 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.md +2213 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.json +208 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.md +77 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.json +377 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.md +174 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.json +232 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.md +194 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.md +67 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.md +38 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.json +208 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.md +34 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.json +222 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.md +56 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.json +463 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.md +383 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.json +464 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.md +565 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.md +47 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.json +232 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.md +422 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.json +295 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.md +1038 -0
- package/vendor/BadCase/rn/rules/R-01-/345/205/250/345/261/217/347/252/227/345/217/243/347/212/266/346/200/201/347/256/241/347/220/206/345/256/214/346/225/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-02-/350/265/204/346/272/220URI/345/275/242/346/200/201/345/210/206/346/224/257/350/246/206/347/233/226.md +21 -0
- package/vendor/BadCase/rn/rules/R-03-/351/231/204/345/261/236/346/223/215/344/275/234/345/244/261/350/264/245/351/230/273/346/226/255/344/270/273/346/265/201/347/250/213.md +20 -0
- package/vendor/BadCase/rn/rules/R-04-/345/274/202/346/255/245/345/233/236/350/260/203/346/263/250/345/206/214/346/227/266/345/272/217.md +20 -0
- package/vendor/BadCase/rn/rules/R-05-/346/250/241/345/235/227/345/257/274/345/205/245/350/267/257/345/276/204/350/247/204/350/214/203.md +19 -0
- package/vendor/BadCase/rn/rules/R-06-/344/274/240/346/204/237/345/231/250/347/241/254/344/273/266/346/235/203/351/231/220/346/214/211/351/234/200/350/216/267/345/217/226.md +21 -0
- package/vendor/BadCase/rn/rules/R-07-/346/231/272/350/203/275/346/214/207/351/222/210/347/224/237/345/221/275/345/221/250/346/234/237/347/256/241/347/220/206.md +20 -0
- package/vendor/BadCase/rn/rules/R-08-/346/211/213/345/212/277/344/272/213/344/273/266/346/263/250/345/206/214/344/270/216/345/206/262/347/252/201/345/244/204/347/220/206.md +22 -0
- package/vendor/BadCase/rn/rules/R-09-/346/250/252/347/253/226/345/261/217/345/244/232/345/275/242/346/200/201/345/270/203/345/261/200/351/200/202/351/205/215.md +20 -0
- package/vendor/BadCase/rn/rules/R-10-/346/267/261/350/211/262/346/250/241/345/274/217/344/270/273/351/242/230/351/242/234/350/211/262/351/200/202/351/205/215.md +19 -0
- package/vendor/BadCase/rn/rules/R-11-/346/216/245/345/217/243/345/233/236/350/260/203/345/256/236/347/216/260/345/256/214/346/225/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-12-/345/216/237/347/224/237/350/277/220/350/241/214/346/227/266/350/265/204/346/272/220/346/236/220/346/236/204/346/227/266/345/272/217.md +20 -0
- package/vendor/BadCase/rn/rules/R-13-/346/226/207/344/273/266/346/225/260/346/215/256/347/274/226/347/240/201/344/270/216/346/240/274/345/274/217/345/205/274/345/256/271.md +21 -0
- package/vendor/BadCase/rn/rules/R-14-/345/212/250/347/224/273/345/210/235/345/247/213/345/214/226/346/227/266/345/272/217/344/270/216/347/212/266/346/200/201/345/220/214/346/255/245.md +20 -0
- package/vendor/BadCase/rn/rules/R-15-/347/212/266/346/200/201/346/214/201/344/271/205/345/214/226/344/270/216/351/207/215/345/220/257/351/200/273/350/276/221/344/270/200/350/207/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-16-/346/225/217/346/204/237/344/277/241/346/201/257/346/227/245/345/277/227/346/263/204/351/234/262.md +19 -0
- package/vendor/BadCase/rn/rules/R-17-/345/252/222/344/275/223/350/265/204/346/272/220/347/224/237/345/221/275/345/221/250/346/234/237/344/270/216/351/224/231/350/257/257/345/244/204/347/220/206.md +21 -0
- package/vendor/BadCase/rn/rules/R-18-/350/203/275/345/212/233/346/236/232/344/270/276/351/205/215/347/275/256/345/256/214/346/225/264/346/200/247.md +19 -0
- package/vendor/BadCase/rn/rules/R-19-/345/233/276/345/275/242/346/270/262/346/237/223/345/261/236/346/200/247/347/273/247/346/211/277/344/270/216/351/207/215/347/275/256.md +19 -0
- package/vendor/MCP/README.md +490 -0
- package/vendor/MCP/config.json +29 -0
- package/vendor/MCP/package.json +23 -0
- package/vendor/MCP/scripts/analyze-demo-coverage.cjs +1203 -0
- package/vendor/MCP/scripts/analyze-xts-coverage.cjs +1245 -0
- package/vendor/MCP/scripts/deveco_docs.js +247 -0
- package/vendor/MCP/scripts/extract-interfaces.cjs +1487 -0
- package/vendor/MCP/scripts/flutter-analyze-demo-coverage.cjs +666 -0
- package/vendor/MCP/scripts/flutter-analyze-xts-coverage.cjs +684 -0
- package/vendor/MCP/scripts/flutter-extract-interfaces.cjs +1251 -0
- package/vendor/MCP/scripts/flutter-render-spec-doc.cjs +351 -0
- package/vendor/MCP/scripts/render-spec-doc.cjs +347 -0
- package/vendor/MCP/scripts/rn-analyze-demo-coverage.cjs +645 -0
- package/vendor/MCP/scripts/rn-analyze-test-coverage.cjs +614 -0
- package/vendor/MCP/scripts/rn-extract-interfaces.cjs +1462 -0
- package/vendor/MCP/scripts/rn-render-spec-doc.cjs +327 -0
- package/vendor/MCP/scripts/rn-scan-exports.cjs +1336 -0
- package/vendor/MCP/src/client/MCPClientPool.js +220 -0
- package/vendor/MCP/src/config/ConfigLoader.js +189 -0
- package/vendor/MCP/src/executor/ScriptExecutor.js +110 -0
- package/vendor/MCP/src/gateway/Gateway.js +451 -0
- package/vendor/MCP/src/index.js +87 -0
- package/vendor/MCP/src/library/KBToolProvider.js +229 -0
- package/vendor/MCP/src/library/logger.js +60 -0
- package/vendor/MCP/src/registry/ScriptRegistry.js +238 -0
- package/vendor/MCP/src/registry/ToolRegistry.js +111 -0
- package/vendor/MCP/src/types.js +115 -0
- package/vendor/Server/Skills/arkts-library-test-coverage-check/references/MCP_TOOL_USAGE.md +4 -2
- package/vendor/Server/Skills/arkts-library-xts-coverage/SKILL.md +3 -3
- package/vendor/Server/Skills/knowledge-import/SKILL.md +1 -1
- package/vendor/Server/Skills/knowledge-import/references/MCP_TOOL_USAGE.md +12 -4
- package/vendor/Server/Skills/ohos-lib-pr-push/SKILL.md +5 -4
- package/vendor/Server/Skills/rn-library-issue-generalizer/SKILL.md +2 -2
- package/vendor/Server/Skills/rn-library-known-issue-check/SKILL.md +2 -2
- package/vendor/Server/Skills/rnoh-lib-demo-coverage/SKILL.md +1 -2
- package/vendor/Server/Skills/rnoh-lib-test-align/references/port-test-demo-guide.md +1 -1
- package/vendor/Server/Skills/rnoh-lib-xts-coverage/SKILL.md +1 -2
- package/vendor/Server/package.json +5 -1
- package/vendor/VERSION +3 -3
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pr": {
|
|
3
|
+
"id": 8766332,
|
|
4
|
+
"html_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/merge_requests/66",
|
|
5
|
+
"number": 66,
|
|
6
|
+
"state": "merged",
|
|
7
|
+
"title": "fix:修复播放本地视频异常问题",
|
|
8
|
+
"url": "https://api.gitcode.com/api/v5/repos/CPF-RN/rntpc_react-native-video/pulls/66",
|
|
9
|
+
"issue_url": "https://api.gitcode.com/api/v5/repos/CPF-RN/rntpc_react-native-video/pulls/66/issues",
|
|
10
|
+
"body": "fix:修复播放本地视频异常问题",
|
|
11
|
+
"assignees_number": 2,
|
|
12
|
+
"assignees": [
|
|
13
|
+
{
|
|
14
|
+
"id": "6731c8f2fbbddc0c200a6019",
|
|
15
|
+
"login": "zhu_chengcheng",
|
|
16
|
+
"name": "zhu_chengcheng",
|
|
17
|
+
"avatar_url": "https://cdn-img.gitcode.com/fe/bd/f406eb600317d9bbb6a5c23042b49e5193dfbb7a63ee407f5bbfcbabcd177af1.jpg",
|
|
18
|
+
"html_url": "https://gitcode.com/zhu_chengcheng",
|
|
19
|
+
"assignee": true,
|
|
20
|
+
"code_owner": false,
|
|
21
|
+
"accept": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "67fdb69df01e3c566929edd4",
|
|
25
|
+
"login": "gcw_N7oHqLFR",
|
|
26
|
+
"name": "huang_jy",
|
|
27
|
+
"avatar_url": "",
|
|
28
|
+
"html_url": "https://gitcode.com/gcw_N7oHqLFR",
|
|
29
|
+
"assignee": true,
|
|
30
|
+
"code_owner": false,
|
|
31
|
+
"accept": true
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"testers": [
|
|
35
|
+
{
|
|
36
|
+
"id": "6541ccea82d8f837210e92c3",
|
|
37
|
+
"login": "openharmony_ci",
|
|
38
|
+
"name": "openharmony_ci",
|
|
39
|
+
"avatar_url": "https://cdn-img.gitcode.com/cb/be/5cb10620b4e9195576142df69cd44bb84df15d769c2a04eff5bf7324b903022c.png?time=1723462328974",
|
|
40
|
+
"html_url": "https://gitcode.com/openharmony_ci",
|
|
41
|
+
"assignee": false,
|
|
42
|
+
"code_owner": false,
|
|
43
|
+
"accept": true
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"approval_reviewers": [],
|
|
47
|
+
"labels": [
|
|
48
|
+
{
|
|
49
|
+
"id": 13243652,
|
|
50
|
+
"color": "#428BCA",
|
|
51
|
+
"name": "dco检查成功",
|
|
52
|
+
"repository_id": 4369287,
|
|
53
|
+
"created_at": "2026-06-22T16:28:37+08:00",
|
|
54
|
+
"updated_at": "2026-06-22T16:28:37+08:00"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": 13244118,
|
|
58
|
+
"color": "#428BCA",
|
|
59
|
+
"name": "编译成功",
|
|
60
|
+
"repository_id": 4369287,
|
|
61
|
+
"created_at": "2026-06-26T11:30:29+08:00",
|
|
62
|
+
"updated_at": "2026-06-28T11:58:56+08:00"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": 13243949,
|
|
66
|
+
"color": "#428BCA",
|
|
67
|
+
"name": "静态检查成功",
|
|
68
|
+
"repository_id": 4369287,
|
|
69
|
+
"created_at": "2026-06-25T10:06:51+08:00",
|
|
70
|
+
"updated_at": "2026-06-28T11:58:59+08:00"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"created_at": "2026-06-22T16:27:55+08:00",
|
|
74
|
+
"updated_at": "2026-06-28T11:59:47+08:00",
|
|
75
|
+
"closed_at": "2026-06-28T11:59:47+08:00",
|
|
76
|
+
"merged_at": "2026-06-28T11:59:47+08:00",
|
|
77
|
+
"merged_by": {
|
|
78
|
+
"id": "6541ccea82d8f837210e92c3",
|
|
79
|
+
"login": "openharmony_ci",
|
|
80
|
+
"name": "openharmony_ci",
|
|
81
|
+
"avatar_url": "https://cdn-img.gitcode.com/cb/be/5cb10620b4e9195576142df69cd44bb84df15d769c2a04eff5bf7324b903022c.png?time=1723462328974",
|
|
82
|
+
"html_url": "https://gitcode.com/openharmony_ci"
|
|
83
|
+
},
|
|
84
|
+
"draft": false,
|
|
85
|
+
"can_merge_check": true,
|
|
86
|
+
"prune_branch": false,
|
|
87
|
+
"mergeable": true,
|
|
88
|
+
"user": {
|
|
89
|
+
"id": "66f4e6edca8388106d213150",
|
|
90
|
+
"login": "qq_434633291111",
|
|
91
|
+
"name": "wupingyuan",
|
|
92
|
+
"avatar_url": "https://cdn-img.gitcode.com/db/bc/dbbc52140cd3dd95d893359fd9341924a707304a0b81ab802ff56cf008923f45.png",
|
|
93
|
+
"html_url": "https://gitcode.com/qq_434633291111"
|
|
94
|
+
},
|
|
95
|
+
"head": {
|
|
96
|
+
"ref": "br_rnoh0.72",
|
|
97
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
98
|
+
"label": "br_rnoh0.72",
|
|
99
|
+
"repo": {
|
|
100
|
+
"path": "rntpc_react-native-video",
|
|
101
|
+
"name": "rntpc_react-native-video",
|
|
102
|
+
"namespace": {
|
|
103
|
+
"path": "qq_434633291111"
|
|
104
|
+
},
|
|
105
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
106
|
+
"html_url": "https://gitcode.com/qq_434633291111/rntpc_react-native-video.git"
|
|
107
|
+
},
|
|
108
|
+
"user": {
|
|
109
|
+
"id": "66f4e6edca8388106d213150",
|
|
110
|
+
"login": "qq_434633291111",
|
|
111
|
+
"name": "wupingyuan",
|
|
112
|
+
"avatar_url": "https://cdn-img.gitcode.com/db/bc/dbbc52140cd3dd95d893359fd9341924a707304a0b81ab802ff56cf008923f45.png",
|
|
113
|
+
"html_url": "https://gitcode.com/qq_434633291111"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"base": {
|
|
117
|
+
"ref": "br_rnoh0.72",
|
|
118
|
+
"sha": "80a430cdce404a5e90b4c67fffebac7b05eed44f",
|
|
119
|
+
"label": "br_rnoh0.72",
|
|
120
|
+
"repo": {
|
|
121
|
+
"path": "rntpc_react-native-video",
|
|
122
|
+
"name": "rntpc_react-native-video",
|
|
123
|
+
"namespace": {
|
|
124
|
+
"path": "CPF-RN"
|
|
125
|
+
},
|
|
126
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
127
|
+
"html_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video.git"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"mergeable_state": {
|
|
131
|
+
"merge_request_id": 8766332,
|
|
132
|
+
"state": true,
|
|
133
|
+
"status_without_user_auth": true,
|
|
134
|
+
"conflict_passed": true,
|
|
135
|
+
"branch_missing_passed": true,
|
|
136
|
+
"non_ff_passed": true,
|
|
137
|
+
"mr_state_passed": true,
|
|
138
|
+
"merged_by_user_passed": true,
|
|
139
|
+
"work_in_progress_passed": true,
|
|
140
|
+
"resolve_discussion_passed": true,
|
|
141
|
+
"ci_state_passed": true,
|
|
142
|
+
"merge_by_self_passed": true,
|
|
143
|
+
"can_force_merge": true,
|
|
144
|
+
"approval_reviewers_required_passed": true,
|
|
145
|
+
"approval_approvers_required_passed": true,
|
|
146
|
+
"approval_testers_required_passed": true,
|
|
147
|
+
"merge_request_switch": {
|
|
148
|
+
"review_mode": "approval",
|
|
149
|
+
"merge_method": "merge",
|
|
150
|
+
"only_allow_merge_if_all_discussions_are_resolved": true,
|
|
151
|
+
"disable_merge_by_self": true,
|
|
152
|
+
"only_allow_merge_if_pipeline_succeeds": false,
|
|
153
|
+
"disable_squash_merge": false,
|
|
154
|
+
"squash_merge_with_no_merge_commit": false,
|
|
155
|
+
"approval_required_reviewers_count": 0,
|
|
156
|
+
"approval_required_reviewers_branch": "*",
|
|
157
|
+
"add_notes_after_merged": true,
|
|
158
|
+
"mark_auto_merged_mr_as_closed": false,
|
|
159
|
+
"can_force_merge": true,
|
|
160
|
+
"can_reopen": true
|
|
161
|
+
},
|
|
162
|
+
"reason": {},
|
|
163
|
+
"check_tasks_num": 2,
|
|
164
|
+
"all_depend_merge_request_merged_passed": true,
|
|
165
|
+
"approval_approvers_result": 2,
|
|
166
|
+
"approval_testers_result": 2
|
|
167
|
+
},
|
|
168
|
+
"visibility_reason": "public",
|
|
169
|
+
"close_related_issue": true,
|
|
170
|
+
"squash_merge": false
|
|
171
|
+
},
|
|
172
|
+
"files": [
|
|
173
|
+
{
|
|
174
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
175
|
+
"filename": "examples/harmony/build-profile.json5",
|
|
176
|
+
"additions": 2,
|
|
177
|
+
"deletions": 22,
|
|
178
|
+
"blob_id": "4783f0d2d602a4cca0a6c894221885243db6dcef",
|
|
179
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/build-profile.json5",
|
|
180
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/build-profile.json5",
|
|
181
|
+
"patch": "@@ -1,33 +1,13 @@\n {\n \"app\": {\n \"signingConfigs\": [\n- {\n- \"name\": \"default\",\n- \"type\": \"HarmonyOS\",\n- \"material\": {\n- \"certpath\": \"\",\n- \"keyAlias\": \"debugKey\",\n- \"keyPassword\": \"\",\n- \"profile\": \"\",\n- \"signAlg\": \"SHA256withECDSA\",\n- \"storeFile\": \"\",\n- \"storePassword\": \"\"\n- }\n- }\n ],\n \"products\": [\n {\n \"name\": \"default\",\n \"signingConfig\": \"default\",\n- \"targetSdkVersion\": \"5.1.1(19)\",\n- \"compatibleSdkVersion\": \"5.0.1(13)\",\n- \"runtimeOS\": \"HarmonyOS\",\n- \"buildOption\": {\n- \"strictMode\": {\n- \"caseSensitiveCheck\": true,\n- \"useNormalizedOHMUrl\": true\n- }\n- }\n+ \"compatibleSdkVersion\": \"5.0.0(12)\",\n+ \"runtimeOS\": \"HarmonyOS\"\n }\n ],\n \"buildModeSet\": [\n",
|
|
182
|
+
"target_branch": "br_rnoh0.72",
|
|
183
|
+
"source_branch": "br_rnoh0.72",
|
|
184
|
+
"source_project": {
|
|
185
|
+
"id": 10185442,
|
|
186
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
187
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
188
|
+
"path": "rntpc_react-native-video"
|
|
189
|
+
},
|
|
190
|
+
"target_project": {
|
|
191
|
+
"id": 4369287,
|
|
192
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
193
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
194
|
+
"path": "rntpc_react-native-video"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"sha": "4858b2f0e17804a708d6ea6c0eba8a08b95ec786",
|
|
199
|
+
"filename": "examples/harmony/entry/oh-package-lock.json5",
|
|
200
|
+
"status": "deleted",
|
|
201
|
+
"additions": 0,
|
|
202
|
+
"deletions": 29,
|
|
203
|
+
"blob_id": "0000000000000000000000000000000000000000",
|
|
204
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/4858b2f0e17804a708d6ea6c0eba8a08b95ec786/examples/harmony/entry/oh-package-lock.json5",
|
|
205
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/4858b2f0e17804a708d6ea6c0eba8a08b95ec786/examples/harmony/entry/oh-package-lock.json5",
|
|
206
|
+
"patch": "@@ -1,29 +0,0 @@\n-{\n- \"meta\": {\n- \"stableOrder\": true,\n- \"enableUnifiedLockfile\": false\n- },\n- \"lockfileVersion\": 3,\n- \"ATTENTION\": \"THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\",\n- \"specifiers\": {\n- \"@react-native-oh-tpl/react-native-video@../../../harmony/rn_video\": \"@react-native-oh-tpl/react-native-video@../../../harmony/rn_video\",\n- \"@rnoh/react-native-openharmony@../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har\": \"@rnoh/react-native-openharmony@../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har\"\n- },\n- \"packages\": {\n- \"@react-native-oh-tpl/react-native-video@../../../harmony/rn_video\": {\n- \"name\": \"@react-native-oh-tpl/react-native-video\",\n- \"version\": \"5.2.3-rc.4\",\n- \"resolved\": \"../../../harmony/rn_video\",\n- \"registryType\": \"local\",\n- \"dependencies\": {\n- \"@rnoh/react-native-openharmony\": \"file:../react_native_openharmony.har\"\n- }\n- },\n- \"@rnoh/react-native-openharmony@../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har\": {\n- \"name\": \"@rnoh/react-native-openharmony\",\n- \"version\": \"0.72.80\",\n- \"resolved\": \"../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har\",\n- \"registryType\": \"local\"\n- }\n- }\n-}\n\\n",
|
|
207
|
+
"target_branch": "br_rnoh0.72",
|
|
208
|
+
"source_branch": "br_rnoh0.72",
|
|
209
|
+
"source_project": {
|
|
210
|
+
"id": 10185442,
|
|
211
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
212
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
213
|
+
"path": "rntpc_react-native-video"
|
|
214
|
+
},
|
|
215
|
+
"target_project": {
|
|
216
|
+
"id": 4369287,
|
|
217
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
218
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
219
|
+
"path": "rntpc_react-native-video"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
224
|
+
"filename": "examples/harmony/entry/oh-package.json5",
|
|
225
|
+
"additions": 1,
|
|
226
|
+
"deletions": 1,
|
|
227
|
+
"blob_id": "550398f8f7e440d8ee11e919f208c09c83fd40d3",
|
|
228
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/oh-package.json5",
|
|
229
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/oh-package.json5",
|
|
230
|
+
"patch": "@@ -7,7 +7,7 @@\n \"license\": \"\",\n \"dependencies\": {\n '@rnoh/react-native-openharmony': 'file:../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har',\n- '@react-native-oh-tpl/react-native-video': '../../../harmony/rn_video'\n+ '@react-native-ohos/react-native-video': '../../../harmony/rn_video'\n }\n }\n \n",
|
|
231
|
+
"target_branch": "br_rnoh0.72",
|
|
232
|
+
"source_branch": "br_rnoh0.72",
|
|
233
|
+
"source_project": {
|
|
234
|
+
"id": 10185442,
|
|
235
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
236
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
237
|
+
"path": "rntpc_react-native-video"
|
|
238
|
+
},
|
|
239
|
+
"target_project": {
|
|
240
|
+
"id": 4369287,
|
|
241
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
242
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
243
|
+
"path": "rntpc_react-native-video"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
248
|
+
"filename": "examples/harmony/entry/src/main/cpp/CMakeLists.txt",
|
|
249
|
+
"additions": 1,
|
|
250
|
+
"deletions": 1,
|
|
251
|
+
"blob_id": "1cec40495f9acf5833a15a5d9224975a3a9d1925",
|
|
252
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/src/main/cpp/CMakeLists.txt",
|
|
253
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/src/main/cpp/CMakeLists.txt",
|
|
254
|
+
"patch": "@@ -12,7 +12,7 @@ add_compile_definitions(WITH_HITRACE_SYSTRACE)\n set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use\n \n add_subdirectory(\"${RNOH_CPP_DIR}\" ./rn)\n-add_subdirectory(\"${OH_MODULE_DIR}/@react-native-oh-tpl/react-native-video/src/main/cpp\" ./video)\n+add_subdirectory(\"${OH_MODULE_DIR}/@react-native-ohos/react-native-video/src/main/cpp\" ./video)\n \n add_library(rnoh_app SHARED\n \"./PackageProvider.cpp\"\n",
|
|
255
|
+
"target_branch": "br_rnoh0.72",
|
|
256
|
+
"source_branch": "br_rnoh0.72",
|
|
257
|
+
"source_project": {
|
|
258
|
+
"id": 10185442,
|
|
259
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
260
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
261
|
+
"path": "rntpc_react-native-video"
|
|
262
|
+
},
|
|
263
|
+
"target_project": {
|
|
264
|
+
"id": 4369287,
|
|
265
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
266
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
267
|
+
"path": "rntpc_react-native-video"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
272
|
+
"filename": "examples/harmony/entry/src/main/ets/RNPackagesFactory.ets",
|
|
273
|
+
"additions": 1,
|
|
274
|
+
"deletions": 1,
|
|
275
|
+
"blob_id": "6e619e66c3a7e42a20c216bff170e0abe18db8b8",
|
|
276
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/src/main/ets/RNPackagesFactory.ets",
|
|
277
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/src/main/ets/RNPackagesFactory.ets",
|
|
278
|
+
"patch": "@@ -1,5 +1,5 @@\n import { RNPackageContext, RNPackage } from '@rnoh/react-native-openharmony/ts';\n-import { RNCVideoPackage } from '@react-native-oh-tpl/react-native-video/ts';\n+import { RNCVideoPackage } from '@react-native-ohos/react-native-video/ts';\n \n export function createRNPackages(ctx: RNPackageContext): RNPackage[] {\n return [\n",
|
|
279
|
+
"target_branch": "br_rnoh0.72",
|
|
280
|
+
"source_branch": "br_rnoh0.72",
|
|
281
|
+
"source_project": {
|
|
282
|
+
"id": 10185442,
|
|
283
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
284
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
285
|
+
"path": "rntpc_react-native-video"
|
|
286
|
+
},
|
|
287
|
+
"target_project": {
|
|
288
|
+
"id": 4369287,
|
|
289
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
290
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
291
|
+
"path": "rntpc_react-native-video"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
296
|
+
"filename": "examples/harmony/entry/src/main/ets/pages/Index.ets",
|
|
297
|
+
"additions": 1,
|
|
298
|
+
"deletions": 1,
|
|
299
|
+
"blob_id": "36c2c65918f6d75146a243c1dc10e7722f3ecce5",
|
|
300
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/src/main/ets/pages/Index.ets",
|
|
301
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/entry/src/main/ets/pages/Index.ets",
|
|
302
|
+
"patch": "@@ -11,7 +11,7 @@ import {\n RNOHCoreContext\n } from '@rnoh/react-native-openharmony';\n import { createRNPackages } from '../RNPackagesFactory';\n-import { RNCVideo, RNC_VIDEO_TYPE } from \"@react-native-oh-tpl/react-native-video\"\n+import { RNCVideo, RNC_VIDEO_TYPE } from \"@react-native-ohos/react-native-video\"\n \n const arkTsComponentNames: Array<string> = [RNC_VIDEO_TYPE];\n \n",
|
|
303
|
+
"target_branch": "br_rnoh0.72",
|
|
304
|
+
"source_branch": "br_rnoh0.72",
|
|
305
|
+
"source_project": {
|
|
306
|
+
"id": 10185442,
|
|
307
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
308
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
309
|
+
"path": "rntpc_react-native-video"
|
|
310
|
+
},
|
|
311
|
+
"target_project": {
|
|
312
|
+
"id": 4369287,
|
|
313
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
314
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
315
|
+
"path": "rntpc_react-native-video"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
320
|
+
"filename": "examples/harmony/hvigor/hvigor-config.json5",
|
|
321
|
+
"additions": 1,
|
|
322
|
+
"deletions": 1,
|
|
323
|
+
"blob_id": "16105ebc2ac051bf3f755ff3fcc82adda989cf49",
|
|
324
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/hvigor/hvigor-config.json5",
|
|
325
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/hvigor/hvigor-config.json5",
|
|
326
|
+
"patch": "@@ -1,5 +1,5 @@\n {\n- \"modelVersion\": \"5.1.1\",\n+ \"modelVersion\": \"5.0.0\",\n \"dependencies\": {\n },\n \"execution\": {\n",
|
|
327
|
+
"target_branch": "br_rnoh0.72",
|
|
328
|
+
"source_branch": "br_rnoh0.72",
|
|
329
|
+
"source_project": {
|
|
330
|
+
"id": 10185442,
|
|
331
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
332
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
333
|
+
"path": "rntpc_react-native-video"
|
|
334
|
+
},
|
|
335
|
+
"target_project": {
|
|
336
|
+
"id": 4369287,
|
|
337
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
338
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
339
|
+
"path": "rntpc_react-native-video"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"sha": "4858b2f0e17804a708d6ea6c0eba8a08b95ec786",
|
|
344
|
+
"filename": "examples/harmony/oh-package-lock.json5",
|
|
345
|
+
"status": "deleted",
|
|
346
|
+
"additions": 0,
|
|
347
|
+
"deletions": 28,
|
|
348
|
+
"blob_id": "0000000000000000000000000000000000000000",
|
|
349
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/4858b2f0e17804a708d6ea6c0eba8a08b95ec786/examples/harmony/oh-package-lock.json5",
|
|
350
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/4858b2f0e17804a708d6ea6c0eba8a08b95ec786/examples/harmony/oh-package-lock.json5",
|
|
351
|
+
"patch": "@@ -1,28 +0,0 @@\n-{\n- \"meta\": {\n- \"stableOrder\": true,\n- \"enableUnifiedLockfile\": false\n- },\n- \"lockfileVersion\": 3,\n- \"ATTENTION\": \"THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\",\n- \"specifiers\": {\n- \"@ohos/hamock@1.0.0\": \"@ohos/hamock@1.0.0\",\n- \"@ohos/hypium@1.0.21\": \"@ohos/hypium@1.0.21\"\n- },\n- \"packages\": {\n- \"@ohos/hamock@1.0.0\": {\n- \"name\": \"@ohos/hamock\",\n- \"version\": \"1.0.0\",\n- \"integrity\": \"sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==\",\n- \"resolved\": \"https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har\",\n- \"registryType\": \"ohpm\"\n- },\n- \"@ohos/hypium@1.0.21\": {\n- \"name\": \"@ohos/hypium\",\n- \"version\": \"1.0.21\",\n- \"integrity\": \"sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==\",\n- \"resolved\": \"https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.21.har\",\n- \"registryType\": \"ohpm\"\n- }\n- }\n-}\n\\n",
|
|
352
|
+
"target_branch": "br_rnoh0.72",
|
|
353
|
+
"source_branch": "br_rnoh0.72",
|
|
354
|
+
"source_project": {
|
|
355
|
+
"id": 10185442,
|
|
356
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
357
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
358
|
+
"path": "rntpc_react-native-video"
|
|
359
|
+
},
|
|
360
|
+
"target_project": {
|
|
361
|
+
"id": 4369287,
|
|
362
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
363
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
364
|
+
"path": "rntpc_react-native-video"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
369
|
+
"filename": "examples/harmony/oh-package.json5",
|
|
370
|
+
"additions": 1,
|
|
371
|
+
"deletions": 1,
|
|
372
|
+
"blob_id": "bba8863a76695eb3cb1ed6752351b195aa201904",
|
|
373
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/oh-package.json5",
|
|
374
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/harmony/oh-package.json5",
|
|
375
|
+
"patch": "@@ -1,5 +1,5 @@\n {\n- \"modelVersion\": \"5.1.1\",\n+ \"modelVersion\": \"5.0.0\",\n \"description\": \"Please describe the basic information.\",\n \"dependencies\": {\n },\n",
|
|
376
|
+
"target_branch": "br_rnoh0.72",
|
|
377
|
+
"source_branch": "br_rnoh0.72",
|
|
378
|
+
"source_project": {
|
|
379
|
+
"id": 10185442,
|
|
380
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
381
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
382
|
+
"path": "rntpc_react-native-video"
|
|
383
|
+
},
|
|
384
|
+
"target_project": {
|
|
385
|
+
"id": 4369287,
|
|
386
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
387
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
388
|
+
"path": "rntpc_react-native-video"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
393
|
+
"filename": "examples/package.json",
|
|
394
|
+
"additions": 3,
|
|
395
|
+
"deletions": 2,
|
|
396
|
+
"blob_id": "a3462c87077248e2fe579bc5600e6c0cb6904891",
|
|
397
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/package.json",
|
|
398
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/examples/package.json",
|
|
399
|
+
"patch": "@@ -8,10 +8,11 @@\n \"start\": \"react-native start\",\n \"test\": \"jest\",\n \"dev\": \"react-native bundle-harmony --dev\",\n- \"install:video\": \"cd ../ && npm pack && cd ./examples && npm i file:../react-native-ohos-react-native-video-6.13.2-rc.3.tgz\"\n+ \"install:video\": \"cd ../ && npm i --legacy-peer-deps && npm i typescript --legacy-peer-deps && npm pack && cd ./examples && npm i --legacy-peer-deps\",\n+ \"fast:pkg\": \"npm run install:video && npm run dev\"\n },\n \"dependencies\": {\n- \"@react-native-ohos/react-native-video\": \"file:../react-native-ohos-react-native-video-6.13.2-rc.3.tgz\",\n+ \"@react-native-ohos/react-native-video\": \"file:../react-native-ohos-react-native-video-6.13.4.tgz\",\n \"@react-native-oh/react-native-harmony\": \"^0.72.80\",\n \"react\": \"18.2.0\",\n \"react-native\": \"0.72.5\"\n",
|
|
400
|
+
"target_branch": "br_rnoh0.72",
|
|
401
|
+
"source_branch": "br_rnoh0.72",
|
|
402
|
+
"source_project": {
|
|
403
|
+
"id": 10185442,
|
|
404
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
405
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
406
|
+
"path": "rntpc_react-native-video"
|
|
407
|
+
},
|
|
408
|
+
"target_project": {
|
|
409
|
+
"id": 4369287,
|
|
410
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
411
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
412
|
+
"path": "rntpc_react-native-video"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
417
|
+
"filename": "harmony/rn_video/src/main/ets/controller/VideoController.ets",
|
|
418
|
+
"additions": 28,
|
|
419
|
+
"deletions": 13,
|
|
420
|
+
"blob_id": "dc5311fc7d3d49d82e1d26593f16ef848f5ad02d",
|
|
421
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/harmony/rn_video/src/main/ets/controller/VideoController.ets",
|
|
422
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/harmony/rn_video/src/main/ets/controller/VideoController.ets",
|
|
423
|
+
"patch": "@@ -111,9 +111,9 @@ export class VideoController {\n Logger.info(TAG, `createAVPlayer after bind`);\n if (this.flagtd) {\n this.flagtd = false;\n- if (typeof this.url === \"string\") {\n+ if (typeof this.url === \"string\" && this.url.length > 0) {\n this.avPlayer.url = this.url;\n- } else {\n+ } else if (typeof this.url === \"object\") {\n this.avPlayer.fdSrc = this.url;\n }\n Logger.error(TAG, `createAVPlayer need toplay url,after bind:` + this.url);\n@@ -274,14 +274,19 @@ export class VideoController {\n this.avPlayer.on(Events.STATE_CHANGE, async (state) => {\n switch (state) {\n case AvplayerStatus.IDLE:\n- if (typeof this.url === \"string\") {\n+ // 只有在 url 有效时才设置源,避免在 reset 后立即设置无效源\n+ if (typeof this.url === \"string\" && this.url.length > 0) {\n this.avPlayer.url = this.url;\n- } else {\n+ } else if (typeof this.url === \"object\") {\n this.avPlayer.fdSrc = this.url;\n }\n this.playPageThis.onVideoIdle();\n break;\n case AvplayerStatus.INITIALIZED:\n+ // AVPlayer 已成功加载新源,旧 fd 不再被使用,可以安全关闭\n+ if (this.playerThis && typeof this.playerThis.closeOldFd === 'function') {\n+ this.playerThis.closeOldFd();\n+ }\n if (this.playerThis.disableFocus) {\n await this.setAudioRendererInfo(audio.AudioConcurrencyMode.CONCURRENCY_MIX_WITH_OTHERS);\n } else {\n@@ -384,15 +389,17 @@ export class VideoController {\n * @param surfaceId Indicates the surface ID of the surfaceId.\n */\n firstPlay(index: number, url: string | media.AVFileDescriptor, surfaceId: number): void {\n- Logger.info(TAG, `firstPlay, url ${url}`);\n+ Logger.info(TAG, `firstPlay, url type: ${typeof url}, state: ${this.avPlayer?.state}`);\n this.index = index;\n this.url = url;\n this._surfaceId = surfaceId;\n if (this.avPlayer && this.avPlayer.state == AvplayerStatus.IDLE) {\n- if (typeof this.url === \"string\") {\n+ if (typeof this.url === \"string\" && this.url.length > 0) {\n this.avPlayer.url = this.url;\n- } else {\n+ } else if (typeof this.url === \"object\") {\n this.avPlayer.fdSrc = this.url;\n+ } else {\n+ Logger.error(TAG, `firstPlay, invalid url: ${this.url}`);\n }\n } else {\n this.flagtd = true;\n@@ -456,27 +463,35 @@ export class VideoController {\n * @return\n */\n switchVideo(newUrl: string | media.AVFileDescriptor): void {\n- Logger.info(TAG, `switchVideo, newUrl ${newUrl}`);\n- this.bindState();\n+ Logger.info(TAG, `switchVideo, newUrl type: ${typeof newUrl}, state: ${this.avPlayer?.state}`);\n+ // 注意:不要在这里调用 bindState(),否则会重复注册事件监听器\n+ // 导致 onStateChange 被多次触发,在非 IDLE 状态时重复设置 url/fdSrc 引发 5400102 错误\n this.url = newUrl;\n if (this._surfaceId == 0 || this._surfaceId == undefined) {\n- // Logger.info(TAG, `switchVideo, return`);\n+ return;\n+ }\n+ if (!this.avPlayer) {\n+ Logger.info(TAG, `switchVideo, avPlayer not ready, setting flagtd`);\n+ this.flagtd = true;\n return;\n }\n if (AvplayerStatus.IDLE == this.avPlayer.state) {\n- // Logger.info(TAG, `switchVideo, IDLE `);\n+ Logger.info(TAG, `switchVideo, IDLE state, setting source`);\n if (typeof this.url === \"string\") {\n this.avPlayer.url = this.url;\n } else {\n this.avPlayer.fdSrc = this.url;\n }\n } else {\n+ Logger.info(TAG, `switchVideo, non-IDLE state: ${this.avPlayer.state}, stopping...`);\n this.avPlayer.stop().then(\n ()=>{\n- Logger.info(TAG, `switchVideo, reset`);\n+ Logger.info(TAG, `switchVideo, stopped, resetting`);\n this.avPlayer.reset();\n }\n- )\n+ ).catch((err: BusinessError) => {\n+ Logger.error(TAG, `switchVideo, stop error: ${err.code} ${err.message}`);\n+ })\n }\n \n Logger.info(TAG, `switchVideo, state ${JSON.stringify(this.avPlayer.state)}`);\n",
|
|
424
|
+
"target_branch": "br_rnoh0.72",
|
|
425
|
+
"source_branch": "br_rnoh0.72",
|
|
426
|
+
"source_project": {
|
|
427
|
+
"id": 10185442,
|
|
428
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
429
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
430
|
+
"path": "rntpc_react-native-video"
|
|
431
|
+
},
|
|
432
|
+
"target_project": {
|
|
433
|
+
"id": 4369287,
|
|
434
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
435
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
436
|
+
"path": "rntpc_react-native-video"
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"sha": "68a82ccc48f795b9b6bcf5df5200140104bb6a2d",
|
|
441
|
+
"filename": "harmony/rn_video/src/main/ets/view/PlayPlayer.ets",
|
|
442
|
+
"additions": 127,
|
|
443
|
+
"deletions": 25,
|
|
444
|
+
"blob_id": "fa944b97724bdeafb9c93520c61b0be2d8828ba2",
|
|
445
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-video/blob/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/harmony/rn_video/src/main/ets/view/PlayPlayer.ets",
|
|
446
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-video/raw/68a82ccc48f795b9b6bcf5df5200140104bb6a2d/harmony/rn_video/src/main/ets/view/PlayPlayer.ets",
|
|
447
|
+
"patch": "@@ -52,6 +52,7 @@ export interface IPlayPlayer {\n videoJustifyContent: FlexAlign\n videoAlignItems: HorizontalAlign\n matrix: Matrix4.Matrix4Transit\n+ closeOldFd: () => void\n }\n \n const TAG: string = 'RNPlayPlayer'\n@@ -109,6 +110,7 @@ export struct PlayPlayer {\n xComponentController: XComponentController = new XComponentController();\n private surfaceID: number = 0;\n private previousSrc: fs.File | string | undefined = undefined\n+ private pendingCloseSrc: fs.File | string | undefined = undefined\n private orientationChange: boolean = true;\n private isProgressSliding: boolean = false\n private sliderTimer: number = 0\n@@ -191,31 +193,46 @@ export struct PlayPlayer {\n }\n \n closeFsRawFd() {\n- if (typeof this.previousSrc === \"string\") {\n- getContext(this).resourceManager.closeRawFd(this.previousSrc, (error: BusinessError) => {\n- if (error != null) {\n- Logger.debug(TAG, `aboutToDisappear, closeRawFd error is${error.message} error code:${error.code}`);\n- } else {\n- Logger.debug(TAG, `aboutToDisappear, closeRawFd file succeed`);\n+ // 关闭旧的文件资源\n+ try {\n+ if (typeof this.previousSrc === \"string\") {\n+ // rawfile 路径 - 关闭 rawfile fd\n+ getContext(this).resourceManager.closeRawFdSync(this.previousSrc);\n+ Logger.debug(TAG, `closeFsRawFd, closeRawFd succeed for: ${this.previousSrc}`);\n+ } else if (typeof this.previousSrc === \"object\") {\n+ // fs.File 对象 - 关闭文件\n+ fs.closeSync(this.previousSrc);\n+ Logger.debug(TAG, `closeFsRawFd, close file succeed`);\n+ }\n+ // undefined = 使用临时文件方式,无需关闭 rawfile fd\n+ } catch (err) {\n+ Logger.error(TAG, `closeFsRawFd error: ${JSON.stringify(err)}`);\n+ }\n+ this.previousSrc = undefined;\n+ // 同时关闭待关闭的旧 fd\n+ if (this.pendingCloseSrc !== undefined) {\n+ try {\n+ if (typeof this.pendingCloseSrc === \"string\") {\n+ getContext(this).resourceManager.closeRawFdSync(this.pendingCloseSrc);\n+ } else if (typeof this.pendingCloseSrc === \"object\") {\n+ fs.closeSync(this.pendingCloseSrc);\n }\n- });\n- } else if (typeof this.previousSrc === \"object\") {\n- fs.close(this.previousSrc, (err: BusinessError) => {\n- if (err) {\n- Logger.debug(TAG,\n- `aboutToDisappear, close file failed with error message:${err.message},error code:${err.code}`);\n- } else {\n- Logger.debug(TAG, `aboutToDisappear, close file succeed`);\n- }\n- });\n+ } catch (err) {\n+ Logger.error(TAG, `closeFsRawFd pendingCloseSrc error: ${JSON.stringify(err)}`);\n+ }\n+ this.pendingCloseSrc = undefined;\n }\n }\n \n aboutToDisappear(): void {\n if (this.playVideoModel) {\n- this.playVideoModel.release()\n- this.closeFsRawFd()\n+ try {\n+ this.playVideoModel.release()\n+ } catch (err) {\n+ Logger.error(TAG, `aboutToDisappear release error: ${JSON.stringify(err)}`);\n+ }\n }\n+ this.closeFsRawFd()\n }\n \n // @Watch cb\n@@ -226,33 +243,118 @@ export struct PlayPlayer {\n }\n \n async preparePlayer(): Promise<string | media.AVFileDescriptor> {\n- this.closeFsRawFd()\n return new Promise(async (resolve, reject) => {\n try {\n let src: string | media.AVFileDescriptor = '';\n if (this.srcParam.startsWith('http')) {\n this.type = CommonConstants.TYPE_INTERNET\n src = this.srcParam\n+ this.pendingCloseSrc = this.previousSrc\n this.previousSrc = undefined\n } else if (this.srcParam.startsWith('asset')) {\n const fileUrl = this.srcParam.split('//')[1];\n- let fileDescriptor = await getContext(this).resourceManager.getRawFd(`assets/${fileUrl}`);\n- this.previousSrc = `assets/${fileUrl}`\n- src = fileDescriptor;\n+ const rawFilePath = `assets/${fileUrl}`;\n+ Logger.debug(TAG, `asset source, rawFilePath: ${rawFilePath}`);\n+ // fix:修复播放本地视频异常问题\n+ // 方案:将 rawfile 复制到应用沙箱临时目录,再用 file:// URI 播放\n+ // 原因:getRawFd 返回的 AVFileDescriptor 中 offset != 0(rawfile 在 HAP 包内有偏移),\n+ // AVPlayer 的 fdSrc 对 offset!=0 的支持在某些 HarmonyOS 版本上有 bug,\n+ // 会报 5400106 (Unsupported Format: CONTAINER_ERR-null-unsupport container format type)\n+ const context = getContext(this);\n+ const cacheDir = context.cacheDir;\n+ // 使用 rawfile 完整路径生成唯一缓存文件名,避免不同路径的同名文件冲突\n+ const cacheFileName = rawFilePath.replace(/\\//g, '_');\n+ const destPath = `${cacheDir}/${cacheFileName}`;\n+ let needCopy = true;\n+ try {\n+ const stat = fs.statSync(destPath);\n+ const rawFdInfo = await context.resourceManager.getRawFd(rawFilePath);\n+ if (stat.size === rawFdInfo.length) {\n+ needCopy = false;\n+ Logger.debug(TAG, `cache hit: ${destPath}, size=${stat.size}`);\n+ context.resourceManager.closeRawFdSync(rawFilePath);\n+ } else {\n+ Logger.debug(TAG, `cache size mismatch: local=${stat.size}, rawfile=${rawFdInfo.length}`);\n+ context.resourceManager.closeRawFdSync(rawFilePath);\n+ }\n+ } catch (e) {\n+ Logger.error(TAG, `Error cache miss: ${destPath}`);\n+ }\n+ if (needCopy) {\n+ // 将 rawfile 内容读取后写入临时文件\n+ try {\n+ const content: Uint8Array = await context.resourceManager.getRawFile(rawFilePath);\n+ const destFile = fs.openSync(destPath, fs.OpenMode.CREATE | fs.OpenMode.READ_WRITE | fs.OpenMode.TRUNC);\n+ fs.writeSync(destFile.fd, content.buffer);\n+ fs.closeSync(destFile);\n+ Logger.debug(TAG, `copied rawfile to: ${destPath}, size=${content.length}`);\n+ } catch (copyErr) {\n+ Logger.error(TAG, `getRawFile copy failed: ${JSON.stringify(copyErr)}, trying fdSrc fallback`);\n+ try {\n+ let fileDescriptor = await context.resourceManager.getRawFd(rawFilePath);\n+ this.pendingCloseSrc = this.previousSrc\n+ this.previousSrc = rawFilePath;\n+ src = fileDescriptor;\n+ Logger.debug(TAG, `fallback to fdSrc: fd=${fileDescriptor.fd}, offset=${fileDescriptor.offset}, length=${fileDescriptor.length}`);\n+ } catch (fdErr) {\n+ Logger.error(TAG, `getRawFd also failed: ${JSON.stringify(fdErr)}`);\n+ reject(fdErr);\n+ return;\n+ }\n+ resolve(src);\n+ return;\n+ }\n+ }\n+ this.pendingCloseSrc = this.previousSrc\n+ // 打开复制后的临时文件,获取 fd(offset=0 的独立文件,不存在 fdSrc 兼容性问题)\n+ const tempFile = fs.openSync(destPath, fs.OpenMode.READ_ONLY);\n+ this.previousSrc = tempFile; // 记录以便后续关闭\n+ src = `fd://${tempFile.fd}`;\n+ Logger.debug(TAG, `local video source: ${src}`);\n } else if (this.srcParam.startsWith('file:')) {\n- this.previousSrc = fs.openSync(this.srcParam, fs.OpenMode.READ_ONLY)\n- src = `fd://${this.previousSrc.fd}`;\n+ let file = fs.openSync(this.srcParam, fs.OpenMode.READ_ONLY)\n+ this.pendingCloseSrc = this.previousSrc\n+ this.previousSrc = file;\n+ src = `fd://${file.fd}`;\n+ } else if (this.srcParam.length > 0) {\n+ Logger.debug(TAG, `unknown scheme, trying as file path: ${this.srcParam}`);\n+ this.pendingCloseSrc = this.previousSrc\n+ src = this.srcParam;\n+ this.previousSrc = undefined;\n } else {\n+ this.pendingCloseSrc = this.previousSrc\n this.previousSrc = undefined\n- Logger.debug(TAG, `local, finalsrc: ${(src)}`);\n+ Logger.debug(TAG, `empty source, finalsrc: ${src}`);\n }\n resolve(src)\n } catch (error) {\n+ Logger.error(TAG, `preparePlayer error: ${JSON.stringify(error)}`);\n reject(error)\n }\n })\n }\n \n+ /**\n+ * 关闭旧的文件描述符(在 AVPlayer 完成切换后调用)\n+ * 此时 AVPlayer 已经不再使用旧 fd,可以安全关闭\n+ */\n+ closeOldFd(): void {\n+ if (this.pendingCloseSrc !== undefined) {\n+ try {\n+ if (typeof this.pendingCloseSrc === \"string\") {\n+ getContext(this).resourceManager.closeRawFdSync(this.pendingCloseSrc);\n+ Logger.debug(TAG, `closeOldFd, closeRawFd succeed for: ${this.pendingCloseSrc}`);\n+ } else if (typeof this.pendingCloseSrc === \"object\") {\n+ fs.closeSync(this.pendingCloseSrc);\n+ Logger.debug(TAG, `closeOldFd, close file succeed`);\n+ }\n+ } catch (err) {\n+ Logger.error(TAG, `closeOldFd error: ${JSON.stringify(err)}`);\n+ }\n+ this.pendingCloseSrc = undefined;\n+ }\n+ }\n+\n onSrcChanged(propName: string): void {\n Logger.debug(TAG, `onSrcChanged,propName: ${JSON.stringify(propName)}`);\n this.preparePlayer().then((src) => {\n",
|
|
448
|
+
"target_branch": "br_rnoh0.72",
|
|
449
|
+
"source_branch": "br_rnoh0.72",
|
|
450
|
+
"source_project": {
|
|
451
|
+
"id": 10185442,
|
|
452
|
+
"full_name": "qq_434633291111/rntpc_react-native-video",
|
|
453
|
+
"human_name": "qq_434633291111 / rntpc_react-native-video",
|
|
454
|
+
"path": "rntpc_react-native-video"
|
|
455
|
+
},
|
|
456
|
+
"target_project": {
|
|
457
|
+
"id": 4369287,
|
|
458
|
+
"full_name": "CPF-RN/rntpc_react-native-video",
|
|
459
|
+
"human_name": "CPF-RN / rntpc_react-native-video",
|
|
460
|
+
"path": "rntpc_react-native-video"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
}
|