diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..35eb1ddfbbc029bcab630581847471d7f238ec53
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MediaKit/.clang-format b/MediaKit/.clang-format
new file mode 100644
index 0000000000000000000000000000000000000000..48439ed68073b99be118d374d1ebd43d04d4c4eb
--- /dev/null
+++ b/MediaKit/.clang-format
@@ -0,0 +1,64 @@
+Language: Cpp
+# BasedOnStyle: LLVM
+ColumnLimit: 120
+SortIncludes: CaseSensitive
+TabWidth: 4
+IndentWidth: 4
+UseTab: Never
+AccessModifierOffset: -4
+ContinuationIndentWidth: 4
+IndentCaseBlocks: false
+IndentCaseLabels: false
+IndentGotoLabels: true
+IndentWrappedFunctionNames: false
+SortUsingDeclarations: false
+NamespaceIndentation: None
+SpaceAfterCStyleCast: false
+SpaceAfterLogicalNot: false
+SpaceAfterTemplateKeyword: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCaseColon: false
+SpaceBeforeCpp11BracedList: false
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceBeforeSquareBrackets: false
+SpaceInEmptyBlock: false
+SpaceInEmptyParentheses: false
+SpacesInAngles: false
+SpacesInCStyleCastParentheses: false
+SpacesInConditionalStatement: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+AlignTrailingComments: true
+AlignAfterOpenBracket: true
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortEnumsOnASingleLine: true
+AllowShortFunctionsOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: All
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakTemplateDeclarations: MultiLine
+BinPackArguments: true
+BinPackParameters: true
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: BeforeColon
+BreakInheritanceList: BeforeColon
+BreakStringLiterals: true
+InsertBraces: false
+IndentExternBlock: NoIndent
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterCaseLabel: false
+ AfterClass: false
+ AfterControlStatement: Never
+ AfterEnum: false
+ AfterFunction: false
+ AfterNamespace: false
+ AfterStruct: false
+ AfterUnion: false
+ AfterExternBlock: false
+ BeforeCatch: false
+ BeforeElse: false
+ReflowComments: true
+MaxEmptyLinesToKeep: 2
\ No newline at end of file
diff --git a/MediaKit/.hvigor/cache/meta.json b/MediaKit/.hvigor/cache/meta.json
new file mode 100644
index 0000000000000000000000000000000000000000..217274abe816706035c03a9a7651f49866da6e68
--- /dev/null
+++ b/MediaKit/.hvigor/cache/meta.json
@@ -0,0 +1 @@
+{"compileSdkVersion":"5.1.1(19)","hvigorVersion":"5.19.0","toolChainsVersion":"5.1.1.66"}
diff --git a/MediaKit/.hvigor/dependencyMap/dependencyMap.json5 b/MediaKit/.hvigor/dependencyMap/dependencyMap.json5
new file mode 100644
index 0000000000000000000000000000000000000000..6892986267afc0977d3ee068fae3402202361531
--- /dev/null
+++ b/MediaKit/.hvigor/dependencyMap/dependencyMap.json5
@@ -0,0 +1 @@
+{"basePath":"D:\\project\\faqsnippets\\MediaKit\\.hvigor\\dependencyMap\\dependencyMap.json5","rootDependency":"./oh-package.json5","dependencyMap":{"entry":"./entry/oh-package.json5"},"modules":[{"name":"entry","srcPath":"..\\..\\..\\entry"}]}
\ No newline at end of file
diff --git a/MediaKit/.hvigor/dependencyMap/entry/oh-package.json5 b/MediaKit/.hvigor/dependencyMap/entry/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..50a51753855fc6efdf037d5db6ab2cc001f17bbc
--- /dev/null
+++ b/MediaKit/.hvigor/dependencyMap/entry/oh-package.json5
@@ -0,0 +1 @@
+{"name":"entry","version":"1.0.0","description":"Please describe the basic information.","main":"","author":"","license":"","dependencies":{}}
\ No newline at end of file
diff --git a/MediaKit/.hvigor/dependencyMap/oh-package.json5 b/MediaKit/.hvigor/dependencyMap/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..b5b043d37897449ab916ebf73450f31296a101b3
--- /dev/null
+++ b/MediaKit/.hvigor/dependencyMap/oh-package.json5
@@ -0,0 +1 @@
+{"modelVersion":"5.0.4","description":"Please describe the basic information.","dependencies":{},"devDependencies":{"@ohos/hypium":"1.0.21","@ohos/hamock":"1.0.0"}}
\ No newline at end of file
diff --git a/MediaKit/.hvigor/outputs/build-logs/build.log b/MediaKit/.hvigor/outputs/build-logs/build.log
new file mode 100644
index 0000000000000000000000000000000000000000..d3bcaa159ad1bb5d24c8dec21dfa88c89190e974
--- /dev/null
+++ b/MediaKit/.hvigor/outputs/build-logs/build.log
@@ -0,0 +1,215 @@
+[2025-07-08T20:37:52.397] [DEBUG] debug-file - env: nodejsVersion=v18.20.1
+[2025-07-08T20:37:52.841] [DEBUG] debug-file - Hvigor init with startParameters:{
+ hvigorfileTypeCheck: false,
+ parallelExecution: true,
+ incrementalExecution: true,
+ printStackTrace: false,
+ daemon: false,
+ analyze: 0,
+ logLevel: Level { level: 20000, levelStr: 'INFO', colour: 'green' },
+ hotCompile: undefined,
+ hotReloadBuild: undefined
+}
+[2025-07-08T20:37:52.857] [DEBUG] debug-file - hvigorfile, resolving D:\project\faqsnippets\MediaKit\hvigorfile.ts
+[2025-07-08T20:37:54.274] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: appTasks], plugins: [] } }
+[2025-07-08T20:37:54.472] [DEBUG] debug-file - Start initialize project's product build option map with build mode debug.
+[2025-07-08T20:37:54.477] [DEBUG] debug-file - Product 'default' using build option: {
+ "debuggable": true,
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ }
+} in this build.
+[2025-07-08T20:37:54.489] [DEBUG] debug-file - Local scan or download HarmonyOS sdk components toolchains,ets,js,native,previewer
+[2025-07-08T20:37:54.492] [DEBUG] debug-file - Local scan or download hmscore sdk components toolchains,ets,native
+[2025-07-08T20:37:54.502] [DEBUG] debug-file - Start recording SDK configuration permission data.
+[2025-07-08T20:37:54.540] [DEBUG] debug-file - Sdk init in 55 ms
+[2025-07-08T20:37:54.574] [DEBUG] debug-file - Project task initialization takes 32 ms
+[2025-07-08T20:37:54.585] [DEBUG] debug-file - hvigorfile, resolving D:\project\faqsnippets\MediaKit\entry\hvigorfile.ts
+[2025-07-08T20:37:54.608] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug
+[2025-07-08T20:37:54.619] [DEBUG] debug-file - Module entry task initialization takes 6 ms
+[2025-07-08T20:37:54.622] [DEBUG] debug-file - project has submodules:entry
+[2025-07-08T20:37:54.639] [DEBUG] debug-file - Start to initialize dependency information.
+[2025-07-08T20:37:54.647] [DEBUG] debug-file - Configuration phase cost:1 s 799 ms
+[2025-07-08T20:37:54.651] [DEBUG] debug-file - Configuration task cost before running: 1 s 826 ms
+[2025-07-08T20:37:54.654] [DEBUG] debug-file - Executing task :entry:clean
+[2025-07-08T20:37:54.657] [DEBUG] debug-file - entry : clean cost memory 0.2430877685546875
+[2025-07-08T20:37:54.672] [DEBUG] debug-file - Module 'entry' target 'default' using build option: {
+ "debuggable": true,
+ "copyFrom": "default",
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "debug"
+} in this build.
+[2025-07-08T20:37:52.399] [DEBUG] debug-file - env: hvigor-config.json5 content = {
+ modelVersion: '5.0.4',
+ dependencies: {},
+ execution: {},
+ logging: {},
+ debugging: {},
+ nodeOptions: {}
+}
+[2025-07-08T20:37:52.842] [DEBUG] debug-file - Since current hvigor version 5.19.0 differs from last hvigor version
+ undefined, delete file-cache.json and task-cache.json.
+[2025-07-08T20:37:54.275] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: appTasks]
+[2025-07-08T20:37:54.473] [DEBUG] debug-file - Picking option from product 'default' with build mode 'debug'.
+[2025-07-08T20:37:54.485] [DEBUG] debug-file - No signingConfig found, initRemoteHspCache failed.
+[2025-07-08T20:37:54.574] [DEBUG] debug-file - hvigorfile, binding custom plugins []
+[2025-07-08T20:37:54.591] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: hapTasks], plugins: [] } }
+[2025-07-08T20:37:54.608] [DEBUG] debug-file - Target 'default' config: {}
+[2025-07-08T20:37:54.619] [DEBUG] debug-file - hvigorfile, binding custom plugins []
+[2025-07-08T20:37:54.624] [DEBUG] debug-file - start to load updatedOhPackageInfo to the disk
+[2025-07-08T20:37:54.641] [DEBUG] debug-file - Module entry Collected Dependency:
+[2025-07-08T20:37:54.654] [DEBUG] debug-file - clean: Worker pool is inactive.
+[2025-07-08T20:37:54.657] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 832 ms
+[2025-07-08T20:37:54.675] [DEBUG] debug-file - Module 'entry' target 'ohosTest' using build option: {
+ "debuggable": true,
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "default"
+} in this build.
+[2025-07-08T20:37:54.691] [DEBUG] debug-file - Create resident worker with id: 0.
+[2025-07-08T20:37:52.401] [DEBUG] debug-file - env: daemon=false
+[2025-07-08T20:37:52.843] [DEBUG] debug-file - Cache service initialization finished in 2 ms
+[2025-07-08T20:37:54.473] [DEBUG] debug-file - Product 'default' build option: {}
+[2025-07-08T20:37:54.574] [DEBUG] debug-file - hvigorfile, no custom plugins were found in D:\project\faqsnippets\MediaKit\hvigorfile.ts
+[2025-07-08T20:37:54.592] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: hapTasks]
+[2025-07-08T20:37:54.609] [DEBUG] debug-file - Target 'ohosTest' config: {}
+[2025-07-08T20:37:54.619] [DEBUG] debug-file - hvigorfile, no custom plugins were found in D:\project\faqsnippets\MediaKit\entry\hvigorfile.ts
+[2025-07-08T20:37:54.627] [DEBUG] debug-file - load to the disk finished
+[2025-07-08T20:37:54.641] [DEBUG] debug-file - Module entry's total dependency: 0
+[2025-07-08T20:37:54.658] [INFO] debug-file - Finished :entry:clean... after 3 ms
+[2025-07-08T20:37:54.689] [DEBUG] debug-file - Since there is no instance or instance is terminated, create a new worker pool.
+[2025-07-08T20:37:54.694] [DEBUG] debug-file - Create resident worker with id: 1.
+[2025-07-08T20:37:52.401] [DEBUG] debug-file - no-daemon, use the parent process.execArgv --max-old-space-size=8192,--max-semi-space-size=16,--expose-gc
+[2025-07-08T20:37:54.473] [DEBUG] debug-file - End initialize project's product build option map with build mode 'debug'.
+[2025-07-08T20:37:54.574] [DEBUG] debug-file - hvigorfile, resolve finished D:\project\faqsnippets\MediaKit\hvigorfile.ts
+[2025-07-08T20:37:54.592] [DEBUG] debug-file - failed to load cangjie to dynamically generate schemas: Error: Cannot find module '@ohos/cangjie-build-support/index'
+Require stack:
+- D:\tools\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\src\plugin\factory\plugin-factory.js
+- D:\tools\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\index.js
+- D:\project\faqsnippets\MediaKit\hvigorfile.ts
+- D:\tools\DevEco Studio\tools\hvigor\hvigor\src\base\internal\lifecycle\configuration.js
+- D:\tools\DevEco Studio\tools\hvigor\hvigor\src\base\boot\index.js
+- D:\tools\DevEco Studio\tools\hvigor\hvigor\src\cli\main\cli.js
+- D:\tools\DevEco Studio\tools\hvigor\hvigor\bin\hvigor.js
+[2025-07-08T20:37:54.609] [DEBUG] debug-file - Module 'entry' target 'default' build option: {
+ "debuggable": true,
+ "copyFrom": "default",
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "debug"
+}
+[2025-07-08T20:37:54.619] [DEBUG] debug-file - hvigorfile, resolve finished D:\project\faqsnippets\MediaKit\entry\hvigorfile.ts
+[2025-07-08T20:37:54.628] [DEBUG] debug-file - Start to initialize dependency information.
+[2025-07-08T20:37:54.658] [DEBUG] debug-file - Executing task ::clean
+[2025-07-08T20:37:54.689] [DEBUG] debug-file - Worker pool is initialized with config: {
+ minPoolNum: 2,
+ maxPoolNum: undefined,
+ maxCoreSize: undefined,
+ cacheCapacity: undefined,
+ cacheTtl: undefined
+}
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Current worker pool is stopped or closed.
+[2025-07-08T20:37:54.609] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option: {
+ "debuggable": true,
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "default"
+}
+[2025-07-08T20:37:54.637] [DEBUG] debug-file - Module MediaKit Collected Dependency:
+[2025-07-08T20:37:54.658] [DEBUG] debug-file - clean: Worker pool is inactive.
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Clear worker 0.
+[2025-07-08T20:37:54.609] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry
+[2025-07-08T20:37:54.637] [DEBUG] debug-file - Module MediaKit's total dependency: 0
+[2025-07-08T20:37:54.658] [DEBUG] debug-file - MediaKit : clean cost memory 0.033233642578125
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Worker 0 has been cleared.
+[2025-07-08T20:37:54.609] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=release
+[2025-07-08T20:37:54.659] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 834 ms
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Current idle worker size: 1.
+[2025-07-08T20:37:54.609] [DEBUG] debug-file - Target 'default' config: {}
+[2025-07-08T20:37:54.659] [INFO] debug-file - Finished ::clean... after 1 ms
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Current busy worker size: 0.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Target 'ohosTest' config: {}
+[2025-07-08T20:37:54.659] [DEBUG] debug-file - Executing task :entry:init
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Clear worker 1.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Module 'entry' target 'default' build option: {
+ "debuggable": false,
+ "copyFrom": "default",
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ }
+}
+[2025-07-08T20:37:54.659] [DEBUG] debug-file - entry : init cost memory 0.0126953125
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Worker 1 has been cleared.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option: {
+ "debuggable": true,
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "default"
+}
+[2025-07-08T20:37:54.660] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 835 ms
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Current idle worker size: 0.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry
+[2025-07-08T20:37:54.660] [INFO] debug-file - Finished :entry:init... after 1 ms
+[2025-07-08T20:37:54.697] [DEBUG] debug-file - Current busy worker size: 0.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug
+[2025-07-08T20:37:54.660] [DEBUG] debug-file - Executing task ::init
+[2025-07-08T20:37:54.698] [DEBUG] debug-file - hvigor build process will be closed.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Target 'default' config: {}
+[2025-07-08T20:37:54.660] [DEBUG] debug-file - MediaKit : init cost memory 0.011474609375
+[2025-07-08T20:37:54.704] [DEBUG] debug-file - worker[0] exits with exit code 0.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Target 'ohosTest' config: {}
+[2025-07-08T20:37:54.660] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 835 ms
+[2025-07-08T20:37:54.705] [DEBUG] debug-file - worker[1] exits with exit code 0.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Module 'entry' target 'default' build option: {
+ "debuggable": true,
+ "copyFrom": "default",
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "debug"
+}
+[2025-07-08T20:37:54.660] [INFO] debug-file - Finished ::init... after 1 ms
+[2025-07-08T20:37:54.705] [DEBUG] debug-file - Current worker pool is terminated.
+[2025-07-08T20:37:54.610] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option: {
+ "debuggable": true,
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "default"
+}
+[2025-07-08T20:37:54.611] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry
+[2025-07-08T20:37:54.611] [DEBUG] debug-file - Module 'entry' target 'default' using build option: {
+ "debuggable": true,
+ "copyFrom": "default",
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "debug"
+} in this build.
diff --git a/MediaKit/.hvigor/outputs/sync/fileCache.json b/MediaKit/.hvigor/outputs/sync/fileCache.json
new file mode 100644
index 0000000000000000000000000000000000000000..70fd5459b41562f4a9d5015ded8d00d5ec888a7b
--- /dev/null
+++ b/MediaKit/.hvigor/outputs/sync/fileCache.json
@@ -0,0 +1 @@
+{"CACHE_SYNC_FILE_HASH":{"D:\\project\\faqsnippets\\MediaKit\\hvigor\\hvigor-config.json5":"ae741e883aa7f4cf989be2cc6865155c35e376adc0245a48a8df0a363a1eb2e1","D:\\project\\faqsnippets\\MediaKit\\build-profile.json5":"24d7fb83c381aceddb6c26d970b6096445afb10b9ffd2b0cbd94d2f92f907780","D:\\project\\faqsnippets\\MediaKit\\hvigorfile.ts":"0af0e486b50ccb2b15123faee69be9e477de428ae054d10955b0b0566c14c3fc","D:\\project\\faqsnippets\\MediaKit\\oh-package.json5":"438f43d0a7a779187a6b2f6ad85653d0b8e1f04e5411d63ff26f1d8344ce28e9","D:\\project\\faqsnippets\\MediaKit\\entry\\build-profile.json5":"18bd2b89bc3be66955f3d9275cd2a49bf7c37c61c8ed2ee38e0d7894170b9a55","D:\\project\\faqsnippets\\MediaKit\\entry\\hvigorfile.ts":"ca6da2bb74bb662ede74732ca57f94bf8500b796addf91f180da405012b85e4d","D:\\project\\faqsnippets\\MediaKit\\entry\\oh-package.json5":"928454af4d0a7d3e8867c26ae891a270945fe48215473ccced5c003e89090890","D:\\project\\faqsnippets\\MediaKit\\.hvigor\\outputs\\sync\\output.json":"b2ea043fada07d3451c1e501e81a5264bfbc8ad712cc85c3182a86f88f03c566","SDK_LOCATION":"D:/tools/DevEco Studio/sdk"},"OHPM_INSTALL_FILE_HASH":{"D:\\project\\faqsnippets\\MediaKit\\oh-package.json5":"438f43d0a7a779187a6b2f6ad85653d0b8e1f04e5411d63ff26f1d8344ce28e9","D:\\project\\faqsnippets\\MediaKit\\oh_modules\\.ohpm\\lock.json5":"9a9fe3d4b863586315f01a3e5a7f943efff2b7c0ad54e75d42af259c2e5058ca","D:\\project\\faqsnippets\\MediaKit\\entry\\oh-package.json5":"928454af4d0a7d3e8867c26ae891a270945fe48215473ccced5c003e89090890","D:\\project\\faqsnippets\\MediaKit\\oh_modules":true,"D:\\project\\faqsnippets\\MediaKit\\entry\\oh_modules":false}}
\ No newline at end of file
diff --git a/MediaKit/.hvigor/outputs/sync/output.json b/MediaKit/.hvigor/outputs/sync/output.json
new file mode 100644
index 0000000000000000000000000000000000000000..1383a5fc00d2a38ad31e8feb62d36b0029713197
--- /dev/null
+++ b/MediaKit/.hvigor/outputs/sync/output.json
@@ -0,0 +1,173 @@
+{
+ "ohos-module-entry": {
+ "SELECT_TARGET": "default",
+ "MODULE_BUILD_DIR": "D:\\project\\faqsnippets\\MediaKit\\entry\\build",
+ "TARGETS": {
+ "default": {
+ "SOURCE_ROOT": "D:\\project\\faqsnippets\\MediaKit\\entry\\src\\main",
+ "RESOURCES_PATH": [
+ "D:\\project\\faqsnippets\\MediaKit\\entry\\src\\main\\resources"
+ ],
+ "BUILD_PATH": {
+ "OUTPUT_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\outputs\\default",
+ "INTERMEDIA_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates",
+ "JS_ASSETS_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader_out\\default",
+ "JS_LITE_ASSETS_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader_out_lite\\default",
+ "RES_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\res\\default",
+ "RES_PROFILE_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
+ "ETS_SUPER_VISUAL_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
+ "JS_SUPER_VISUAL_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\cache\\default\\default@CompileJS\\jsbundle",
+ "WORKER_LOADER": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
+ "MANIFEST_JSON": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\manifest\\default",
+ "OUTPUT_METADATA_JSON": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
+ "SOURCE_MAP_DIR": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\source_map\\default"
+ },
+ "BUILD_OPTION": {
+ "debuggable": true
+ }
+ },
+ "ohosTest": {
+ "SOURCE_ROOT": "D:\\project\\faqsnippets\\MediaKit\\entry\\src\\ohosTest",
+ "RESOURCES_PATH": [
+ "D:\\project\\faqsnippets\\MediaKit\\entry\\src\\ohosTest\\resources"
+ ],
+ "BUILD_PATH": {
+ "OUTPUT_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\outputs\\ohosTest",
+ "INTERMEDIA_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates",
+ "JS_ASSETS_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader_out\\ohosTest",
+ "JS_LITE_ASSETS_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader_out_lite\\ohosTest",
+ "RES_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\res\\ohosTest",
+ "RES_PROFILE_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\res\\ohosTest\\resources\\base\\profile",
+ "ETS_SUPER_VISUAL_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileArkTS\\esmodule",
+ "JS_SUPER_VISUAL_PATH": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileJS\\jsbundle",
+ "WORKER_LOADER": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader\\ohosTest\\loader.json",
+ "MANIFEST_JSON": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\manifest\\ohosTest",
+ "OUTPUT_METADATA_JSON": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\hap_metadata\\ohosTest\\output_metadata.json",
+ "SOURCE_MAP_DIR": "D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\source_map\\ohosTest"
+ },
+ "BUILD_OPTION": {
+ "debuggable": true
+ }
+ }
+ },
+ "BUILD_OPTION": {
+ "default-default": {
+ "debuggable": true,
+ "copyFrom": "default",
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ },
+ "name": "debug"
+ }
+ },
+ "BUILD_PROFILE_OPT": {
+ "apiType": "stageMode",
+ "buildOption": {},
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ }
+ },
+ {
+ "name": "default"
+ },
+ {
+ "name": "debug"
+ }
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest"
+ }
+ ]
+ },
+ "BUILD_CACHE_DIR": ""
+ },
+ "ohos-project": {
+ "SELECT_PRODUCT_NAME": "default",
+ "MODULE_BUILD_DIR": "D:\\project\\faqsnippets\\MediaKit\\build",
+ "BUNDLE_NAME": "com.example.camerakit",
+ "BUILD_PATH": {
+ "OUTPUT_PATH": "D:\\project\\faqsnippets\\MediaKit\\build\\outputs\\default"
+ },
+ "MODULES": [
+ {
+ "name": "entry",
+ "srcPath": "D:\\project\\faqsnippets\\MediaKit\\entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ],
+ "belongProjectPath": "D:\\project\\faqsnippets\\MediaKit"
+ }
+ ],
+ "PROFILE_OPT": {
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compatibleSdkVersion": "5.0.4(16)",
+ "runtimeOS": "HarmonyOS",
+ "buildOption": {
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ }
+ }
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug"
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "CONFIG_PROPERTIES": {
+ "enableSignTask": true,
+ "skipNativeIncremental": false,
+ "hvigor.keepDependency": true
+ },
+ "OVERALL_PROJECT_PATHS": [
+ "D:\\project\\faqsnippets\\MediaKit"
+ ],
+ "BUILD_CACHE_DIR": ""
+ },
+ "version": 1
+}
\ No newline at end of file
diff --git a/MediaKit/.idea/.deveco/module/entry.cache.json b/MediaKit/.idea/.deveco/module/entry.cache.json
new file mode 100644
index 0000000000000000000000000000000000000000..4019d2eecdd71103a99c1f62a7d201ff7fae0eee
--- /dev/null
+++ b/MediaKit/.idea/.deveco/module/entry.cache.json
@@ -0,0 +1,22 @@
+{
+ "CommonInfo":{
+ "current.select.target":"default"
+ },
+ "BuildOptions":{
+ "SELECT_BUILD_TARGET":"default",
+ "BUILD_PATH":{
+ "OUTPUT_METADATA_JSON":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
+ "OUTPUT_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\outputs\\default",
+ "RES_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\res\\default",
+ "ETS_SUPER_VISUAL_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
+ "JS_ASSETS_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader_out\\default",
+ "SOURCE_MAP_DIR":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\source_map\\default",
+ "INTERMEDIA_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates",
+ "RES_PROFILE_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
+ "WORKER_LOADER":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
+ "MANIFEST_JSON":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\manifest\\default",
+ "JS_LITE_ASSETS_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\intermediates\\loader_out_lite\\default",
+ "JS_SUPER_VISUAL_PATH":"D:\\project\\faqsnippets\\MediaKit\\entry\\build\\default\\cache\\default\\default@CompileJS\\jsbundle"
+ }
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/.idea/.deveco/project.cache.json b/MediaKit/.idea/.deveco/project.cache.json
new file mode 100644
index 0000000000000000000000000000000000000000..efcbb223504af559ec5b6bd2fef2e343030b4658
--- /dev/null
+++ b/MediaKit/.idea/.deveco/project.cache.json
@@ -0,0 +1,16 @@
+{
+ "CommonInfo":{
+ "project.ide.version":"5.1.1.420",
+ "current.select.product":"default",
+ "current.select.buildMode":"",
+ "crossplatform.projectType":""
+ },
+ "BuildOptions":{
+ "SELECT_BUILD_PRODUCT":"default",
+ "BUNDLE_NAME":"com.example.camerakit",
+ "BUILD_PATH":{
+ "OUTPUT_PATH":"D:\\project\\faqsnippets\\MediaKit\\build\\outputs\\default"
+ },
+ "SELECT_BUILD_MODE":""
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/.idea/.gitignore b/MediaKit/.idea/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..359bb5307e8535ab7d59faf27a7377033291821e
--- /dev/null
+++ b/MediaKit/.idea/.gitignore
@@ -0,0 +1,3 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
diff --git a/MediaKit/.idea/modules.xml b/MediaKit/.idea/modules.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6d8af63645570102298db3d3dc2389f585b88efe
--- /dev/null
+++ b/MediaKit/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MediaKit/.idea/modules/MediaKit.iml b/MediaKit/.idea/modules/MediaKit.iml
new file mode 100644
index 0000000000000000000000000000000000000000..ed0b868ea7bac1e4258e1d396e30708c54e20a69
--- /dev/null
+++ b/MediaKit/.idea/modules/MediaKit.iml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MediaKit/.idea/modules/entry/entry.iml b/MediaKit/.idea/modules/entry/entry.iml
new file mode 100644
index 0000000000000000000000000000000000000000..b630fe7f2a024b997f55fc5a52dea6c90a18c45d
--- /dev/null
+++ b/MediaKit/.idea/modules/entry/entry.iml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MediaKit/.idea/vcs.xml b/MediaKit/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6c0b8635858dc7ad44b93df54b762707ce49eefc
--- /dev/null
+++ b/MediaKit/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MediaKit/AppScope/app.json5 b/MediaKit/AppScope/app.json5
new file mode 100644
index 0000000000000000000000000000000000000000..796eb89dd9bd3856124883c87edbdf407448ffaf
--- /dev/null
+++ b/MediaKit/AppScope/app.json5
@@ -0,0 +1,10 @@
+{
+ "app": {
+ "bundleName": "com.example.camerakit",
+ "vendor": "example",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:layered_image",
+ "label": "$string:app_name"
+ }
+}
diff --git a/MediaKit/AppScope/resources/base/element/string.json b/MediaKit/AppScope/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..9fcc7c8d0cce973575acfa9bbceba758d92d33a4
--- /dev/null
+++ b/MediaKit/AppScope/resources/base/element/string.json
@@ -0,0 +1,8 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "CameraKit"
+ }
+ ]
+}
diff --git a/MediaKit/AppScope/resources/base/media/background.png b/MediaKit/AppScope/resources/base/media/background.png
new file mode 100644
index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f
Binary files /dev/null and b/MediaKit/AppScope/resources/base/media/background.png differ
diff --git a/MediaKit/AppScope/resources/base/media/foreground.png b/MediaKit/AppScope/resources/base/media/foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f
Binary files /dev/null and b/MediaKit/AppScope/resources/base/media/foreground.png differ
diff --git a/MediaKit/AppScope/resources/base/media/layered_image.json b/MediaKit/AppScope/resources/base/media/layered_image.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a
--- /dev/null
+++ b/MediaKit/AppScope/resources/base/media/layered_image.json
@@ -0,0 +1,7 @@
+{
+ "layered-image":
+ {
+ "background" : "$media:background",
+ "foreground" : "$media:foreground"
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/build-profile.json5 b/MediaKit/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..03ac3a3ae9dd397844173066e5d5ee21b49455a1
--- /dev/null
+++ b/MediaKit/build-profile.json5
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compatibleSdkVersion": "5.0.4(16)",
+ "runtimeOS": "HarmonyOS",
+ "buildOption": {
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ }
+ }
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug",
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/code-linter.json5 b/MediaKit/code-linter.json5
new file mode 100644
index 0000000000000000000000000000000000000000..073990fa45394e1f8e85d85418ee60a8953f9b99
--- /dev/null
+++ b/MediaKit/code-linter.json5
@@ -0,0 +1,32 @@
+{
+ "files": [
+ "**/*.ets"
+ ],
+ "ignore": [
+ "**/src/ohosTest/**/*",
+ "**/src/test/**/*",
+ "**/src/mock/**/*",
+ "**/node_modules/**/*",
+ "**/oh_modules/**/*",
+ "**/build/**/*",
+ "**/.preview/**/*"
+ ],
+ "ruleSet": [
+ "plugin:@performance/recommended",
+ "plugin:@typescript-eslint/recommended"
+ ],
+ "rules": {
+ "@security/no-unsafe-aes": "error",
+ "@security/no-unsafe-hash": "error",
+ "@security/no-unsafe-mac": "warn",
+ "@security/no-unsafe-dh": "error",
+ "@security/no-unsafe-dsa": "error",
+ "@security/no-unsafe-ecdsa": "error",
+ "@security/no-unsafe-rsa-encrypt": "error",
+ "@security/no-unsafe-rsa-sign": "error",
+ "@security/no-unsafe-rsa-key": "error",
+ "@security/no-unsafe-dsa-key": "error",
+ "@security/no-unsafe-dh-key": "error",
+ "@security/no-unsafe-3des": "error"
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/build-profile.json5 b/MediaKit/entry/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..4d611879c7913fb0610c686e2399258ab3a6dad1
--- /dev/null
+++ b/MediaKit/entry/build-profile.json5
@@ -0,0 +1,28 @@
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ },
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ }
+ },
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/entry/hvigorfile.ts b/MediaKit/entry/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c6edcd90486dd5a853cf7d34c8647f08414ca7a3
--- /dev/null
+++ b/MediaKit/entry/hvigorfile.ts
@@ -0,0 +1,6 @@
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/MediaKit/entry/obfuscation-rules.txt b/MediaKit/entry/obfuscation-rules.txt
new file mode 100644
index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b
--- /dev/null
+++ b/MediaKit/entry/obfuscation-rules.txt
@@ -0,0 +1,23 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope
+
+-enable-property-obfuscation
+-enable-toplevel-obfuscation
+-enable-filename-obfuscation
+-enable-export-obfuscation
\ No newline at end of file
diff --git a/MediaKit/entry/oh-package.json5 b/MediaKit/entry/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..248c3b7541a589682a250f86a6d3ecf7414d2d6a
--- /dev/null
+++ b/MediaKit/entry/oh-package.json5
@@ -0,0 +1,10 @@
+{
+ "name": "entry",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {}
+}
+
diff --git a/MediaKit/entry/src/main/ets/entryability/EntryAbility.ets b/MediaKit/entry/src/main/ets/entryability/EntryAbility.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8960efa53a81c3788cc12f6e4d7e437d2bea3996
--- /dev/null
+++ b/MediaKit/entry/src/main/ets/entryability/EntryAbility.ets
@@ -0,0 +1,66 @@
+import { abilityAccessCtrl, AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { window } from '@kit.ArkUI';
+import { BusinessError } from '@kit.BasicServicesKit';
+
+const DOMAIN = 0x0000;
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
+ hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy(): void {
+ hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ /*
+ * FAQ:预览流黑屏但无报错信息该怎么解决
+ */
+
+ // [Start ResolvePreviewStreamBlackScreenIssue_EntryAbility]
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ let atManager = abilityAccessCtrl.createAtManager();
+ atManager.requestPermissionsFromUser(this.context,
+ [
+ 'ohos.permission.CAMERA',
+ 'ohos.permission.MICROPHONE',
+ 'ohos.permission.MEDIA_LOCATION',
+ 'ohos.permission.WRITE_MEDIA'
+ ]
+ ).then((data) => {
+ console.info('data:' + JSON.stringify(data));
+ console.info('data permissions:' + data.permissions);
+ console.info('data authResults:' + data.authResults);
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ windowStage.loadContent('pages/CameraPreviewFlow', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
+ });
+ }).catch((err: BusinessError) => {
+ console.info('data:' + JSON.stringify(err));
+ });
+ }
+ // [End ResolvePreviewStreamBlackScreenIssue_EntryAbility]
+
+ onWindowStageDestroy(): void {
+ // Main window is destroyed, release UI related resources
+ hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ // Ability has brought to foreground
+ hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground(): void {
+ // Ability has back to background
+ hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/MediaKit/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8e4de99282050bad799ac892eb85ac5449364a51
--- /dev/null
+++ b/MediaKit/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
@@ -0,0 +1,16 @@
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
+
+const DOMAIN = 0x0000;
+
+export default class EntryBackupAbility extends BackupExtensionAbility {
+ async onBackup() {
+ hilog.info(DOMAIN, 'testTag', 'onBackup ok');
+ await Promise.resolve();
+ }
+
+ async onRestore(bundleVersion: BundleVersion) {
+ hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
+ await Promise.resolve();
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/ets/pages/AVRecorderProfile.ets b/MediaKit/entry/src/main/ets/pages/AVRecorderProfile.ets
new file mode 100644
index 0000000000000000000000000000000000000000..98d612b4f0981141bfb719c59d9b3d9dda52ba9f
--- /dev/null
+++ b/MediaKit/entry/src/main/ets/pages/AVRecorderProfile.ets
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2024 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/*
+* FAQ:如何在AVRecorder录制wav格式的音频文件时正确配置AVRecorderProfile参数?
+ */
+import { media } from '@kit.MediaKit';
+
+@Entry
+@Component
+struct AVRecorderProfile {
+ @State message: string = 'Hello World';
+ // [Start AVRecorderProfile]
+ private avProfile: media.AVRecorderProfile = {
+ audioBitrate: 6400, // set audioBitrate according to device ability.
+ audioChannels: 1, // set audioChannels,valid value 1-8,CFT_WAV supports 1.
+ audioCodec: media.CodecMimeType.AUDIO_G711MU, // set audioCodec,AUDIO_G711MU matching CFT_WAV.
+ audioSampleRate: 8000, // set audioSampleRate according to device ability.
+ fileFormat: media.ContainerFormatType.CFT_WAV // set fileFormat,CFT_WAV.
+ }
+
+ // [End AVRecorderProfile]
+
+ build() {
+ RelativeContainer() {
+ Text(this.message)
+ .id('HelloWorld')
+ .fontSize($r('app.float.page_text_font_size'))
+ .fontWeight(FontWeight.Bold)
+ .alignRules({
+ center: { anchor: '__container__', align: VerticalAlign.Center },
+ middle: { anchor: '__container__', align: HorizontalAlign.Center }
+ })
+ .onClick(() => {
+ this.message = 'Welcome';
+ })
+ }
+ .height('100%')
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/ets/pages/Index.ets b/MediaKit/entry/src/main/ets/pages/Index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..def634d091282e99d7528089d11e872d823425fd
--- /dev/null
+++ b/MediaKit/entry/src/main/ets/pages/Index.ets
@@ -0,0 +1,23 @@
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Hello World';
+
+ build() {
+ RelativeContainer() {
+ Text(this.message)
+ .id('HelloWorld')
+ .fontSize($r('app.float.page_text_font_size'))
+ .fontWeight(FontWeight.Bold)
+ .alignRules({
+ center: { anchor: '__container__',align: VerticalAlign.Center },
+ middle: { anchor: '__container__',align: HorizontalAlign.Center }
+ })
+ .onClick(() => {
+ this.message = 'Welcome';
+ })
+ }
+ .height('100%')
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/module.json5 b/MediaKit/entry/src/main/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..1e4a3e7602109faf33f5a8785a1c4087db4a3cb1
--- /dev/null
+++ b/MediaKit/entry/src/main/module.json5
@@ -0,0 +1,100 @@
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "phone",
+ "tablet",
+ "2in1"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ets",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:layered_image",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:startIcon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ],
+ "extensionAbilities": [
+ {
+ "name": "EntryBackupAbility",
+ "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets",
+ "type": "backup",
+ "exported": false,
+ "metadata": [
+ {
+ "name": "ohos.extension.backup",
+ "resource": "$profile:backup_config"
+ }
+ ],
+ }
+ ],
+ /*
+ * FAQ:预览流黑屏但无报错信息该怎么解决
+ */
+
+ // [Start ResolvePreviewStreamBlackScreenIssue_Permissions]
+ "requestPermissions": [
+ {
+ "name": "ohos.permission.CAMERA",
+ "usedScene": {
+ "abilities": [
+ "FormAbility"
+ ],
+ "when": "always"
+ },
+ "reason": "$string:Camera_Permission_Request"
+ },
+ {
+ "name": "ohos.permission.MICROPHONE",
+ "usedScene": {
+ "abilities": [
+ "FormAbility"
+ ],
+ "when": "always"
+ },
+ "reason": "$string:Camera_Permission_Request"
+ },
+ {
+ "name": "ohos.permission.WRITE_MEDIA",
+ "usedScene": {
+ "abilities": [
+ "FormAbility"
+ ],
+ "when": "always"
+ },
+ "reason": "$string:Camera_Permission_Request"
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA",
+ "usedScene": {
+ "abilities": [
+ "FormAbility"
+ ],
+ "when": "always"
+ },
+ "reason": "$string:Camera_Permission_Request"
+ }
+ ],
+ // [End ResolvePreviewStreamBlackScreenIssue_Permissions]
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/base/element/color.json b/MediaKit/entry/src/main/resources/base/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/base/element/float.json b/MediaKit/entry/src/main/resources/base/element/float.json
new file mode 100644
index 0000000000000000000000000000000000000000..a0a93dd91fd48f08f3a9532c76e9b26e68d4c034
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/base/element/float.json
@@ -0,0 +1,8 @@
+{
+ "float": [
+ {
+ "name": "page_text_font_size",
+ "value": "50fp"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/base/element/string.json b/MediaKit/entry/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..723008bbd0bfa0b6c7f033d8fff9515c3c07e5c3
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,20 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "label"
+ },
+ {
+ "name": "Camera_Permission_Request",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/base/media/background.png b/MediaKit/entry/src/main/resources/base/media/background.png
new file mode 100644
index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f
Binary files /dev/null and b/MediaKit/entry/src/main/resources/base/media/background.png differ
diff --git a/MediaKit/entry/src/main/resources/base/media/foreground.png b/MediaKit/entry/src/main/resources/base/media/foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f
Binary files /dev/null and b/MediaKit/entry/src/main/resources/base/media/foreground.png differ
diff --git a/MediaKit/entry/src/main/resources/base/media/layered_image.json b/MediaKit/entry/src/main/resources/base/media/layered_image.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/base/media/layered_image.json
@@ -0,0 +1,7 @@
+{
+ "layered-image":
+ {
+ "background" : "$media:background",
+ "foreground" : "$media:foreground"
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/base/media/startIcon.png b/MediaKit/entry/src/main/resources/base/media/startIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b
Binary files /dev/null and b/MediaKit/entry/src/main/resources/base/media/startIcon.png differ
diff --git a/MediaKit/entry/src/main/resources/base/profile/backup_config.json b/MediaKit/entry/src/main/resources/base/profile/backup_config.json
new file mode 100644
index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/base/profile/backup_config.json
@@ -0,0 +1,3 @@
+{
+ "allowToBackupRestore": true
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/base/profile/main_pages.json b/MediaKit/entry/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 0000000000000000000000000000000000000000..55c3f007f87b7ce5206d325f968cc56f2f79441f
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "pages/Index"
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/main/resources/dark/element/color.json b/MediaKit/entry/src/main/resources/dark/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..79b11c2747aec33e710fd3a7b2b3c94dd9965499
--- /dev/null
+++ b/MediaKit/entry/src/main/resources/dark/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#000000"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/mock/mock-config.json5 b/MediaKit/entry/src/mock/mock-config.json5
new file mode 100644
index 0000000000000000000000000000000000000000..7a73a41bfdf76d6f793007240d80983a52f15f97
--- /dev/null
+++ b/MediaKit/entry/src/mock/mock-config.json5
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/ohosTest/ets/test/Ability.test.ets b/MediaKit/entry/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..85c78f67579d6e31b5f5aeea463e216b9b141048
--- /dev/null
+++ b/MediaKit/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,35 @@
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function abilityTest() {
+ describe('ActsAbilityTest', () => {
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+ beforeAll(() => {
+ // Presets an action, which is performed only once before all test cases of the test suite start.
+ // This API supports only one parameter: preset action function.
+ })
+ beforeEach(() => {
+ // Presets an action, which is performed before each unit test case starts.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: preset action function.
+ })
+ afterEach(() => {
+ // Presets a clear action, which is performed after each unit test case ends.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: clear action function.
+ })
+ afterAll(() => {
+ // Presets a clear action, which is performed after all test cases of the test suite end.
+ // This API supports only one parameter: clear action function.
+ })
+ it('assertContain', 0, () => {
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+ hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
+ let a = 'abc';
+ let b = 'b';
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+ expect(a).assertContain(b);
+ expect(a).assertEqual(a);
+ })
+ })
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/ohosTest/ets/test/List.test.ets b/MediaKit/entry/src/ohosTest/ets/test/List.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..794c7dc4ed66bd98fa3865e07922906e2fcef545
--- /dev/null
+++ b/MediaKit/entry/src/ohosTest/ets/test/List.test.ets
@@ -0,0 +1,5 @@
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+ abilityTest();
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/ohosTest/module.json5 b/MediaKit/entry/src/ohosTest/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..55725a929993a8a18b3808d41ef037759440488b
--- /dev/null
+++ b/MediaKit/entry/src/ohosTest/module.json5
@@ -0,0 +1,13 @@
+{
+ "module": {
+ "name": "entry_test",
+ "type": "feature",
+ "deviceTypes": [
+ "phone",
+ "tablet",
+ "2in1"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false
+ }
+}
diff --git a/MediaKit/entry/src/test/List.test.ets b/MediaKit/entry/src/test/List.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bb5b5c3731e283dd507c847560ee59bde477bbc7
--- /dev/null
+++ b/MediaKit/entry/src/test/List.test.ets
@@ -0,0 +1,5 @@
+import localUnitTest from './LocalUnit.test';
+
+export default function testsuite() {
+ localUnitTest();
+}
\ No newline at end of file
diff --git a/MediaKit/entry/src/test/LocalUnit.test.ets b/MediaKit/entry/src/test/LocalUnit.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..165fc1615ee8618b4cb6a622f144a9a707eee99f
--- /dev/null
+++ b/MediaKit/entry/src/test/LocalUnit.test.ets
@@ -0,0 +1,33 @@
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function localUnitTest() {
+ describe('localUnitTest', () => {
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+ beforeAll(() => {
+ // Presets an action, which is performed only once before all test cases of the test suite start.
+ // This API supports only one parameter: preset action function.
+ });
+ beforeEach(() => {
+ // Presets an action, which is performed before each unit test case starts.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: preset action function.
+ });
+ afterEach(() => {
+ // Presets a clear action, which is performed after each unit test case ends.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: clear action function.
+ });
+ afterAll(() => {
+ // Presets a clear action, which is performed after all test cases of the test suite end.
+ // This API supports only one parameter: clear action function.
+ });
+ it('assertContain', 0, () => {
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+ let a = 'abc';
+ let b = 'b';
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+ expect(a).assertContain(b);
+ expect(a).assertEqual(a);
+ });
+ });
+}
\ No newline at end of file
diff --git a/MediaKit/hvigor/hvigor-config.json5 b/MediaKit/hvigor/hvigor-config.json5
new file mode 100644
index 0000000000000000000000000000000000000000..a63d34ae5ce5833b3874807e2b8d472687c6c5bf
--- /dev/null
+++ b/MediaKit/hvigor/hvigor-config.json5
@@ -0,0 +1,22 @@
+{
+ "modelVersion": "5.0.4",
+ "dependencies": {
+ },
+ "execution": {
+ // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */
+ // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
+ // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
+ // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
+ // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
+ },
+ "logging": {
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+ },
+ "debugging": {
+ // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
+ },
+ "nodeOptions": {
+ // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/
+ // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/
+ }
+}
diff --git a/MediaKit/hvigorfile.ts b/MediaKit/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f3cb9f1a87a81687554a76283af8df27d8bda775
--- /dev/null
+++ b/MediaKit/hvigorfile.ts
@@ -0,0 +1,6 @@
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/MediaKit/oh-package-lock.json5 b/MediaKit/oh-package-lock.json5
new file mode 100644
index 0000000000000000000000000000000000000000..c2f6d1bc9cb330eeb990573aa7e74cbccfb64b61
--- /dev/null
+++ b/MediaKit/oh-package-lock.json5
@@ -0,0 +1,28 @@
+{
+ "meta": {
+ "stableOrder": true,
+ "enableUnifiedLockfile": false
+ },
+ "lockfileVersion": 3,
+ "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
+ "specifiers": {
+ "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0",
+ "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21"
+ },
+ "packages": {
+ "@ohos/hamock@1.0.0": {
+ "name": "@ohos/hamock",
+ "version": "1.0.0",
+ "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==",
+ "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har",
+ "registryType": "ohpm"
+ },
+ "@ohos/hypium@1.0.21": {
+ "name": "@ohos/hypium",
+ "version": "1.0.21",
+ "integrity": "sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==",
+ "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.21.har",
+ "registryType": "ohpm"
+ }
+ }
+}
\ No newline at end of file
diff --git a/MediaKit/oh-package.json5 b/MediaKit/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..75e4e229db0f608fc3d9471c8819d0e52fb403c5
--- /dev/null
+++ b/MediaKit/oh-package.json5
@@ -0,0 +1,10 @@
+{
+ "modelVersion": "5.0.4",
+ "description": "Please describe the basic information.",
+ "dependencies": {
+ },
+ "devDependencies": {
+ "@ohos/hypium": "1.0.21",
+ "@ohos/hamock": "1.0.0"
+ }
+}