4

I want to provide my own preview image for page in Philips TV (NETTV models) browser. It is displayed near page address in history.

How can I do it?

enter image description here (image from avforum, obtained from google search)

Philips TV use Opera 11.6 as browser. userAgent string is:

Opera/9.80 (Linux mips; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/4.0.2; en) Presto/2.10.250 Version/11.60
Ivan Solntsev
  • 2,081
  • 2
  • 31
  • 40

1 Answers1

5

I don't know exactly how the Philips TV browser works, but the most logical thing to try out first would be the og:image tag and see if the TV picks it up.

<meta property="og:image" content="http://example.com/image.png"/>

If not, then the TV is probably using some screen capture library. You could try this workaround to get the desired behaviour:

First, find out your TV's user agent. For example, browse to http://whatsmyuseragent.com/ from your TV.

Then on your page, create a small script that checks the user agent, and if it's the TV, show your preview picture as an overlay for a few seconds.

Hopefully the TV will take a screenshot of the initial render of the page, and then your TV splash will show.

function hideSplash() {
  document.getElementById("tv-splash").style.display = "none";
}

// Remove '|Mozilla' when development is ready 
if (/Philips|Mozilla/.test(navigator.userAgent)) {
  setTimeout(hideSplash, 2000);
} else {
  hideSplash();
}
#tv-splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f00 url(http://i.imgur.com/IonCAf7.jpg) center center no-repeat;
  background-size: 50%;
  z-index: 1;
}
<div id="tv-splash"></div>
<h1>My website</h1>
hampusohlsson
  • 10,109
  • 5
  • 33
  • 50
  • Ok, as you can see the user agent contains the word "Philips" so you can probably use it to identify when the TV is looking at your page. – hampusohlsson Oct 22 '15 at 08:57
  • Sorry, I did not have time to check it. I will have device to check only on next week. However bounty is expires tomorrow, so i will award it to you. – Ivan Solntsev Oct 23 '15 at 09:07