Closed nnnikolay closed 11 months ago
I don’t understand why the redirect to YouTube?
Unfortunately, you can't use JavaScript to programmatically trigger full-screen mode in the Tesla browser because it doesn't support the Fullscreen API. Instead, you have to rely on the approach I mentioned using location.href to open a new page or website in full-screen.
Why?
Well, Tesla's browser is not a standard web browser (I guess) but rather custom development for their needs, the YouTube app in Tesla seems an instance of a browser as well, therefore, whenever I type YouTube.com in the browser the Tesla's built-in Youtube "app" will open (which is another browser's instance) in a fullscreen mode.
How redirect helps? while Tesla's Youtube "app" is opened in the full-screen mode it will ask a permission to be redirected or not, answering "Yes" user will stay in the Youtube "app" with the new content loaded in the full-screen mode.
There are many websites which apply the same hack
feel free to watch this short video which demonstrates the hack
Added
Update full-screen function to support Tesla's browser