概要
なでしこをplunkerでホスティングしてみた。
plugin、書いてみた。
speechSynthesis、です。
サンプルコード
const PluginKent = {
'初期化': {
type: 'func',
josi: [],
fn: function(sys) {
}
},
'ケント作成': {
type: 'func',
josi: [],
fn: function(sys) {
return 2
}
},
'ケントplay': {
type: 'func',
josi: [],
fn: function(sys) {
const text = sys.__getSysValue('ケントtext', 'text')
speechSynthesis.speak(new SpeechSynthesisUtterance(text));
return 1
}
},
'ケントtext': {
type: 'var',
value: 'text'
}
}
navigator.nako3.addPluginObject('PluginKent', PluginKent)
成果物
以上。