{"id":21161574,"url":"https://github.com/loctools/subtitle-previewer","last_synced_at":"2025-03-14T16:11:44.341Z","repository":{"id":146544690,"uuid":"349882755","full_name":"loctools/subtitle-previewer","owner":"loctools","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-21T02:39:15.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T09:29:07.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loctools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-21T02:27:46.000Z","updated_at":"2021-03-21T02:39:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"1db7ab1e-597e-40ba-9b0f-9d838bfd66ce","html_url":"https://github.com/loctools/subtitle-previewer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loctools%2Fsubtitle-previewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loctools%2Fsubtitle-previewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loctools%2Fsubtitle-previewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loctools%2Fsubtitle-previewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loctools","download_url":"https://codeload.github.com/loctools/subtitle-previewer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243606958,"owners_count":20318314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T13:15:06.726Z","updated_at":"2025-03-14T16:11:44.336Z","avatar_url":"https://github.com/loctools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subtitle Previewer\n\nThis is a subtitle previewer application that works directly in the browser (it doesn't require any server-side component), and is meant to be used as an in-context previewer when editing subtitles inside a CAT tool.\n\n# Installation\n\nYou can host it anywhere (on S3, or as a static Github page). Just publish the contents of the `previewer` folder somewhere where it can be accessed by a public URL.\n\n# Usage\n\nProvided you have published the Subtitle Prevewer under `https://example.com/previewer` URL, you can run it as follows:\n\n    https://example.com/previewer/index.html#jsonp={JSONP_URL}[\u0026hl={N}][\u0026play]\n\nwhere\n\n- `JSONP_URL` is a URL of a subtitle file in a special format (see below), which can be hosted anywhere.\n- `hl={N}` is an optional parameter, where `N` is the index of a cue to highlight and navigate to.\n- `play` is an optional parameter, which instructs the highlighted cue to auto-play upon loading.\n\n# JSONP Subtitle Data Format\n\nThis is a special format that allows one to reference the cue data across domains. It contains of a `jsonp( ... );` wrapper function with some JSON data inside. `cues` is an array of cues, and `mediaUrl` is a URL of a media file to be rendered. It can be a video file (`.mp4`) or an audio file (`.mp4`). If not provided, a blank video will be used. Each cue has `from` and `till` timestamps encoded as offsets from the beginning of the track, in milliseconds. `text` is what is being displayed on top of the video.\n\n```javascript\njsonp(\n{\n   \"mediaUrl\" : \"https://static.storage.site/path/to/video.mp4\",\n   \"cues\" : [\n      {\n         \"from\" : 4035,\n         \"text\" : \"Text of the first cue\",\n         \"till\" : 9099\n      },\n      {\n         \"from\" : 10043,\n         \"text\" : \"Text of the second cue\",\n         \"till\" : 12062\n      },\n      ...\n   ]\n}\n);\n```\n\n# Questions / Comments?\n\nJoin the chat in Gitter: https://gitter.im/loctools/community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floctools%2Fsubtitle-previewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floctools%2Fsubtitle-previewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floctools%2Fsubtitle-previewer/lists"}