-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples が browser/node で分かれているのを纏められないか #101
Comments
https://github.com/chirimen-oh/remote-connection/blob/master/js/RelayServer.js 読むと下記のAPIがNode.jsではデフォルトでglobalThisに存在しないと思うので対処が必要そうですね:
|
Scaledrone はサービス側がライブラリとして提供してるヤツで、こいつの node 向けライブラリがあるのかという問題になりますね |
TextEncoder って MDN 的には Node 11.0 からサポート的に書いてるけど使えないのかな。 |
今 setup.sh 見ると v12 なので問題無さそうですね 🙆♂️ > TextEncoder |
WebSocket はライブラリに入れ替えるか universal なモジュールに差し替える程度にするか? どうやっても良いけど確かにちょっと手当は必要 |
オフィシャルドキュメント https://www.scaledrone.com/docs/api-clients/javascript は browser 向けのものしか案内してくれてないけど node module これ使えば良い感じかな。こいつが両対応で動けば分けずに済むが... ついでに scaledrone のモジュールは使う時に動的・自動的に読み込むようにして、利用するサービスに応じて script タグを追加しなくて良いように出来ると嬉しい |
browser/node 版それぞれを使う人にとっては必要十分な情報がこちらにある
但し、少し気になるところがある
また、Remote 版のサーバは node 版も用意すれば自由に組み合わせて使えるようになったりするし、browser/node で分けずに CHIRIMEN のデバイスの説明とそこからそれぞれの利用例をリンクするような形にした方が良さそうに思う。
The text was updated successfully, but these errors were encountered: