Stylistic nitpick: In Javascript `a.b` and `a['b']` are identical. I prefer the former when you're dealing with static strings. Can you change these lines to:
```js
window.VideoState = {};
window.VideoState.id = {};
```