mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-19 16:47:01 +03:00
596c80a949
This changes the network API to use BufferSource instead of ArrayBuffer, which allows plugins to return a "view" on a buffer instead of the whole buffer. This also adds some utilities for changing between views and buffers. Lastly this forbids the use of the "buffer" property of TypedArrays since it doesn't work with partial "views". This audits and fixes the usages of the "buffer" property to ensure correct usage. It should be noted that both MSE and EME accept a BufferSource as input, so we don't need to convert a "view" into an ArrayBuffer before passing to it. Change-Id: Iaa417773f8ce5304424e43c7372ce10ebf540d2a