I-embed sa Website
I-embed ang iyong mga DailyPlay game nang direkta sa iyong website para sa seamless na brand experience.
Halimbawa
Section titled “Halimbawa”Narito ang live na halimbawa ng naka-embed na DailyPlay game:
Mga Paraan ng Pag-embed
Section titled “Mga Paraan ng Pag-embed”Nag-aalok ang DailyPlay ng dalawang embed format sa Share/Embed panel:
| Format | Paglalarawan |
|---|---|
| Simple iframe | Inline game sa iyong page (ang gabay na ito) |
| Floating Play button | Fixed button na bumubukas ng laro sa overlay — perpekto para sa Shopify at Shopline storefronts |
iframe Embed
Section titled “iframe Embed”Ang pinakasimpleng paraan para i-embed ang iyong laro:
<iframe src="https://app.dailyplay.ai/embed/[game-id]" width="400" height="700" frameborder="0" allow="camera; microphone"></iframe>Responsive Embed
Section titled “Responsive Embed”Para sa responsive layouts na umaangkop sa screen size:
<div style="position: relative; width: 100%; max-width: 400px; margin: 0 auto;"> <div style="padding-top: 175%; position: relative;"> <iframe src="https://app.dailyplay.ai/embed/[game-id]" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allow="camera; microphone" ></iframe> </div></div>Pagkuha ng Embed Code
Section titled “Pagkuha ng Embed Code”Mula sa Game Page
Section titled “Mula sa Game Page”- Buksan ang iyong published game
- I-click ang Share/Embed
- Piliin ang Embed tab
- Kopyahin ang embed code
Mula sa Manage Games
Section titled “Mula sa Manage Games”- Pumunta sa Manage Games
- Hanapin ang iyong laro
- I-click ang Share/Embed
- Kopyahin ang embed code
Format ng Embed URL
Section titled “Format ng Embed URL”Standard Embed
Section titled “Standard Embed”https://app.dailyplay.ai/embed/[game-id]May Parameters
Section titled “May Parameters”Magdagdag ng query parameters para sa customization:
https://app.dailyplay.ai/embed/[game-id]?hideHeader=true&theme=lightMga available na parameter:
| Parameter | Values | Paglalarawan |
|---|---|---|
hideHeader |
true/false |
Itago ang game header |
hideFooter |
true/false |
Itago ang footer |
autoplay |
true/false |
Awtomatikong simulan ang laro |
Mga Gabay sa Sizing
Section titled “Mga Gabay sa Sizing”Mobile-First (Inirerekomenda)
Section titled “Mobile-First (Inirerekomenda)”Para sa mobile-optimized games:
| Dimension | Value |
|---|---|
| Width | 400px |
| Height | 700px |
| Ratio | ~1:1.75 |
Desktop Display
Section titled “Desktop Display”Para sa mas malawak na layouts:
| Dimension | Value |
|---|---|
| Width | 500px |
| Height | 800px |
Full-Width Responsive
Section titled “Full-Width Responsive”<div style="max-width: 500px; margin: 0 auto;"> <div style="position: relative; padding-top: 160%;"> <iframe src="https://app.dailyplay.ai/embed/[game-id]" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 12px;" allow="camera; microphone" ></iframe> </div></div>Mga Instruksyon ayon sa Platform
Section titled “Mga Instruksyon ayon sa Platform”WordPress
Section titled “WordPress”Gamit ang HTML Block:
- Magdagdag ng bagong block
- Piliin ang Custom HTML
- I-paste ang embed code
- I-preview at i-publish
Gamit ang Shortcode (kung available):
Sinusuportahan ng ilang theme ang shortcodes para sa iframes.
Shopify
Section titled “Shopify”Para sa floating Play button sa iyong storefront, tingnan ang dedicated Shopify guide. Para sa inline iframe sa page o product:
- Pumunta sa iyong page/product sa Shopify admin
- I-click ang Show HTML sa editor
- I-paste ang iframe embed code
- I-save
Shopline
Section titled “Shopline”Para sa floating Play button, tingnan ang Shopline guide. Para sa inline iframe, idagdag ang embed code sa Custom HTML section sa theme editor.
Squarespace
Section titled “Squarespace”- Magdagdag ng Code Block
- I-paste ang embed code
- I-apply ang mga pagbabago
- Magdagdag ng HTML iframe element
- I-paste ang iframe code
- Ayusin ang size kung kailangan
Webflow
Section titled “Webflow”- Magdagdag ng Embed element
- I-paste ang embed code
- I-style ang container kung kailangan
Pag-style ng Embed
Section titled “Pag-style ng Embed”Container Styling
Section titled “Container Styling”Balutin ang iframe sa styled container:
<div style=" max-width: 400px; margin: 2rem auto; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.1);"> <iframe src="https://app.dailyplay.ai/embed/[game-id]" width="100%" height="700" frameborder="0" allow="camera; microphone" ></iframe></div>Centered Layout
Section titled “Centered Layout”<div style="text-align: center; padding: 2rem 0;"> <iframe src="https://app.dailyplay.ai/embed/[game-id]" width="400" height="700" frameborder="0" style="border-radius: 12px;" allow="camera; microphone" ></iframe></div>Permissions
Section titled “Permissions”Kinakailangang Permissions
Section titled “Kinakailangang Permissions”Isama ang mga ito sa allow attribute para sa buong functionality:
allow="camera; microphone"| Permission | Kailangan Para Sa |
|---|---|
camera |
Expression-based games, video recording |
microphone |
Voice-controlled games |
Kung Hindi Ginagamit ang Mga Feature
Section titled “Kung Hindi Ginagamit ang Mga Feature”Kung hindi gumagamit ang iyong laro ng camera/mic, maaari mong tanggalin ang allow attribute:
<iframe src="https://app.dailyplay.ai/embed/[game-id]" width="400" height="700" frameborder="0"></iframe>Mga Pagsasaalang-alang sa Seguridad
Section titled “Mga Pagsasaalang-alang sa Seguridad”Kinakailangan ang HTTPS
Section titled “Kinakailangan ang HTTPS”Dapat gumamit ang iyong website ng HTTPS para i-embed ang mga DailyPlay game. Hindi gagana ang embed sa HTTP-only sites.
Content Security Policy
Section titled “Content Security Policy”Kung may CSP ang iyong site, idagdag ang DailyPlay sa iyong allowed sources:
frame-src https://app.dailyplay.ai;Cross-Origin
Section titled “Cross-Origin”Gumagana ang mga DailyPlay game sa loob ng iframes sa iba’t ibang origins. Walang kinakailangang special configuration.
Pagsubok sa Iyong Embed
Section titled “Pagsubok sa Iyong Embed”- Local Testing — Gumamit ng local server (http://localhost)
- Suriin ang Sizing — Beripikahin na tama ang pagpapakita ng laro
- Mobile Test — Tingnan sa mobile devices
- Feature Test — Kumpirmahin na maayos ang paglalaro
Troubleshooting
Section titled “Troubleshooting”Hindi naglo-load ang laro
Section titled “Hindi naglo-load ang laro”- Beripikahin na tama ang game ID
- Suriin na published ang laro
- Siguraduhing ginagamit ang HTTPS
Mali ang size
Section titled “Mali ang size”- Suriin ang width/height attributes
- Gumamit ng responsive wrapper
- Subukan sa target devices
Hindi gumagana ang camera
Section titled “Hindi gumagana ang camera”- Magdagdag ng
allow="camera"attribute - Siguraduhin ang HTTPS (kailangan para sa camera)
- Dapat magbigay ang user ng permission
Hinarang ng CSP
Section titled “Hinarang ng CSP”- Idagdag ang
frame-src https://app.dailyplay.aisa iyong CSP - Suriin ang browser console para sa partikular na errors
Mga Susunod na Hakbang
Section titled “Mga Susunod na Hakbang”- Subaybayan ang Analytics para sa embedded games
- Ibahagi sa pamamagitan ng Link para sa ibang channels