RecordRTC icon indicating copy to clipboard operation
RecordRTC copied to clipboard

RecordRTC overwrites the browser Storage interface

Open graemechapman opened this issue 1 year ago • 0 comments

This library overwrites the browser's existing Storage interface (https://developer.mozilla.org/en-US/docs/Web/API/Storage) with an object which does not conform to this spec - see https://github.com/muaz-khan/RecordRTC/blob/7b1c360f27c7ae34047137bb2356e39b6f93374f/dev/Storage.js#L14

This can cause unexpected errors in other code present on the page which is working with local/session storage, e.g.

window.localStorage instanceof Storage

This should probably be renamed to something which does not conflict with browser built ins, and also scoped within a function to avoid polluting the global context.

graemechapman avatar Oct 05 '23 14:10 graemechapman