Skip to content

Commit 615e849

Browse files
committed
Add crossOrigin property to the AbstractMediaLoader to make those respect the crossOrigin setting (video's can be used in canvasses)
1 parent eab00cf commit 615e849

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/preloadjs/loaders/AbstractMediaLoader.js

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ this.createjs = this.createjs || {};
7070
this._tag = this._createTag(this._item.src);
7171
}
7272

73+
var crossOrigin = this._item.crossOrigin;
74+
if (crossOrigin == true) { crossOrigin = "Anonymous"; }
75+
if (crossOrigin != null && !createjs.URLUtils.isLocal(this._item)) {
76+
this._tag.crossOrigin = crossOrigin;
77+
}
78+
7379
this._tag.preload = "auto";
7480
this._tag.load();
7581

0 commit comments

Comments
 (0)