Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add browser.IS_SMART_TV and class names for CSS targeting devices #8676

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

misteroneill
Copy link
Member

Description

This adds a convenience property, IS_SMART_TV, to the browser object to detect a device that is either Tizen or WebOS.

Also, added class names to the player for CSS targeting on various devices based on user agent data.

Specific Changes proposed

  • Add browser.IS_SMART_TV boolean
  • Add class name vjs-device-webos and vjs-device-smart-tv on WebOS Smart TVs
  • Add class name vjs-device-tizen and vjs-device-smart-tv on Tizen Smart TVs
  • Add class name vjs-device-android on Android devices
  • Add class name vjs-device-ipad on iPads
  • Add class name vjs-device-iphone on iPhones

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.84%. Comparing base (caf6d30) to head (8244446).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8676      +/-   ##
==========================================
+ Coverage   82.71%   82.84%   +0.13%     
==========================================
  Files         113      113              
  Lines        7636     7644       +8     
  Branches     1835     1838       +3     
==========================================
+ Hits         6316     6333      +17     
+ Misses       1320     1311       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@adrums86 adrums86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants