Replies: 0 comments 10 replies
-
An idea I had yesterday while the meeting was already coming to an end: We could also publish these node apps and instead of linking to a server we have to maintain (and/or pay for), we could ask people to run something like: npx @mdn/sample-server websocket-chat Which could then also open the site in their default browser. A downside: It would burden the people with having to have installed Node beforehand. |
Beta Was this translation helpful? Give feedback.
-
See also mdn/content#5389 in which it looks like someone used Glitch for a similar use case, and the account has stopped working. |
Beta Was this translation helpful? Give feedback.
-
Has there been any more thought on this? I was looking at how I might host another WebRTC example for WebRTC Encoded Transforms. I was going to use the approach in Using DTMF of faking the server (which you can do because you control both ends of the peer connection). However I'm blocked because an encoded transform runs in a worker, and MDN won't allow that to load inline ... or offline either due to CSP restrictions. |
Beta Was this translation helpful? Give feedback.
-
MDN had a custom server, https://github.com/mdn/samples-server. According to the README it's for for live samples that need "a less restrictive environment than running in an iframe on Kuma" - most particularly I think for samples that need some custom server-side handling.
We've decommissioned the sample server, so we need to find a replacement.
I believe this server only served four examples that are used on MDN:
https://mdn-samples.mozilla.org/snippets/html/iframe-simple-contents.html
https://mdn-samples.mozilla.org/s/webrtc-capturestill
https://mdn-samples.mozilla.org/s/webrtc-simple-datachannel
https://mdn-samples.mozilla.org/s/websocket-chat
...referenced from the following MDN pages:
https://developer.mozilla.org/en-us/web/html/element/iframe/
https://developer.mozilla.org/en-us/web/api/webrtc_api/taking_still_photos/
https://developer.mozilla.org/en-us/web/api/webrtc_api/simple_rtcdatachannel_sample/
https://developer.mozilla.org/en-us/web/api/websockets_api/writing_websocket_client_applications/
Since there are only a very few pages involved, it would be good to do this cheaply: to avoid making this a huge project or one that gives the dev team an lot of extra code to maintain.
The most urgent example is probably the iframe one referenced from https://developer.mozilla.org/en-us/web/html/element/iframe/ - someone already filed an issue about this: mdn/content#4116. This is also probably the easiest to fix, since it doesn't require a custom server-side component.
One suggestion is to use (something like) Glitch, and it would probably be worth trying this out.
Beta Was this translation helpful? Give feedback.
All reactions