mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 08:04:49 +01:00
client-side rewrite: fix window.devicePixelRatio to 1 to ensure consistent replay (esp for video)
This commit is contained in:
parent
c6d196c9fe
commit
ce3ba9e42e
@ -717,7 +717,15 @@ var _WBWombat = function($wbwindow, wbinfo) {
|
||||
|
||||
$wbwindow.Crypto.prototype.getRandomValues = new_getrandom;
|
||||
$wbwindow.crypto.getRandomValues = new_getrandom;
|
||||
}
|
||||
}
|
||||
|
||||
//============================================
|
||||
function init_fixed_ratio() {
|
||||
if (Object.defineProperty) {
|
||||
// fixed pix ratio
|
||||
Object.defineProperty($wbwindow, "devicePixelRatio", {value: 1, configurable: false});
|
||||
}
|
||||
}
|
||||
|
||||
//============================================
|
||||
function override_history_func(func_name) {
|
||||
@ -2850,6 +2858,9 @@ var _WBWombat = function($wbwindow, wbinfo) {
|
||||
// Crypto Random
|
||||
init_crypto_random();
|
||||
|
||||
// set fixed pixel ratio
|
||||
init_fixed_ratio();
|
||||
|
||||
// Date
|
||||
init_date_override(wbinfo.wombat_sec);
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
{% endif %}
|
||||
|
||||
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wb.js'> </script>
|
||||
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/vidrw.js'> </script>
|
||||
|
||||
{% include banner_html ignore missing %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user