This guide explains how to integrate the Titan SDK into your project using the Content Delivery Network (CDN) URL method. It’s an alternative to the NPM method. This approach is ideal for simple projects, quick prototypes, or environments that do not use a build system with npm (like Vite or Webpack).Documentation Index
Fetch the complete documentation index at: https://docs.titanos.tv/llms.txt
Use this file to discover all available pages before exploring further.
For modern and robust applications, we recommend using the npm installation method, as it provides version management.
How to Use
CDN integration is straightforward and involves just two steps.Add the Script to your HTML
To begin, add the following <script> tag inside the <head> tag of your main HTML file. Placing it in the <head> ensures the SDK is loaded before any of your own scripts are executed.
Usage Example
Here is a practical example of how to fetch device information using the CDN method. Note that, just like the npm version, function calls are asynchronous.Next Steps
Introduction to Titan SDK
View the main documentation and the recommended npm installation method.
Migration Guide
Consult the detailed guide for migrating from the old DeviceInfo API.