Skip to content

Commit 8022760

Browse files
author
Lauren McCarthy
committed
closes #1274. turns out an earlier fix for this was lost somehow, i just put it back in
1 parent 640c993 commit 8022760

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/addons/p5.dom.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! p5.dom.js v0.2.8 February 4, 2016 */
1+
/*! p5.dom.js v0.2.9 March 3, 2016 */
22
/**
33
* <p>The web is much more than just canvas and p5.dom makes it easy to interact
44
* with other HTML5 objects, including text, hyperlink, image, input, video,
@@ -1694,9 +1694,9 @@
16941694
this.drawingContext = this.canvas.getContext('2d');
16951695
}
16961696
if (this.loadedmetadata) { // wait for metadata for w/h
1697-
if (this.canvas.width !== this.elt.width) {
1698-
this.canvas.width = this.elt.width;
1699-
this.canvas.height = this.elt.height;
1697+
if (this.canvas.width !== this.elt.videoWidth) {
1698+
this.canvas.width = this.elt.videoWidth;
1699+
this.canvas.height = this.elt.videoHeight;
17001700
this.width = this.canvas.width;
17011701
this.height = this.canvas.height;
17021702
}

0 commit comments

Comments
 (0)