{"id":20623247,"url":"https://github.com/valiafetisov/vlc-simple-player","last_synced_at":"2025-04-15T12:37:19.386Z","repository":{"id":21474877,"uuid":"92666079","full_name":"valiafetisov/vlc-simple-player","owner":"valiafetisov","description":"Simple npm package that starts VLC player via command-line together with HTTP interface enabled","archived":false,"fork":false,"pushed_at":"2022-11-25T20:17:59.000Z","size":3510,"stargazers_count":6,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:21:17.753Z","etag":null,"topics":["nodejs","player","video","vlc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valiafetisov.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-28T14:26:20.000Z","updated_at":"2023-02-20T09:48:37.000Z","dependencies_parsed_at":"2023-01-12T03:45:39.899Z","dependency_job_id":null,"html_url":"https://github.com/valiafetisov/vlc-simple-player","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/valiafetisov%2Fvlc-simple-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiafetisov%2Fvlc-simple-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiafetisov%2Fvlc-simple-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiafetisov%2Fvlc-simple-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valiafetisov","download_url":"https://codeload.github.com/valiafetisov/vlc-simple-player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530586,"owners_count":21119600,"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":["nodejs","player","video","vlc"],"created_at":"2024-11-16T12:26:26.736Z","updated_at":"2025-04-15T12:37:19.367Z","avatar_url":"https://github.com/valiafetisov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VLC simple player\n\nSimple module that starts VLC player via command-line together with HTTP interface enabled.\nIt provides a unified API to start playing a file and to get information about current track.\n\n## Install\n\n```shell\nnpm install vlc-simple-player --save\n```\n(Please note you'll need VLC binary installed in your system, you can download it on [official website](http://www.videolan.org/vlc/#download))\n\n## Example usage\n\n```javascript\nvar VLC = require('vlc-simple-player')\n\n// start a fullscreen player\nvar player = new VLC('./path-to-your-movie/test.mp4')\n\n// log current track time every second\nplayer.on('statuschange', (error, status) =\u003e {\n  console.log('current time', status.time)\n})\n```\n\n## Interface\n\n- `new VLC(path[, options])` – starts a VLC player in fullscreen\n  - `path` – string path to the video file `./test.mov`\n  - `options` – object with _additional_ options\n    - `{password: String}` will set a custom password for the HTTP interface (instead of random, which can be accessed by `player.getPassword()` method, btw)\n    - `{port: Number}` will set a custom port for the HTTP interface (instead of default 8080)\n    - `{arguments: Array}` will replace default command-line arguments (`--fullscreen`, `--loop`, `--no-video-title`)\n- `player.on(eventName, callback)` - registers an event\n  - `eventName` – a string, available options are:\n    - `'error'` – stderr callback with error as an argument\n    - `'statuschange'` – callback that fires every second if the movie is playing\n  - `callback` – a function with error and status object as an arguments\n- `player.request(path, callback)` - exposed request method to the VLC HTTP interface\n  - `path` – a string, HTTP GET path with response in JSON format. For example:\n    `vlc.request('/requests/status.json?command=pl_pause')` – toggles a pause.\n    [list of HTTP requests and interface description](https://wiki.videolan.org/VLC_HTTP_requests/)\n  - `callback` – a function with error and status object as an arguments\n- `player.process` - exposed [spawned process](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)\n- `player.quit()` – stops the movie and close the player (via `SIGKILL`)\n\n## Contribution\n\nPlease feel free to submit a pull request for a bug fix or new features\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliafetisov%2Fvlc-simple-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaliafetisov%2Fvlc-simple-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliafetisov%2Fvlc-simple-player/lists"}