HbbTV-Association / Developer-Portal-Issues

A place to capture issues relating to the content and functionality of the HbbTV Developer Portal at https://developer.hbbtv.org/
0 stars 0 forks source link

HbbTV broadband video best practices #12

Open gcsaperas-konodrac opened 5 months ago

gcsaperas-konodrac commented 5 months ago

First of all, I'm totally aware Issues is not the best place for adding my question, but HbbTV does not have a real forum, just StackOverflow, and StackOverflow does not allow generic documentation questions in their guidelines.

I'm currently trying to implement a video replacement in an HbbTV application. I am testing it in an HbbTV/1.2.1 device (spec v1.5). I don't have a v2 device.

Ideal scenario:

  1. Initialize HbbTV Application and show HbbTV broadcast.
  2. Preload video in the background without blocking the HbbTV broadcast.
  3. When the video can play through: stop broadcast -> show video -> play video until the end -> hide video -> start and show broadcast.

So far I found out the <video /> HTML Element provides the worst results. I get a black screen right as soon as I set video.src, no matter my CSS rules. I can't seem to hide the video while it's loading. Maybe I'm missing something.

The <object type="video/mp4" /> provides the best and most consistent results.

My current results look like this:

  1. Initialize HbbTV Application and show HbbTV broadcast.
  2. 2-3 seconds delay.
  3. Display black screen, 2-3 seconds delay.
  4. Video playback until the end.
  5. Display black screen, 2-3 seconds delay.
  6. Successfully back to the broadcast.

The only problem with <object type="video/mp4" /> is that I can't preload it and sometimes it has to stop and buffer.

Overall, I'm quite happy with my results, but I would like to know what is the best way of implementing what I want in HbbTV 1.5. I know there are better alternatives in newer HbbTV versions.