IE & Edge fixes, Storage & Console classes

This commit is contained in:
Sam Potts
2017-12-08 10:05:38 +00:00
parent de54929bb7
commit c8990bd379
33 changed files with 1051 additions and 615 deletions

View File

@ -50,25 +50,6 @@ const support = {
};
},
// Local storage
// We can't assume if local storage is present that we can use it
storage: (() => {
if (!('localStorage' in window)) {
return false;
}
// Try to use it (it might be disabled, e.g. user is in private/porn mode)
// see: https://github.com/sampotts/plyr/issues/131
const test = '___test';
try {
window.localStorage.setItem(test, test);
window.localStorage.removeItem(test);
return true;
} catch (e) {
return false;
}
})(),
// Picture-in-picture support
// Safari only currently
pip: (() => {