LoginSignup
0
0

More than 3 years have passed since last update.

なでしこの研究 その5

Last updated at Posted at 2020-10-21

概要

なでしこを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)

成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0