Cross origin problems with video - HTML5 Game Devs Forum
文章推薦指數: 80 %
Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The video element contains cross-origin data, and may not be loaded. Jumptocontent Wearehappytoinformyouthatforumisactiveback!;)ThenewownerofbrandHtml5GameDevsisGameMonetize.com × Browse Forums Staff OnlineUsers More Activity MyActivityStreams AllActivity UnreadContent ContentIStarted Search More Leaderboard Marketplace ContactUs Twitter More More SearchIn Everywhere Topics ThisForum ThisTopic Moreoptions... Findresultsthatcontain... Anyofmysearchtermwords Allofmysearchtermwords Findresultsin... Contenttitlesandbody Contenttitlesonly Pixi.js AllActivity Home Frameworks Pixi.js Crossoriginproblemswithvideo Crossoriginproblemswithvideo By trsh, May27,2020inPixi.js Share Moresharingoptions... Followers 0 Replytothistopic Startnewtopic RecommendedPosts trsh PostedMay27,2020 trsh Members 83 Report Share PostedMay27,2020 `Failedtoexecute'texImage2D'on'WebGL2RenderingContext':Thevideoelementcontainscross-origindata,andmaynotbeloaded.` Howtofixthis? TheresponseheaderformyvideodeliveredseemstobeOK: Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range Access-Control-Allow-Methods: GET Access-Control-Allow-Origin: http://localhost:3000 Access-Control-Expose-Headers: Content-Length,Content-Range Quote Linktocomment Shareonothersites Moresharingoptions... trsh PostedMay27,2020 trsh Members 83 Author Report Share PostedMay27,2020 (edited) Seemslikethisbugisonlywhenusing: constvideoResource=newPIXI.resources.VideoResource(videoEl,{ autoPlay:false, autoLoad:true, crossorigin:true }); EditedMay27,2020bytrsh Quote Linktocomment Shareonothersites Moresharingoptions... trsh PostedMay27,2020 trsh Members 83 Author Report Share PostedMay27,2020 Ineededtoadd: constmyLuckyVideoElTmp=document.createElement('video'); myLuckyVideoElTmp.preload="auto"; myLuckyVideoElTmp.setAttribute('crossorigin','anonymous'); Nowitworks themoonratand jonforum 2 Quote Linktocomment Shareonothersites Moresharingoptions... Jointheconversation Youcanpostnowandregisterlater. Ifyouhaveanaccount,signinnowtopostwithyouraccount. Note:Yourpostwillrequiremoderatorapprovalbeforeitwillbevisible. Replytothistopic... × Pastedasrichtext. Pasteasplaintextinstead Only75emojiareallowed. × Yourlinkhasbeenautomaticallyembedded. Displayasalinkinstead × Yourpreviouscontenthasbeenrestored. Cleareditor × Youcannotpasteimagesdirectly.UploadorinsertimagesfromURL. Loading... × Desktop Tablet Phone SubmitReply Share Moresharingoptions... Followers 0 Gototopiclisting RecentlyBrowsing 0members Noregisteredusersviewingthispage. HTML5GameDevsForum AllActivity Home Frameworks Pixi.js Crossoriginproblemswithvideo × Existinguser?SignIn SignUp Browse Back Forums Staff OnlineUsers Activity Back MyActivityStreams AllActivity UnreadContent ContentIStarted Search Leaderboard Marketplace ContactUs Twitter × CreateNew...
延伸文章資訊
- 1Cross Origin Images - WebGL Fundamentals
This article is one in a series of articles about WebGL. ... 'WebGLRenderingContext': The image e...
- 2Failed to execute 'texImage2D' on 'WebGL2RenderingContext ...
Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-orig...
- 3Allowing cross-origin use of images and canvas - HTML
An event listener is added for the load event being fired on the image element, which means the i...
- 4Failed to execute 'texImage2D' on 'WebGLRenderingContext'
... The image element contains cross-origin data, and may not be loaded. ... because the canvas h...
- 5The image contains cross-origin data [closed] - Stack Overflow
The error you have suggest that you are using an image that is served by a server different from ...