Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jlayi committed Oct 17, 2024
0 parents commit 91afed1
Show file tree
Hide file tree
Showing 169 changed files with 7,146 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
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
9 changes: 9 additions & 0 deletions AppScope/app.json5
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"
}
}
8 changes: 8 additions & 0 deletions AppScope/resources/base/element/string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"string": [
{
"name": "app_name",
"value": "POLYV多场景"
}
]
}
Binary file added AppScope/resources/base/media/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## [v1.0.0] - 2024-10-17

发布 1.0.0 版本
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
polyv-harmony-livescenes-sdk-demo
===

[![build passing](https://img.shields.io/badge/build-passing-brightgreen.svg)](#)
[![GitHub release](https://img.shields.io/badge/release-1.0.0-blue.svg)](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)
44 changes: 44 additions & 0 deletions build-profile.json5
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"
}
]
}
8 changes: 8 additions & 0 deletions entry/.gitignore
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
25 changes: 25 additions & 0 deletions entry/build-profile.json5
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"
}
]
}
6 changes: 6 additions & 0 deletions entry/hvigorfile.ts
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. */
}
18 changes: 18 additions & 0 deletions entry/obfuscation-rules.txt
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
14 changes: 14 additions & 0 deletions entry/oh-package.json5
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"
}
}

4 changes: 4 additions & 0 deletions entry/src/main/ets/ability/PLVAbilityStage.ets
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 {
}
44 changes: 44 additions & 0 deletions entry/src/main/ets/ability/PLVEntryAbility.ets
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');
}
}
Loading

0 comments on commit 91afed1

Please sign in to comment.