IsSmartTV.js is a lightweight JavaScript plugin crafted to detect SmartTVs based on the user agent of the device. With a simple and swift function call, you can determine whether the current device is a SmartTV, enabling tailored user experiences.
Include the IsSmartTV.js script directly in your HTML page:
<script src="path/to/IsSmartTv.min.js"></script>
// Check if the device is a SmartTV
if(is.SmartTV()){
console.log('This is a SmartTV device!');
}else{
console.log('This is not a SmartTV device.');
}
IsSmartTV.js relies on user agent detection and is compatible with major browsers, including Chrome, Firefox, Safari, and Edge. Please ensure compatibility with your target browser.
Contributions are welcome! If you find a bug or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details.