diff --git a/src/Player.html b/src/Player.html
index 0117dd38..4872eab0 100644
--- a/src/Player.html
+++ b/src/Player.html
@@ -101,8 +101,8 @@
this._width = width;
this._height = height;
const dimension = {
- width: document.body.offsetWidth,
- height: document.body.offsetHeight - controllerHeight,
+ width: this.refs.player.offsetWidth,
+ height: this.refs.player.offsetHeight - controllerHeight,
};
this.set(dimension);
this.updateScale(replayer.wrapper, {