diff --git a/README.md b/README.md index d7edcc2ac16cdeae44a721e0eb336076ae87ff08..1d97aa0f3cd22c9e3a25e523524489fd7eb98037 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ 华为云手机端云协同方案,致力于高效、便捷的接入并使用华为云手机,涵盖信令交互、接入鉴权、音视频流传输、解码渲染、触控采集等模块,使得客户构建云游戏、个人云手机等业务场景变的简单。客户在云手机内部署CloudAppEngine,真机侧集成安卓和H5的SDK,RemoteServer实现相关RestApi接口,进一步结合业务场景丰富相关模块,实现完整接入方案。 ### 2. 组件交互 -![](http://image.huawei.com/tiny-lts/v1/images/457be9622fdd021c1fb5c9ac0531b770_565x427.png) +![](res/组件交互.png) 1. SDK->RemoteServer: 客户端SDK向后端server请求一个空闲云机实例 2. RemoteServer->SDK: 后端server按需求找到一个空闲云机实例信息返回给客户端SDK @@ -40,15 +40,42 @@    └── index.html <测试页面> ``` -#### 3.2 工程运行须知 -请结合sdk/src/3rd目录下相关文件夹的README同步三方依赖文件 +#### 3.2 工程运行 +前提:请结合sdk/src/3rd目录下相关文件夹的README同步三方依赖文件 +##### 3.2.1 打包 +在sdk目录操作 + +命令 | 用途 +-- | -- +npm install | 安装打包脚本依赖的包 +npm run dev | 开发模式 +npm run build | 生产模式 +node package.js | 将产物输出为 tar.gz 包,放在 dist 目录下 +##### 3.2.2 开发测试 +(1)修改 index.html 中的接入地址等配置 + +(2)执行 npm run dev 命令 + +(3)进入 dist 目录,通过index.html启本地server。 #### 3.3 产物下载 ```shell -## 下载解压后,修改demo.html中ip、port即可连接 +## 可以直接下载本项目构建好的产物进行尝鲜使用,下载解压后,修改demo.html中ip、port即可连接 https://gitee.com/HuaweiCloudDeveloper/huaweicloud-cloudPhoneAccess-web/releases/tag/v23.3.0 ``` +#### 3.4 FAQ +(1)Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID +``` +wss协议需要证书认证,可能是证书问题导致,解决办法:改为https协议,在浏览器中打开一次,并信任,如websocker链接为wss://123.123.123.123:234,则用浏览器打开https://123.123.123.123:234 +``` +(2)window.crypto.subtle.importKey +``` +https://javascript.develop-bugs.com/article/21525804/Chrome+packaged+app+UDP+sockets+not+working +I use a local server to obtain the response. Everything works fine when using localhost. The Request and Response are properly sent and obtained from the server. But, when connected over IP, it shows an error “NotSupportedError: Only secure origins are allowed”. +When I used Chrome canary, it said that importKey method is not recognized. So when I 'console'ed it with Chrome, the control did not go beyond the importKey method. What could possibly be the problem? +Chrome restricts the usage of WebCryptographyApi to secure origins. It means 'https'. localhost is a special address enabled for development. Therefore, to use WebCrypto in a real environment you need to setup a SSL/TLS server +``` ### 4. 功能接口 @@ -238,5 +265,6 @@ https://gitee.com/HuaweiCloudDeveloper/huaweicloud-cloudPhoneAccess-web/releases | delay | number | 网络时延,单位是ms | | bitrate | number | 码率,单位是kbps | -### 5. license +### 5. 开发指导 +### 6. license Apache License 2.0。 \ No newline at end of file diff --git "a/res/\347\273\204\344\273\266\344\272\244\344\272\222.png" "b/res/\347\273\204\344\273\266\344\272\244\344\272\222.png" new file mode 100644 index 0000000000000000000000000000000000000000..b622288c7c9d333735db9a662a3cc2c6f9a60a0a Binary files /dev/null and "b/res/\347\273\204\344\273\266\344\272\244\344\272\222.png" differ diff --git a/sdk/README.md b/sdk/README.md deleted file mode 100644 index 71463bacb6d9396aabaad99d1de30776d33e6b5e..0000000000000000000000000000000000000000 --- a/sdk/README.md +++ /dev/null @@ -1,29 +0,0 @@ - -## FAQ -1、Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID -``` -wss协议需要证书认证,可能是证书问题导致,解决办法:改为https协议,在浏览器中打开一次,并信任,如websocker链接为wss://123.123.123.123:234,则用浏览器打开https://123.123.123.123:234 -``` -2、window.crypto.subtle.importKey -``` -https://javascript.develop-bugs.com/article/21525804/Chrome+packaged+app+UDP+sockets+not+working - -I use a local server to obtain the response. Everything works fine when using localhost. The Request and Response are properly sent and obtained from the server. But, when connected over IP, it shows an error “NotSupportedError: Only secure origins are allowed”. -When I used Chrome canary, it said that importKey method is not recognized. So when I 'console'ed it with Chrome, the control did not go beyond the importKey method. What could possibly be the problem? -Chrome restricts the usage of WebCryptographyApi to secure origins. It means 'https'. localhost is a special address enabled for development. Therefore, to use WebCrypto in a real environment you need to setup a SSL/TLS server -``` - - -## 打包 -命令 | 用途 --- | -- -npm install | 安装打包脚本依赖的包 -npm run dev | 开发模式 -npm run build | 生产模式 -node package.js | 将产物输出为 tar.gz 包,放在 dist 目录下 - -## 开发测试 -(1)修改 index.html 中的接入地址等配置 -(2)执行 npm run dev 命令 -(3)进入 dist 目录,通过index.html启本地server。 -