-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 91afed1
Showing
169 changed files
with
7,146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/node_modules | ||
/oh_modules | ||
/local.properties | ||
/.idea | ||
**/build | ||
/.hvigor | ||
.cxx | ||
/.clangd | ||
/.clang-format | ||
/.clang-tidy | ||
**/.test | ||
/.appanalyzer | ||
/oh-package-lock.json5 | ||
BuildProfile.ets | ||
/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"app": { | ||
"bundleName": "net.plv.livescenes.demo", | ||
"versionCode": 1000000, | ||
"versionName": "1.0.0", | ||
"icon": "$media:app_icon", | ||
"label": "$string:app_name" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"string": [ | ||
{ | ||
"name": "app_name", | ||
"value": "POLYV多场景" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## [v1.0.0] - 2024-10-17 | ||
|
||
发布 1.0.0 版本 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
polyv-harmony-livescenes-sdk-demo | ||
=== | ||
|
||
[](#) | ||
[](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo/releases/tag/1.0.0) | ||
|
||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
- [1 简介](#1-%E7%AE%80%E4%BB%8B) | ||
- [2 下载安装](#2-%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85) | ||
- [3 文档](#3-%E6%96%87%E6%A1%A3) | ||
- [3.1 集成文档](#31-%E9%9B%86%E6%88%90%E6%96%87%E6%A1%A3) | ||
- [3.2 接口文档](#32-%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3) | ||
- [3.3 版本更新记录](#33-%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
### 1 简介 | ||
此项目是保利威鸿蒙多场景 Demo。 | ||
|
||
此项目支持视频播放、在线聊天、打赏、商品、互动等功能(具体见[多场景支持的功能特性](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo/blob/master/docs/public/支持的功能特性.md)) | ||
|
||
多场景项目的文件目录结构如下: | ||
|
||
``` | ||
|-- entry | ||
| |-- ability | ||
| | `-- PLVEntryAbility (SDK初始化) | ||
| |-- pages | ||
| | `-- PLVLoginPage (登录页) | ||
| `-- startup (播放器初始化) | ||
`-- scenes_live (直播带货场景模块) | ||
|-- pages (观看页) | ||
`-- components (功能组件) | ||
``` | ||
|
||
### 2 下载安装 | ||
|
||
```shell | ||
ohpm install @polyvharmony/live-scenes-sdk | ||
``` | ||
|
||
### 3 文档 | ||
#### 3.1 集成文档 | ||
[集成文档](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo/tree/master/publish/docs) | ||
#### 3.2 接口文档 | ||
[v1.0.0 接口文档](https://repo.polyv.net/harmony/documents/livescenes_sdk/1.0.0/index.html) | ||
#### 3.3 版本更新记录 | ||
[全版本更新记录](https://github.com/polyv/polyv-harmony-livescenes-sdk-demo/blob/master/CHANGELOG.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"app": { | ||
"signingConfigs": [], | ||
"products": [ | ||
{ | ||
"name": "default", | ||
"signingConfig": "default", | ||
"compatibleSdkVersion": "5.0.0(12)", | ||
"runtimeOS": "HarmonyOS", | ||
"buildOption": { | ||
"strictMode": { | ||
"useNormalizedOHMUrl": true | ||
} | ||
} | ||
} | ||
], | ||
"buildModeSet": [ | ||
{ | ||
"name": "debug" | ||
}, | ||
{ | ||
"name": "release" | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"name": "entry", | ||
"srcPath": "./entry", | ||
"targets": [ | ||
{ | ||
"name": "default", | ||
"applyToProducts": [ | ||
"default" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "scenes_live", | ||
"srcPath": "./scenes_live" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/node_modules | ||
/oh_modules | ||
/.preview | ||
/build | ||
/.cxx | ||
/.test | ||
/oh-package-lock.json5 | ||
BuildProfile.ets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"apiType": "stageMode", | ||
"buildOption": { | ||
}, | ||
"buildOptionSet": [ | ||
{ | ||
"name": "release", | ||
"arkOptions": { | ||
"obfuscation": { | ||
"ruleOptions": { | ||
"enable": true, | ||
"files": [ | ||
"./obfuscation-rules.txt" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
], | ||
"targets": [ | ||
{ | ||
"name": "default" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "entry", | ||
"version": "1.0.0", | ||
"description": "Please describe the basic information.", | ||
"main": "", | ||
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"scenes_live": "file:../scenes_live", | ||
"@polyvharmony/media-player-sdk": "2.2.0", | ||
"@polyvharmony/media-player-core-ijk": "2.2.0" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import AbilityStage from '@ohos.app.ability.AbilityStage'; | ||
|
||
export default class PLVAbilityStage extends AbilityStage { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; | ||
import { hilog } from '@kit.PerformanceAnalysisKit'; | ||
import { window } from '@kit.ArkUI'; | ||
import { PLVLiveSceneSDK } from 'scenes_live'; | ||
import { PLVMediaPlayerStartUp } from '../startup/PLVMediaPlayerStartUp'; | ||
|
||
export default class PLVEntryAbility extends UIAbility { | ||
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { | ||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); | ||
} | ||
|
||
onDestroy(): void { | ||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); | ||
} | ||
|
||
onWindowStageCreate(windowStage: window.WindowStage): void { | ||
// Main window is created, set main page for this ability | ||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); | ||
PLVLiveSceneSDK.init(this.context, windowStage) | ||
PLVMediaPlayerStartUp.start(this.context.getApplicationContext()) | ||
windowStage.loadContent('pages/PLVLoginPage', (err) => { | ||
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.'); | ||
}); | ||
} | ||
|
||
onWindowStageDestroy(): void { | ||
// Main window is destroyed, release UI related resources | ||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); | ||
} | ||
|
||
onForeground(): void { | ||
// Ability has brought to foreground | ||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); | ||
} | ||
|
||
onBackground(): void { | ||
// Ability has back to background | ||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); | ||
} | ||
} |
Oops, something went wrong.