I'm having a conflict with these two scripts that I do not know how to solve. When I add xhook.js the playerhtml5 script stops working.
I made some tests and changed XMLHTTP = 'XMLHttpRequest';
for something like XMLHTTP = 'XMLHttpRequest2';
in xhook.js playerhtml5 returns to work but xhook.js stops working
https://jpillora.com/xhook/dist/xhook.js
https://static-egc.xvideos-cdn.com/v-d4b92c5105a/v3/js/skins/min/player.html5hls.static.js
The error that occurs
ERROR: "Uncaught TypeError: Cannot read property 'readyState' of null" in player.html5hls.static.js
window.onerror @ player.html5hls.static.js
error (async)
o @ player.html5hls.static.js
(anonymous) @ player.html5hls.static.js
(anonymous) @ player.html5hls.static.js
player.html5hls.static.js TypeError: Cannot read property 'readyState' of null
at e.readystatechange (player.html5hls.static.js)
at Object.EventEmitter.emitter.(anonymous function) [as dispatchEvent] (xhook.js:169:22)
at emitReadyState (xhook.js:382)
at setReadyState (xhook.js:405)
at XMLHttpRequest.xhr.onreadystatechange (xhook.js:438)