videojs-shaka icon indicating copy to clipboard operation
videojs-shaka copied to clipboard

isBrowserSupported in videojs-shaka

Open andreydruz opened this issue 2 years ago • 2 comments

Have you read the Tutorials? Yes

Have you checked for duplicate open issues here? Yes

What version of Shaka Player and videojs-shaka are you using? "videojs-shaka": "1.1.1",

Please ask your question Shaka have option to check shaka.Player.isBrowserSupported() https://shaka-player-demo.appspot.com/docs/api/tutorial-basic-usage.html Its needed to check if we can use shaka player or to use native player on ipad https://github.com/shaka-project/shaka-player

How can I check it on videojs-shaka?

I tried:

console.log(this.videoPlayer.tech_.player_.isBrowserSupported());
console.log(this.videoPlayer.tech_.shaka_.isBrowserSupported());

But its did not worked.

andreydruz avatar Jul 01 '22 08:07 andreydruz

@andreydruz - isBrowserSupported is a static function which is why you don't see it. You can just call it via shaka.Player. So adding something like this should work.

console.log(shaka.Player.isBrowserSupported())

davidjamesherzog avatar Aug 08 '22 00:08 davidjamesherzog

https://shaka-player-demo.appspot.com/docs/api/shaka.Player.html

davidjamesherzog avatar Aug 08 '22 00:08 davidjamesherzog