Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-omxplayer

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-omxplayer - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

1

config-sample.json

@@ -18,2 +18,3 @@ {

"repeatAll": true,
"format": "18",
"path": "remove this row to download to default persist folder",

@@ -20,0 +21,0 @@ "playNextSwitch": true,

3

index.js

@@ -23,2 +23,3 @@ var Player = require('./lib/player');

this.volumeControl = config.volumeControl || false;
this.format = config.format || 18;
this.playlist = config.playlist || [];

@@ -91,3 +92,3 @@ this.path = config.path || HomebridgeAPI.user.persistPath()

var self = this;
downloader.download(this.youtube, this.path, this.log, function (err, filename) {
downloader.download(this.youtube, this.path, this.platform.format, this.log, function (err, filename) {
self.filename = filename;

@@ -94,0 +95,0 @@ self.log('Finished Download: ' + filename);

var fs = require('fs');
var youtubedl = require('youtube-dl');
function download(source, path, log, callback) {
function download(source, path, format, log, callback) {
var filename = path + "/" + videoId(source) + '.mp4';

@@ -12,3 +12,3 @@ if (fs.existsSync(filename)) {

var video = youtubedl(source, ['--format=18'], { cwd: path });
var video = youtubedl(source, ['--format='+format], { cwd: path });
log('Starting to download from: ' + source + ' to: ' + filename + '.');

@@ -15,0 +15,0 @@

{
"name": "homebridge-omxplayer",
"version": "2.0.2",
"version": "2.1.0",
"description": "Play or stop any youtube/videos/audio using omxplayer on raspberry pi https://github.com/oronbz/homebridge-omxplayer.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,2 +17,4 @@

**Format** in config - for choosing the quality of the downloaded file. USE WITH CAUTION - See Formats table below.
**Path** in config - to choose which folder to download the files. when not set, the default persist folder will be chosen.

@@ -30,2 +32,3 @@

"repeatAll": true,
"format": "18",
"path": "remove this row to download to default persist folder",

@@ -105,4 +108,43 @@ "playNextSwitch": true,

Reboot and try again.
## Formats
### Easy Formats
**"best"**: Select the best quality format represented by a single file with video and audio.
**"worst"**: Select the worst quality format represented by a single file with video and audio.
**"bestvideo"**: Select the best quality video-only format (e.g. DASH video). May not be available.
**"worstvideo"**: Select the worst quality video-only format. May not be available.
**"bestaudio"**: Select the best quality audio only-format. May not be available.
**"worstaudio"**: Select the worst quality audio only-format. May not be available
### For Experts
#### it will only download if this version is available for all your tracks
| format code | extension | resolution | note |
| ------------ | ---------- | ------------ | ------ |
| 140 | m4a | audio only | DASH audio , audio@128k (worst)|
| 160 | mp4 | 144p | DASH video , video only|
| 133 | mp4 | 240p | DASH video , video only|
| 134 | mp4 | 360p | DASH video , video only|
| 135 | mp4 | 480p | DASH video , video only|
| 136 | mp4 | 720p | DASH video , video only|
| 17 | 3gp | 176x144 | |
| 36 | 3gp | 320x240 | |
| 5 | flv | 400x240 | |
| 43 | webm | 640x360 | |
| 18 | mp4 | 640x360 | |
| 22 | mp4 | 1280x720 | (best)|
## Credits
This plugin was inspired by homebridge-dummy by **@nfarina** and the idea for this plugin came from my little brother **@nitaybz** which has written many other plugins already, so you should definitely explore his repos too: https://github.com/nitaybz?tab=repositories
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc