diff options
| author | jules <jules@okfoc.us> | 2014-08-22 17:21:00 -0400 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2014-08-22 17:21:00 -0400 |
| commit | b4c2e36240ab3e2715d119a84c0c124ffabc3725 (patch) | |
| tree | 19ee19ed9fe0d11b692bea94daf3724867c14b1c /js/camera.js | |
| parent | 2b2d6a5048dc75cd1d3f7ec6b8829862ea0129dd (diff) | |
| parent | 73898a7939c810b4485d3226a5d1952827860668 (diff) | |
Merge branch 'master' of lmno:dither
Diffstat (limited to 'js/camera.js')
| -rw-r--r-- | js/camera.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/camera.js b/js/camera.js index e03586a..ef4898a 100644 --- a/js/camera.js +++ b/js/camera.js @@ -24,6 +24,11 @@ var camera = (function(){ } function ready(){ + // defer here if necessary.. firefox fires "canplay" before videoWidth is available + if (! video.videoWidth) { + setTimeout(ready, 50) + return + } cc.canvas.width = actual_w = w = min(video.videoWidth, 400) cc.canvas.height = actual_h = h = video.videoHeight / (video.videoWidth/w) video.setAttribute('width', video.videoWidth) |
