Hi there, I’m working with a student who is using the web bluetooth api in https://editor.p5js.org. Previously we got around iframe cross-origin security errors by running the sketch in full-screen present mode. Now it appears that the present link redirects to the “fullscreen” link and places the sketch within an iframe using a blob source making the present mode inaccessible. Is there a work around for this that would allow us to continue using the online editor or are we required to self host?
Wow, that’s sad and does not seem like a good solution to me. I do not understand the rationale of the decision makers in this case (UPDATE: I hindsight and with more sober consideration I can see why something needed to be done quickly since some users were losing access to p5js.org because of alleged real world abuse, and at least temporarily taking down preview.p5js.org may have been necessary). This is pretty much the last nail in the editor.p5js.org coffin for me. I suggest you use OpenProcessing.org:
And on that “full” link there’s an outer <iframe> tag: <iframe title="sketch preview" src="https://preview.p5js.org" sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-downloads" allow="accelerometer; ambient-light-sensor; autoplay; camera; encrypted-media; geolocation; gyroscope; hid; microphone; magnetometer; midi; payment; usb; serial; vr; xr-spatial-tracking" scrolling="auto" allowfullscreen="" frameborder="0" class="PreviewFrame__Frame-sc-1a6lcg6-0 hnmshZ"></iframe>
Followed by an inner <iframe> which indeed loads a “blob” sketch link: <iframe aria-label="Sketch Preview" role="main" frameborder="0" class="EmbedFrame__Frame-sc-1ubw1m0-0 jkcGdZ" src="blob:https://preview.p5js.org/53e1840f-43d9-4527-88a0-8243ca59026b"></iframe>
No workaround AFAIK, but you can switch to something else.
And if we have a peek on its <iframe> tag: <iframe id="ifr" width="100%" height="100%" scrolling="no" style="border:1px solid #000000; background: url(/static/img/jun09/pad/connectingbar.gif) no-repeat center 60px;" src="http://p5js.processingtogether.com/sp/pad/iframe/ro.CYuAGs4xyhzhKu/rev.13?so=1&autostart=0"></iframe>
Here’s some Gist Bl.ocks example sketch I’ve got there:
It’s also wrapped up by an <iframe> obvisouly: <iframe sandbox="allow-popups allow-scripts allow-forms allow-same-origin" src="/GoSubRoutine/raw/a117ecb16a8b0f939a190f87d3a13267/de8f4ab2948159292114dfb1e1f282f1176d99cd/" marginwidth="0" marginheight="0" style="height:400px;" scrolling="no"></iframe>
I would like to apologize for my negative insinuations directed a specific people in this matter. I still think the sequence of events and current state of affairs is not ideal. However I genuinely believe that everybody working on the site is doing their best and a good job. My remark was uncalled for. I am sorry.