UNPKG

@videojs/http-streaming

Version:

Play back HLS and DASH with Video.js, even where it's not natively supported

10 lines (7 loc) 223 B
export const stringToArrayBuffer = (string) => { const view = new Uint8Array(new ArrayBuffer(string.length)); for (let i = 0; i < string.length; i++) { view[i] = string.charCodeAt(i); } return view.buffer; };