mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
feat: Add Vizio as community support (#8049)
This commit is contained in:
committed by
GitHub
parent
6583f96164
commit
16ca489843
@@ -46,6 +46,7 @@ for the up-to-date list of maintained branches of Shaka Player.
|
||||
|Tizen TV³ | - | - | - | - | - | - | - | - |**Y**|
|
||||
|WebOS⁶ | - | - | - | - | - | - | - | - |**Y**|
|
||||
|Hisense⁷ | - | - | - | - | - | - | - | - |**Y**|
|
||||
|Vizio⁷ | - | - | - | - | - | - | - | - |**Y**|
|
||||
|Xbox One | - | - | - | - | - | - | - | - |**Y**|
|
||||
|Playstation 4⁷| - | - | - | - | - | - | - | - |**Y**|
|
||||
|Playstation 5⁷| - | - | - | - | - | - | - | - |**Y**|
|
||||
@@ -239,6 +240,7 @@ MSS features **not** supported:
|
||||
|Tizen TV |**Y** |**Y** | - | - |**Y** |
|
||||
|WebOS⁷ |untested⁷ |untested⁷| - | - |untested⁷ |
|
||||
|Hisense⁷ |untested⁷ |untested⁷| - | - |untested⁷ |
|
||||
|Vizio⁷ |untested⁷ |untested⁷| - | - |untested⁷ |
|
||||
|Xbox One | - |**Y** | - | - | - |
|
||||
|Playstation 4⁷| - |untested⁷| - | - |untested⁷ |
|
||||
|Playstation 5⁷| - |untested⁷| - | - |untested⁷ |
|
||||
|
||||
@@ -2061,20 +2061,20 @@ shaka.extern.MediaSourceConfiguration;
|
||||
* IMA on platforms that do not support multiple video elements.
|
||||
* <br>
|
||||
* Defaults to <code>false</code> except on Tizen, WebOS, Chromecast,
|
||||
* Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
|
||||
* Hisense, PlayStation 4, PlayStation5, Xbox, Vizio whose default value is
|
||||
* <code>true</code>.
|
||||
* @property {boolean} skipPlayDetection
|
||||
* If this is true, we will load Client Side ads without waiting for a play
|
||||
* event.
|
||||
* <br>
|
||||
* Defaults to <code>false</code> except on Tizen, WebOS, Chromecast,
|
||||
* Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
|
||||
* Hisense, PlayStation 4, PlayStation5, Xbox, Vizio whose default value is
|
||||
* <code>true</code>.
|
||||
* @property {boolean} supportsMultipleMediaElements
|
||||
* If this is true, the browser supports multiple media elements.
|
||||
* <br>
|
||||
* Defaults to <code>true</code> except on Tizen, WebOS, Chromecast,
|
||||
* Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
|
||||
* Hisense, PlayStation 4, PlayStation5, Xbox, Vizio whose default value is
|
||||
* <code>false</code>.
|
||||
* @property {boolean} disableHLSInterstitial
|
||||
* If this is true, we ignore HLS interstitial events.
|
||||
|
||||
+12
-2
@@ -222,7 +222,8 @@ shaka.util.Platform = class {
|
||||
* @return {boolean}
|
||||
*/
|
||||
static isChromecast() {
|
||||
return shaka.util.Platform.userAgentContains_('CrKey');
|
||||
const Platform = shaka.util.Platform;
|
||||
return Platform.userAgentContains_('CrKey') && !Platform.isVizio();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,6 +338,14 @@ shaka.util.Platform = class {
|
||||
shaka.util.Platform.userAgentContains_('VIDAA');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current platform is Vizio TV.
|
||||
* @return {boolean}
|
||||
*/
|
||||
static isVizio() {
|
||||
return shaka.util.Platform.userAgentContains_('VIZIO SmartCast');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current platform is Orange.
|
||||
* @return {boolean}
|
||||
@@ -539,7 +548,8 @@ shaka.util.Platform = class {
|
||||
if (Platform.isTizen() || Platform.isWebOS() ||
|
||||
Platform.isXboxOne() || Platform.isPS4() ||
|
||||
Platform.isPS5() || Platform.isChromecast() ||
|
||||
Platform.isHisense() || Platform.isWebkitSTB()) {
|
||||
Platform.isHisense() || Platform.isVizio() ||
|
||||
Platform.isWebkitSTB()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -194,6 +194,8 @@ Tizen
|
||||
Uplynk
|
||||
Verimatrix
|
||||
Vidaa
|
||||
Vizio
|
||||
VIZIO
|
||||
Vnova
|
||||
Widevine
|
||||
wiseplay
|
||||
|
||||
@@ -27,6 +27,9 @@ describe('Platform', () => {
|
||||
const webOs4 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.34 Safari/537.36 WebAppManager';
|
||||
const webOs5 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 WebAppManager';
|
||||
const webOs6 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36 WebAppManager';
|
||||
|
||||
// cspell: disable-next-line
|
||||
const vizio = 'Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 CrKey/1.0.999999 VIZIO SmartCast(Conjure/MTKF-5.1.516.1 FW/0.6.11.1-2 Model/V50C6-J09)';
|
||||
/* eslint-enable max-len */
|
||||
|
||||
afterEach(() => {
|
||||
@@ -210,6 +213,12 @@ describe('Platform', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('checks is Vizio', () => {
|
||||
setUserAgent(vizio);
|
||||
expect(shaka.util.Platform.isVizio()).toBe(true);
|
||||
expect(shaka.util.Platform.isChromecast()).toBe(false);
|
||||
});
|
||||
|
||||
describe('isMediaKeysPolyfilled', () => {
|
||||
let shakaMediaKeysPolyfill;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user