Can you do complex things with Shopify's Javascript?

I have created a Bluetooth enabled device and I plan to sell both the device and some special “programs” for it. I have a working prototype running on my website and my initial plan was to send customers to this site once they have made a purchase. But that’s not a great user experience.

Since Shopify supports Javascript, I’m wondering if I could just run the code on Shopify’s site. Here’s what the code would need to do:

  1. Connect to the Bluetooth device (this is fairly simple)
  2. Download and play (or stream) an audio file
  3. Start a timer
  4. Iterate through a data file of timestamps (there is one data file for each audio file)
  5. Each time the timer = a timestamp, send a signal to the Bluetooth device

Hi @FunnishLLC ,

Do you have the Javascript code for this? Or do you want to ask Javascript code to support it?

I have a prototype running Javascript code that does the 4 things I mentioned. I am getting some new hardware, though, so the code will change. I’m just wondering if Shopify’s Javascript implementation would allow for that kind of complexity. Can I download files? Can I play music?

Hi @FunnishLLC ,

If you already have Javascript files and want to import them at Shopify theme, you can follow these steps:

Hope it helps!