Bugzilla – Bug 17729
suggest needKey report codecs+key system supported by the UA
Last modified: 2012-08-28 20:26:35 UTC
It is a little complex for JS to test the UA using canPlayType() for many times to determine the key system.
I propose we just use needKey event to report the supported codec+key system pairs list to app, let app choose one key system among it, this will reduce the times of call to the UA for testing key system using canPlayType, and avoid extension of canPlayType.
What do you think about it?
We considered this before submitting the original proposal. However, we expect the number of possible key systems to be small and so the web page can try generateKeyRequest with different key systems in the order of preference of the site until one matches the [UA,Page,Media] supported combination.
The behavior is by design and consistent with existing canPlayType() use.