15 September 2015
Corona Store: Flashlights, Vibration, and Text to Speech
We have a few exciting new plugins available on the Corona Store: Spiral Code Studio hits us yet again with LED flashlight control, vibration control, and text to speech.
Please visit the store to activate plugins, or to submit a plugin yourself.
1. Flashlight
The Flashlight plugin provides access to the flash LED light source, which can be used as a torch. This works on Android and iOS.
Using it is quite simple:
1 2 3 4 5 |
local flashlight = require('plugin.flashlight') -- Show the light for 3 seconds flashlight.on() timer.performWithDelay( 3000, function() flashlight.off() end ) |
Check it out on the Corona Store.
2. Vibrator
The Vibrator plugin provides you a fine control over vibration ability of Android devices. iOS devices, unfortunately, lack such customization.
1 2 3 4 5 6 7 8 9 |
local vibrator = require('plugin.vibrator') ... -- Vibrate for a second vibrator.vibrate(1000) -- Wait for 100ms, vibrate for 500ms, turn off for 200ms, vibrate for 250ms. Repeat. vibrator.vibrate({100, 500, 200, 250}, 1) |
Check it out on the Corona Store.
3. Text to Speech
The Text-To-Speech plugin enables your applications on Android and iOS to speak various text in various languages. You can control pitch, rate and volume.
1 2 3 4 5 6 7 |
local texttospeech = require('plugin.texttospeech') texttospeech.speak( 'Hello, Corona!', { language = 'en-US', pitch = 0.8, rate = 0.6, volume = 0.9 } ) |
Check it out on the Corona Store.
Scott
Posted at 17:00h, 15 SeptemberCool plugins Spiral studios
Thomas Vanden Abeele
Posted at 06:13h, 16 SeptemberHi there!
Very cool to see that these are free plug-ins! Thanks, Spiral Studios! For the record: things like this definitely make me more inclined to pay for other stuff from a developer.
Serkan
Posted at 08:16h, 16 SeptemberGreat plugins Spiral Code, hats off to you! Especially for the VK plugin!
Erich Grüttner D.
Posted at 08:58h, 16 SeptemberThank you Spiral Code, amazing plugins!!!
gregt
Posted at 08:04h, 17 SeptemberFantastic work!
Robert
Posted at 13:58h, 17 SeptemberThanks for these awesome plug-ins!
Radu
Posted at 15:41h, 17 SeptemberGreat work Sergey, thanks!
Simon Fearby
Posted at 15:57h, 17 SeptemberIf you find this code useful you can donate to the author http://spiralcodestudio.com/donate
Josh Bryan
Posted at 21:18h, 17 SeptemberHello,
I’m trying out the sample version from github and I keep getting this error:
?:0: attempt to index global ‘network’ (a nil value)
stack traceback:
?:in function ‘downloadManifest’
?”in function ‘downloadQueuedManifests’
?:in function
?:in main chunk
Do you have an idea of whats going on?
Sajid
Posted at 21:52h, 17 SeptemberGreat thing continuously coming up by Spiral Code.. Specially Text to Speech..
Thanx alot Sergey Lalov
Claude
Posted at 02:23h, 18 SeptemberReally cool plugins guys!
Not having text to speech functionality was the reason I couldn’t developed an app cross platform!
Jander
Posted at 05:15h, 18 SeptemberThanks, Spiral Studios!!!
belghiti
Posted at 02:44h, 20 SeptemberGreat work…
Warren
Posted at 21:47h, 20 SeptemberThese are great plugins! I wish the app did not pause when I use the flashlight. I set it to show the light for as quick as 20ms and it was still on longer than that and the app pauses while it is on. Any way around this?
Thanks!!