הכלי לבדיקת SDK של המשחקייה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כניסה ל-SDK Test Suite
כשהמשחק מוצג ב-YouTube, הוא כולל כותרת תשובה של Content Security Policy בתור שכבת אבטחה נוספת.
כך אפשר להגביל את סוגי המקורות שאפשר להסתמך עליהם ב-Playables ואת סוגי הבקשות מהרשת שאפשר לשלוח מ-Playables. כדי למזער בעיות באישור ולשפר את תהליך השילוב, מומלץ לשנות את כותרות התגובה של HTTP בקובץ index.html
בזמן הבדיקה המקומית כדי לזהות הפרות של 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:
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]