0

What's the best practice way to detect when an unsupported caption track is loaded (ie, a dfxp caption track)?

Options I'm trying to avoid:

  • Filter by MIME type before sending to chromecast (many of our clients' servers do not properly type response headers).

  • Filter by extension before sending to chromecast (Similar issue as with above).

Are there any methods or events native to the SDK that simulate when an unsupported track is loaded?

Afrophysics
  • 579
  • 3
  • 14

1 Answers1

1

You can use canDisplayType API: https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.CastReceiverContext#canDisplayType

I would recommend to go through the supported media: https://developers.google.com/cast/docs/media#top_of_page

  • You may have missed the description. The issue is that I have no control over MIME type on our customers' servers. I'm asking if there is any event that fires when chromecast tries to load unsupported captions, or alternatively if there is an API function I can pass a track to that parses the file itself to determine support. – Afrophysics Oct 08 '19 at 21:06