1.23.0 から 1.24.0 へのアップグレード

Unity Asset Package の変更

Genvid Unity Asset Package を 2 つに分割しました。一方は Genvid SDK をゲームに統合することができます。もう一方は、クラスタを操作するためのツールを Unity Editor インターフェイスに追加します。

1.24.0 にアップグレードする前に、古いバージョンの Genvid アセットパッケージを完全にアンインストールしてください。

Unity Cube サンプルの変更

  • ストリームで通知が送信されたため、Genvid_SubmitNotification() メソッドのファミリーを GenvidStreams から GenvidSession に移動しました。

  • Submit* メソッドのエラー処理を一貫性のあるものにし、情報量を増やしました。

YouTube 埋め込みプレイヤーと SSL サポート

Youtube 埋め込みプレイヤーを、SSL で保護された Web サイトで使用できるようになりました。その場合、SSL が使用されていることが末尾で分かる名前 (_alb_ssl など) の SSL クラスタを使用する必要があります。

SSL モジュールを使用する場合は、 /samples/cube/web/web.pyloadEndpoint() メソッドを使用して、クラスタ構成で leaf エンドポイントと Web エンドポイントをロードする必要があります。

    def loadEndpoint(self):
        leaf_endpoint = self.get_leaf_endpoint()
        web_endpoint = self.get_web_endpoint()
        config = {
            'version': '1.7.0',
            'config': {
                'cloud': {
                    'endpoint': {
                        'leaf': '',
                        'web': ''
                    }
                }
            }
        }
        config['config']['cloud']['endpoint']['leaf'] = leaf_endpoint
        config['config']['cloud']['endpoint']['web'] = web_endpoint
        return config

Web サイトに埋め込まれた YouTube を SSL YouTube でストリーミングするには、samples/streaming_services にあるファイル youtube.sample.hcl をクラスタ構成に読み込む必要があります。このファイルには、embed_ssltrue に設定することで、SSL による埋め込みを可能にする新しい設定が含まれています。

config {
  embed_ssl {
    enabled = false
  }
} // end of config

ローカルクラスタでの SSL サポート

Web サンプルの読み込み時に、ローカルクラスタ用の自己署名 SSL 証明書を生成できるようになりました。新しい python スクリプト /samples/cube/web/generate_ssl.py は、HashiCorp Vault を使用して、Web サンプルのバックエンドが使用する証明書を生成します。

#!/usr/bin/env python3
import hvac
import os
import json
import consul


def create_new_ssl():
    client = hvac.Client(url='http://127.0.0.1:8200')

    secrets_engines_list = client.sys.list_mounted_secrets_engines()['data']

    if "pki/" in secrets_engines_list:
        print('The PKI engine is already enabled.')
    else:
        client.sys.enable_secrets_engine(backend_type='pki', )
        print('The PKI engine has been enabled')

    client.sys.tune_mount_configuration(
        path='pki',
        max_lease_ttl='87600h',
    )

    generate_root_response = client.secrets.pki.generate_root(
        type='exported', common_name='New root CA')
    print('New root CA: {}'.format(generate_root_response))

    set_urls_response = client.secrets.pki.set_urls({
        'issuing_certificates': ['http://127.0.0.1:8200/v1/pki/ca'],
        'crl_distribution_points': ['http://127.0.0.1:8200/v1/pki/crl']
    })

    create_or_update_role_response = client.secrets.pki.create_or_update_role(
        'localhostrole', {
            'ttl': '72h',
            'allow_localhost': 'true'
        })
    print('New role: {}'.format(create_or_update_role_response))

    generate_certificate_response = client.secrets.pki.generate_certificate(
        name='localhostrole', common_name='localhost')
    response = generate_certificate_response.json()
    print('Certificate response data: ', response)

    # the following lines will create the files needed for Nodejs to read the certificate and private key.
    cur_path = os.path.dirname(__file__)

    f = open(os.path.join(cur_path, "certificate.pem"), "w")
    f.write(response["data"]["certificate"])
    f.close()

    f = open(os.path.join(cur_path, "key.pem"), "w")
    f.write(response["data"]["private_key"])
    f.close()

web サンプルをロードする際に -s オプションを使用すると generate_ssl.py スクリプトが起動します。

py web.py load -s

スタンドアロンモードを使用している場合でも、ストリーミングプラットフォームを使用している場合でも、SSL による埋め込みを有効にするには、hcl ファイルで embed_ssl を**true** に設定してください。

config {
  embed_ssl {
    enabled = true
  }
}

警告

もし、embed_ssl キーを含む複数の hcl 設定ファイル (twitch.sample.hclyoutube.sample.hcl など) を読み込む必要がある場合は、必ずWeb サンプルの読み込み に読み込むようにしてください。そうしないと、embed_ssl キーに関連付けられた値を上書きしてしまう可能性があります。

Terraform モジュールの変更内容

  • AWS Terraform の全モジュールから変数 force_az を削除しました。新しい変数 azs に置き換え、特定のアベイラビリティゾーンを選択できるようにしました。
  • AWS Terraform のモジュールに変数 subnet_ids を追加しました。これは AWS のサブネット ID の順番リストです。モジュールは、この変数に指定したリストを使用します。リストを提供しない場合、モジュールは変数 azs の各アベイラビリティゾーンの最初のサブネットを使用します。
  • モジュール azurerm_basic_cluster は、クラスタのインスタンス化を高速化するために Azure Shared Image Version を使用するようになりました。

アップグレード後に既存のクラスタでアベイラビリティゾーンが保持されていることを確認するには以下の方法があります。

  • force_az の値をメモしておく
  • モジュールを再インポートする
  • Cluster 設定ページを開く
  • force_az の値を azs 設定に追加する

genvidClient.IDataFrame.timeCode adjustment

genvidClient.IDataFrame.timeCodegenvidClient.IDataStreamFrame.timeCode に合わせてミリ秒に変換しました (バージョン 1.23.0 では、フォーマットが一致していませんでした)。