Commit Graph

23 Commits

Author SHA1 Message Date
toasted-nutbread
a51a591c40
Update audio validity checks to be based on the source (#1290) 2021-01-22 21:09:43 -05:00
toasted-nutbread
cf57c4e38d
Simplify CacheMap (#1287)
* Simplify CacheMap, removing support for array path keys

* Update keys

* Update JsonSchemaValidator

* Update AudioSystem
2021-01-21 22:49:54 -05:00
toasted-nutbread
21fce9f3d9
Audio system refactoring (#1275)
* Simplify details

* Simplify audio creation

* Return an array of sources instead of a single item

* Use sourceIndex instead of index

* Rename APIs

* Return more info about the source

* Return source instead of sourceIndex
2021-01-18 22:01:08 -05:00
toasted-nutbread
887150e012
Audio system improvements (#1268)
* Simplify API

* Move fallback audio
2021-01-17 23:05:15 -05:00
toasted-nutbread
a02891e52c
Update copyright year (#1194)
* Update copyright year

* Remove redundant Author info
2021-01-01 14:50:41 -05:00
toasted-nutbread
0b51488f1f
Audio system refactor (#858)
* Refactor AudioUriBuilder

* Add downloadAudio function

* Refactor AudioSystem

* Update API usage

* Rename file

* Update scripts

* Add prepare calls
2020-09-26 13:41:26 -04:00
toasted-nutbread
52b0feb255
Move TextToSpeechAudio to a separate file (#800) 2020-09-10 12:06:56 -04:00
toasted-nutbread
35abd517b9
AudioUriBuilder simplification (#799)
* Rename variables to disambiguate

* Update handler argument convention

* Update getUri argument convention

* Change _getAudioUri argument convention

* Change getDefinitionAudio argument convention

* Add api.getDefinitionAudio definition
2020-09-10 11:57:38 -04:00
toasted-nutbread
58e5ddfde0
Generalize AnkiNoteBuilder to not use audioSystem directly (#796) 2020-09-09 21:07:18 -04:00
toasted-nutbread
bdcdf9b1f5
Strip request origin (#710)
* Add web request permissions

* Create fetch wrapper that anonymizes the request

* Fix Firefox not supporting 'extraHeaders' option
2020-08-02 18:58:19 -04:00
toasted-nutbread
b1b33f8beb
Fix fetch requests (#708)
* Revert audio fetching functionality to use XMLHttpRequest

* Replace requestJson

* Replace requestJson

* Replace requestJson

* Replace requestJson and requestText

* Fix tests

* Include support for vulgar word searches

* Remove request.js
2020-08-02 13:30:55 -04:00
toasted-nutbread
8a7ff6a18c
Replace XMLHttpRequest (#562)
* Replace XMLHttpRequest with fetch

* Implement fetch placeholder for tests
2020-06-13 10:23:04 -04:00
toasted-nutbread
9900291b07
Fix not awaiting the AudioSystem.arrayBufferDigest promise (#524) 2020-05-09 12:28:48 -04:00
toasted-nutbread
acfdaa4f48
Fix incorrect static call (#498) 2020-05-02 17:24:05 -04:00
toasted-nutbread
cae6b657ab
Anki audio download (#477)
* Update how audio is added to Anki cards

* Upgrade Anki templates

* Update comments
2020-05-02 12:50:16 -04:00
toasted-nutbread
fcbfde506a Await and handle errors from audio.play() 2020-04-18 14:23:34 -04:00
toasted-nutbread
7eb7c88394 Return index of the source instead of the source value 2020-04-18 14:23:34 -04:00
toasted-nutbread
f50aee1021 Only return the cached value if it uses a valid source 2020-04-18 14:23:34 -04:00
toasted-nutbread
e1ebfb02f7 Disable cache on the backend and fix a bug with the cache key 2020-04-18 14:23:34 -04:00
toasted-nutbread
823c026533 Remove de/structuring from public API 2020-04-18 14:23:34 -04:00
toasted-nutbread
7fc3882607 Update the parameters passed to various audio-related functions 2020-04-18 14:23:34 -04:00
4e5029f7ec Update license author field to broader to explicitly reflect that
Yomichan is an ongoing community project. It really does take a village,
and everyone who contributes code owns a part of it :)
2020-04-10 11:10:21 -07:00
toasted-nutbread
dceaa85309 Rename audio.js to audio-system.js 2020-03-07 21:43:51 -05:00