readme and functions as module
parent
4b8c76bb76
commit
54a770ffcf
Binary file not shown.
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
// Mapping
|
||||
export default {
|
||||
1: () => test1(),
|
||||
2: () => test2(),
|
||||
3: () => {test1(); test2()}
|
||||
}
|
||||
|
||||
// Functions
|
||||
|
||||
const test1 = () => {
|
||||
console.log('test 1 test 1')
|
||||
}
|
||||
|
||||
const test2 = () => {
|
||||
console.log('test 2 test 2')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,11 +1,22 @@
|
||||
# Sub player
|
||||
|
||||
Use subtitles file (.srt) as timeline, attaching custom functions to the captions to build time-based web pages.
|
||||
|
||||
Use .srt file as timeline.
|
||||
Test for La Jeetee VR.
|
||||
`Test for La Jeetee VR.`
|
||||
|
||||
## Process
|
||||
|
||||
1. Load audio player
|
||||
2. Load subtitles .srt file
|
||||
3. Parse .srt files into array of subtitles
|
||||
4. Add timeupdate callback on audio player to update current subtitle
|
||||
5. Create an object to map the id of the subtitle to callback functions
|
||||
|
||||
## Files
|
||||
|
||||
- `index.html` is the entry point
|
||||
- `index.js` takes care of loading and parsing the SRT file, calling the functions from
|
||||
- `functions.js` custom list of functions to map onto the subtitles defined in
|
||||
- `jeetee.srt`, that is a standard .srt file for subtitles
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue