mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-21 17:07:09 +03:00
7ae6fc7d93
The 'webkitkeyneeded' and 'encrypted' events send similar data, but they were incompatible with each other and our transform handling. This makes our polyfill produce the same format as the browser for cases where the browser may only fire the old event. This also makes our utilities work with the new format. The 'webkitkeyneeded' event was a length-prefixed UTF-16 string while the 'encrypted' event was just a UTF-8 string. This also makes a breaking change in the transform callback to pass the init data type. This shouldn't break anyone that only uses the first argument; the second argument was mainly added so we could have the default transform work without knowing anything. This change could also break people who use custom transform functions. The init data format is changing, which could break people who read it directly. If they follow the tutorial and use our utilities, it shouldn't break. This also updates the tutorial to match the new format and be more clear about the format. Fixes #2214 Change-Id: I006382028e828e31e20e085114fd7fd85c0e1eaa