Embed and Integration
Embedding Games via iFrame and Native Applications
Integrating playgen.io games into your platform is straightforward, whether you're embedding them on a website or within a native mobile application. Below are the methods to seamlessly incorporate our games into your environment.
Embedding Games via iFrame
To embed a game on your website using an iFrame, insert the following HTML code into your webpage:
Replace <publish_key>
and <game_type>
with your specific game publish key and game type. This iFrame is responsive, adapting to various screen sizes, and ensures a consistent user experience. For more details, refer to our [Games Integration Guide][1].
Integrating Games into Native Applications
For native mobile applications, you can integrate playgen.io games using WebView components. Below are examples for iOS and Android platforms.
iOS Integration
Utilize the WKWebView
class to embed the game within your iOS application:
Ensure you replace <publish_key>
with your actual game publish key. This setup allows the game to run seamlessly within your app. For more information, consult our [Games Integration Guide][1].
Android Integration
In Android, use the WebView
component to embed the game:
Replace <publish_key>
with your specific game publish key. This approach ensures smooth integration of the game within your Android application. Detailed instructions are available in our [Games Integration Guide][1].
Platform-Specific Integration
playgen.io supports integration with various platforms. Below are platform-specific instructions:
Platform | Integration Method |
---|---|
WordPress | Use the [iframe] shortcode: [iframe src="https://<game_type>.playgen.io/game/<publish_key>" width="100%" height="700"] |
Wix | Add an "HTML iframe" element and insert the iFrame code provided above. |
Squarespace | Add a "Code" block and insert the iFrame code provided above. |
Framer | Add a new "Embed" component and use the game URL: https://<game_type>.playgen.io/game/<publish_key> . |
Webflow | Add an "Embed" element and insert the iFrame code provided above. |
Shopify | Add a "Custom HTML" section and insert the iFrame code provided above. |
Weebly | Add an "Embed Code" element and insert the iFrame code provided above. |
Joomla | Use the {source} tags: {source}<iframe src="https://<game_type>.playgen.io/game/<publish_key>" width="100%" height="700" frameborder="0"></iframe>{/source} |
Replace <publish_key>
with your specific game publish key in all instances.