tencent cloud

Game Multimedia Engine

製品アップデート情報
製品紹介
製品概要
優位性のある特徴
製品機能
ユースケース
セキュリティコンプライアンス認証
初心者ガイド
SDKダウンロードガイド
製品機能体験
基本機能Demo
シーン化体験
コンソールガイド
使用量の表示
サービスの有効化
クイックスタート
Quick Integration of SDK
Quick Integration of Sample Project
基本機能開発ガイド
Authentication Key
リアルタイム音声ロール設定
音質設定
拡張機能開発ガイド
サーバー側のレコーディング
レンジボイス
3Dサウンド
効果音と伴奏
ネットワークオーディオストリーム転送ルーティング
カスタムメッセージチャネル
社内ファイアーフォール制限への対応について
Language Parameter Reference List
GMEルーム管理機能の導入
クライアントAPI
SDK for Unity
SDK for Unreal Engine
Cocos2D SDK
SDK for Windows
SDK for iOS
SDK for Android
SDK for macOS
H5 SDK
Electron SDK
SDK for Flutter
SDK Version Upgrade Guide
エラーコード
Toolchain
Server APIs
History
Introduction
API Category
Usage APIs
Recording APIs
Making API Requests
Voice Chat APIs
Application APIs
Data Types
Error Codes
よくある質問
製品機能質問
問題解決ガイド
課金について
Sample Projectの使用上の問題
一般的な質問
認証について
リアルタイム音声ルーム参加失敗について
リアルタイム音声利用時に音声が聞こえない問題とオーディオ関連について
ネットワークについて
ボイス・ツー・テキスト変換について
プロジェクトエクスポートについて
Service Agreement
Service Level Agreement
お問い合わせ
用語集
GME ポリシー
データ処理とセキュリティ契約
プライバシーポリシー

Project Configuration

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-01-18 15:13:51
This document describes how to get started with the GME APIs for HTML5.

Features Supported by the SDK for HTML5

Feature
Supported by HTML5
Basic voice chat features
Yes
Sound effect and accompaniment
Partially supported
3D voice
No
Range voice
No
Room management
No
Audio forwarding routing
No
Custom message channel
No
Voice messaging
No
Speech-to-text
No

Platforms Supported by the SDK for HTML5

OS/Platform
Browser/WebView
Version Requirement
Remarks
iOS
Safari
11.1.2
Safari on a later version
Chrome
-
iOS currently doesn't support Chrome.
Weixin browser
-
iOS currently doesn't support the Weixin browser.
Android
TBS (the default WebView of Weixin and Mobile QQ)
43600
The default built-in browser kernel of Weixin and Mobile QQ is TBS
Chrome
60+
H.264 support is required
macOS
Chrome
47+
-
Safari
11+
-
Windows (PC)
Chrome
52+
-
10.2
-

Preparations

The SDK can be obtained in the following steps:
1. Go to the SDK Download Guide page.
2. Locate the SDK resources for HTML5 on the page.
3. Click Download.

Frontend Project Configuration Steps

1. Open ports

If you have configured a firewall across your network, be sure to open the following ports:
Protocol
Port
TCP
8687
UDP
8000, 8800, 443
Import the SDK by using CDN.

2. Import frontend library files

Import WebRTCService.min.js into the project as demonstrated in the following code:
<head>
<script src="../dist/WebRTCService.min.js"></script>
</head>

3. Add the audio tag

<div id="gme-audio-wrap"></div>

Server-Side Deployment Steps

The use of the GME SDK requires authentication which involves keys and is not suitable for implementation on the client. You are recommended to deploy it separately. If only client implementation is needed for the time being, please refer to the provided demo project.

1. Download the program

Download the sample authBuffer program, which can sign the authentication information for a specified SDKAppID.

2. Configure the server-side authentication project

Go to the signdemo directory and modify the config.js file: open the config.js file, delete the default configuration, and call the appidMap function in the place where the code is deleted (the parameters are the SDKAppid applied for on the Tencent Cloud backend and the corresponding authentication key).
const AuthBufferConfig = function () {
this.appidMap = {};
this.appidMap["1400089356"] = "1cfbfd2a1a03a53e";
};
// Replace `1400089356` with the `sdkAppid` applied for on the Tencent Cloud backend and replace `1cfbfd2a1a03a53e` with the authentication key corresponding to the `sdkAppid`
Note:
The AuthKey must correspond to your SDKAppid.

3. Deploy the server-side authentication project

Go to the directory where the sample authBuffer program resides and run the following statement to install the dependencies:
npm i
Then, execute the node index.js script to run the signature service.
Note:
As the async syntax is used, make sure that your node is v8 or later. Run node -v on the command line to view the version.

4. Test the deployment result

You can run the following command on the command line for test (make sure that your system has a curl command):
// Generate a `userSig`:
curl "http://127.0.0.1:10005/" --data "sdkappid=1400089356&roomid=1234123&openid=1234567"
After the signing program is executed, the authentication information will be returned as shown below:
{"userSig":"AqhHE7QHLFYPfV/zfyrdRYHfuUn6eOA8g/J6GMjVy//Shr5ByJPTi8hzR2KyXMvn","errorCode":0}


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック