ゲームルーム SDK テストスイート
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
SDK テストスイートに移動する
ゲームが YouTube で配信されるときに、セキュリティの追加レイヤとして Content Security Policy レスポンス ヘッダーが含まれます。
これにより、Playables が依存できるソースの種類と、Playables から実行できるネットワーク リクエストの種類が制限されます。認証に関する問題を最小限に抑え、統合プロセスを改善するには、ローカルでテストするときに index.html
ファイルの HTTP レスポンス ヘッダーをオーバーライドして、CSP 違反をできるだけ早く検出します。
Chrome でローカル オーバーライドを設定するには、こちらの記事をご覧ください。ローカルで提供されるゲームのオーバーライドを設定したら、次の文字列を使用して Content-Security-Policy
ヘッダーをオーバーライドします。
default-src 'none'; script-src 'report-sample' 'self' 'unsafe-eval' 'unsafe-inline' blob: https://www.youtube.com/game_api/v0 https://www.youtube.com/game_api/v0/ https://www.youtube.com/game_api/v1 https://www.youtube.com/game_api/v1/; object-src 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' blob: data:; media-src 'self' blob:; font-src 'self' data: https://fonts.googleapis.com https://fonts.gstatic.com; connect-src 'self' blob: data:; sandbox allow-pointer-lock allow-same-origin allow-scripts; base-uri 'self'; manifest-src 'self'; worker-src 'self' blob:
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-29 UTC。"],[],["Testing Playables on YouTube involves managing the Content Security Policy (CSP) header, which restricts resource access and network requests for security. To avoid certification issues, locally override the HTTP response headers. Use Chrome's local override feature, referencing the provided article for setup. Apply the given `Content-Security-Policy` string to the header to test your locally served game. This allows for early detection of CSP violations during the integration process.\n"]]