mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Removed cors-anywhere dependency
This commit is contained in:
		
							
								
								
									
										202
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										202
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -165,7 +165,8 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "bignumber.js": { |     "bignumber.js": { | ||||||
|       "version": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-2.4.0.tgz", |       "version": "2.4.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-2.4.0.tgz", | ||||||
|       "integrity": "sha1-g4qZLan51zfg9LLbC+YrsJ3Qxeg=" |       "integrity": "sha1-g4qZLan51zfg9LLbC+YrsJ3Qxeg=" | ||||||
|     }, |     }, | ||||||
|     "blob": { |     "blob": { | ||||||
| @@ -173,7 +174,8 @@ | |||||||
|       "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=" |       "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=" | ||||||
|     }, |     }, | ||||||
|     "bmp-js": { |     "bmp-js": { | ||||||
|       "version": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.0.3.tgz", |       "version": "0.0.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.0.3.tgz", | ||||||
|       "integrity": "sha1-ZBE+nHzxICs3btYHvzBibr5XsYo=" |       "integrity": "sha1-ZBE+nHzxICs3btYHvzBibr5XsYo=" | ||||||
|     }, |     }, | ||||||
|     "body-parser": { |     "body-parser": { | ||||||
| @@ -221,7 +223,8 @@ | |||||||
|       "integrity": "sha1-k8ENOeqltYQVy8QFLz5T5WKwtyw=" |       "integrity": "sha1-k8ENOeqltYQVy8QFLz5T5WKwtyw=" | ||||||
|     }, |     }, | ||||||
|     "buffer-equal": { |     "buffer-equal": { | ||||||
|       "version": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", |       "version": "0.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", | ||||||
|       "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" |       "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" | ||||||
|     }, |     }, | ||||||
|     "buffer-shims": { |     "buffer-shims": { | ||||||
| @@ -297,6 +300,14 @@ | |||||||
|       "version": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", |       "version": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", | ||||||
|       "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" |       "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" | ||||||
|     }, |     }, | ||||||
|  |     "color-thief-jimp": { | ||||||
|  |       "version": "2.0.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/color-thief-jimp/-/color-thief-jimp-2.0.2.tgz", | ||||||
|  |       "integrity": "sha1-KVHbZ8ssInJU877macVi11NNQ+o=", | ||||||
|  |       "requires": { | ||||||
|  |         "jimp": "0.2.28" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "combined-stream": { |     "combined-stream": { | ||||||
|       "version": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", |       "version": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", | ||||||
|       "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", |       "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", | ||||||
| @@ -355,13 +366,6 @@ | |||||||
|       "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", |       "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", | ||||||
|       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" |       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" | ||||||
|     }, |     }, | ||||||
|     "cors-anywhere": { |  | ||||||
|       "version": "https://registry.npmjs.org/cors-anywhere/-/cors-anywhere-0.2.5.tgz", |  | ||||||
|       "integrity": "sha1-Sn0y/xAKJw7cjUz55UK9NrLTkFw=", |  | ||||||
|       "requires": { |  | ||||||
|         "http-proxy": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.11.1.tgz" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "cryptiles": { |     "cryptiles": { | ||||||
|       "version": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", |       "version": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", | ||||||
|       "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", |       "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", | ||||||
| @@ -439,7 +443,8 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "dom-walk": { |     "dom-walk": { | ||||||
|       "version": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", |       "version": "0.1.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", | ||||||
|       "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" |       "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" | ||||||
|     }, |     }, | ||||||
|     "double-ended-queue": { |     "double-ended-queue": { | ||||||
| @@ -540,7 +545,8 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "es6-promise": { |     "es6-promise": { | ||||||
|       "version": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", |       "version": "3.3.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", | ||||||
|       "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" |       "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" | ||||||
|     }, |     }, | ||||||
|     "escape-html": { |     "escape-html": { | ||||||
| @@ -555,12 +561,9 @@ | |||||||
|       "version": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", |       "version": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", | ||||||
|       "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" |       "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" | ||||||
|     }, |     }, | ||||||
|     "eventemitter3": { |  | ||||||
|       "version": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", |  | ||||||
|       "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=" |  | ||||||
|     }, |  | ||||||
|     "exif-parser": { |     "exif-parser": { | ||||||
|       "version": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", |       "version": "0.1.12", | ||||||
|  |       "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", | ||||||
|       "integrity": "sha1-WKnS1ywCwfbwKg70qRZicrd2CSI=" |       "integrity": "sha1-WKnS1ywCwfbwKg70qRZicrd2CSI=" | ||||||
|     }, |     }, | ||||||
|     "expand-brackets": { |     "expand-brackets": { | ||||||
| @@ -691,7 +694,8 @@ | |||||||
|       "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" |       "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" | ||||||
|     }, |     }, | ||||||
|     "file-type": { |     "file-type": { | ||||||
|       "version": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", |       "version": "3.9.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", | ||||||
|       "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" |       "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" | ||||||
|     }, |     }, | ||||||
|     "filename-regex": { |     "filename-regex": { | ||||||
| @@ -765,10 +769,11 @@ | |||||||
|       "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=" |       "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=" | ||||||
|     }, |     }, | ||||||
|     "for-each": { |     "for-each": { | ||||||
|       "version": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", |       "version": "0.3.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", | ||||||
|       "integrity": "sha1-LEBFC5NI6X8oEyJZO6lnBLmr1NQ=", |       "integrity": "sha1-LEBFC5NI6X8oEyJZO6lnBLmr1NQ=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "is-function": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz" |         "is-function": "1.0.1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "for-in": { |     "for-in": { | ||||||
| @@ -905,11 +910,12 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "global": { |     "global": { | ||||||
|       "version": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", |       "version": "4.3.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", | ||||||
|       "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", |       "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "min-document": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", |         "min-document": "2.19.0", | ||||||
|         "process": "https://registry.npmjs.org/process/-/process-0.5.2.tgz" |         "process": "0.5.2" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "global-modules": { |     "global-modules": { | ||||||
| @@ -1167,14 +1173,6 @@ | |||||||
|         "statuses": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" |         "statuses": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "http-proxy": { |  | ||||||
|       "version": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.11.1.tgz", |  | ||||||
|       "integrity": "sha1-cd9VdX6ALVjqgQ3yJEAZ3aBa6F0=", |  | ||||||
|       "requires": { |  | ||||||
|         "eventemitter3": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", |  | ||||||
|         "requires-port": "https://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "http-signature": { |     "http-signature": { | ||||||
|       "version": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", |       "version": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", | ||||||
|       "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", |       "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", | ||||||
| @@ -1218,7 +1216,8 @@ | |||||||
|       "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" |       "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" | ||||||
|     }, |     }, | ||||||
|     "ip-regex": { |     "ip-regex": { | ||||||
|       "version": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", |       "version": "1.0.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", | ||||||
|       "integrity": "sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0=" |       "integrity": "sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0=" | ||||||
|     }, |     }, | ||||||
|     "ipaddr.js": { |     "ipaddr.js": { | ||||||
| @@ -1257,7 +1256,8 @@ | |||||||
|       "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" |       "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" | ||||||
|     }, |     }, | ||||||
|     "is-function": { |     "is-function": { | ||||||
|       "version": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", |       "version": "1.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", | ||||||
|       "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" |       "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" | ||||||
|     }, |     }, | ||||||
|     "is-glob": { |     "is-glob": { | ||||||
| @@ -1347,29 +1347,31 @@ | |||||||
|       "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" |       "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" | ||||||
|     }, |     }, | ||||||
|     "jimp": { |     "jimp": { | ||||||
|       "version": "https://registry.npmjs.org/jimp/-/jimp-0.2.28.tgz", |       "version": "0.2.28", | ||||||
|  |       "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.2.28.tgz", | ||||||
|       "integrity": "sha1-3VKak3GQ9ClXp5N9Gsw6d2KZbqI=", |       "integrity": "sha1-3VKak3GQ9ClXp5N9Gsw6d2KZbqI=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "bignumber.js": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-2.4.0.tgz", |         "bignumber.js": "2.4.0", | ||||||
|         "bmp-js": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.0.3.tgz", |         "bmp-js": "0.0.3", | ||||||
|         "es6-promise": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", |         "es6-promise": "3.3.1", | ||||||
|         "exif-parser": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", |         "exif-parser": "0.1.12", | ||||||
|         "file-type": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", |         "file-type": "3.9.0", | ||||||
|         "jpeg-js": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.2.0.tgz", |         "jpeg-js": "0.2.0", | ||||||
|         "load-bmfont": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.3.0.tgz", |         "load-bmfont": "1.3.0", | ||||||
|         "mime": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", |         "mime": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", | ||||||
|         "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", |         "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", | ||||||
|         "pixelmatch": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", |         "pixelmatch": "4.0.2", | ||||||
|         "pngjs": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.0.tgz", |         "pngjs": "3.3.1", | ||||||
|         "read-chunk": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz", |         "read-chunk": "1.0.1", | ||||||
|         "request": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", |         "request": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", | ||||||
|         "stream-to-buffer": "https://registry.npmjs.org/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz", |         "stream-to-buffer": "0.1.0", | ||||||
|         "tinycolor2": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", |         "tinycolor2": "1.4.1", | ||||||
|         "url-regex": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz" |         "url-regex": "3.2.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "jpeg-js": { |     "jpeg-js": { | ||||||
|       "version": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.2.0.tgz", |       "version": "0.2.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.2.0.tgz", | ||||||
|       "integrity": "sha1-U+RI7J0mPmgyZkZ+lELSxaLvVII=" |       "integrity": "sha1-U+RI7J0mPmgyZkZ+lELSxaLvVII=" | ||||||
|     }, |     }, | ||||||
|     "jsbn": { |     "jsbn": { | ||||||
| @@ -1437,15 +1439,16 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "load-bmfont": { |     "load-bmfont": { | ||||||
|       "version": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.3.0.tgz", |       "version": "1.3.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.3.0.tgz", | ||||||
|       "integrity": "sha1-u358cQ3mvK/LE8s7jIHgwBMey8k=", |       "integrity": "sha1-u358cQ3mvK/LE8s7jIHgwBMey8k=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "buffer-equal": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", |         "buffer-equal": "0.0.1", | ||||||
|         "mime": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", |         "mime": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", | ||||||
|         "parse-bmfont-ascii": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz", |         "parse-bmfont-ascii": "1.0.6", | ||||||
|         "parse-bmfont-binary": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz", |         "parse-bmfont-binary": "1.0.6", | ||||||
|         "parse-bmfont-xml": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.3.tgz", |         "parse-bmfont-xml": "1.1.3", | ||||||
|         "xhr": "https://registry.npmjs.org/xhr/-/xhr-2.4.0.tgz", |         "xhr": "2.4.1", | ||||||
|         "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" |         "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @@ -1615,10 +1618,11 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "min-document": { |     "min-document": { | ||||||
|       "version": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", |       "version": "2.19.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", | ||||||
|       "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", |       "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "dom-walk": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz" |         "dom-walk": "0.1.1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "minimatch": { |     "minimatch": { | ||||||
| @@ -1890,19 +1894,22 @@ | |||||||
|       "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" |       "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" | ||||||
|     }, |     }, | ||||||
|     "parse-bmfont-ascii": { |     "parse-bmfont-ascii": { | ||||||
|       "version": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz", |       "version": "1.0.6", | ||||||
|  |       "resolved": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz", | ||||||
|       "integrity": "sha1-Eaw8P/WPfCAgqyJ2kHkQjU36AoU=" |       "integrity": "sha1-Eaw8P/WPfCAgqyJ2kHkQjU36AoU=" | ||||||
|     }, |     }, | ||||||
|     "parse-bmfont-binary": { |     "parse-bmfont-binary": { | ||||||
|       "version": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz", |       "version": "1.0.6", | ||||||
|  |       "resolved": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz", | ||||||
|       "integrity": "sha1-0Di0dtPp3Z2x4RoLDlOiJ5K2kAY=" |       "integrity": "sha1-0Di0dtPp3Z2x4RoLDlOiJ5K2kAY=" | ||||||
|     }, |     }, | ||||||
|     "parse-bmfont-xml": { |     "parse-bmfont-xml": { | ||||||
|       "version": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.3.tgz", |       "version": "1.1.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.3.tgz", | ||||||
|       "integrity": "sha1-1rZqNxr9OcUAfZ8O6yYqTyzOe3w=", |       "integrity": "sha1-1rZqNxr9OcUAfZ8O6yYqTyzOe3w=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "xml-parse-from-string": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz", |         "xml-parse-from-string": "1.0.1", | ||||||
|         "xml2js": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz" |         "xml2js": "0.4.19" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "parse-filepath": { |     "parse-filepath": { | ||||||
| @@ -1925,11 +1932,12 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "parse-headers": { |     "parse-headers": { | ||||||
|       "version": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", |       "version": "2.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", | ||||||
|       "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", |       "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "for-each": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", |         "for-each": "0.3.2", | ||||||
|         "trim": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz" |         "trim": "0.0.1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "parse-mongo-url": { |     "parse-mongo-url": { | ||||||
| @@ -1986,15 +1994,17 @@ | |||||||
|       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" |       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" | ||||||
|     }, |     }, | ||||||
|     "pixelmatch": { |     "pixelmatch": { | ||||||
|       "version": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", |       "version": "4.0.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", | ||||||
|       "integrity": "sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ=", |       "integrity": "sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "pngjs": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.0.tgz" |         "pngjs": "3.3.1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "pngjs": { |     "pngjs": { | ||||||
|       "version": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.0.tgz", |       "version": "3.3.1", | ||||||
|       "integrity": "sha1-H1cwwYnJSTO4G+2iqy+OKFUmOo8=" |       "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.1.tgz", | ||||||
|  |       "integrity": "sha512-ggXCTsqHRIsGMkHlCEhbHhUmNTA2r1lpkE0NL4Q9S8spkXbm4vE9TVmPso2AGYn90Gltdz8W5CyzhcIGg2Gejg==" | ||||||
|     }, |     }, | ||||||
|     "preserve": { |     "preserve": { | ||||||
|       "version": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", |       "version": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", | ||||||
| @@ -2005,7 +2015,8 @@ | |||||||
|       "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" |       "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" | ||||||
|     }, |     }, | ||||||
|     "process": { |     "process": { | ||||||
|       "version": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", |       "version": "0.5.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", | ||||||
|       "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" |       "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" | ||||||
|     }, |     }, | ||||||
|     "process-nextick-args": { |     "process-nextick-args": { | ||||||
| @@ -2083,7 +2094,8 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "read-chunk": { |     "read-chunk": { | ||||||
|       "version": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz", |       "version": "1.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz", | ||||||
|       "integrity": "sha1-X2jKswfmY/GZk1J9m1icrORmEZQ=" |       "integrity": "sha1-X2jKswfmY/GZk1J9m1icrORmEZQ=" | ||||||
|     }, |     }, | ||||||
|     "readable-stream": { |     "readable-stream": { | ||||||
| @@ -2188,10 +2200,6 @@ | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "requires-port": { |  | ||||||
|       "version": "https://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz", |  | ||||||
|       "integrity": "sha1-S0QUQR2d98hVmV3YmajHiilRwW0=" |  | ||||||
|     }, |  | ||||||
|     "resolve": { |     "resolve": { | ||||||
|       "version": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", |       "version": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", | ||||||
|       "integrity": "sha1-p1vgHFPaJdk0qY69DkxKcxL5KoY=", |       "integrity": "sha1-p1vgHFPaJdk0qY69DkxKcxL5KoY=", | ||||||
| @@ -2223,7 +2231,8 @@ | |||||||
|       "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" |       "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" | ||||||
|     }, |     }, | ||||||
|     "sax": { |     "sax": { | ||||||
|       "version": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", |       "version": "1.2.4", | ||||||
|  |       "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", | ||||||
|       "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" |       "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" | ||||||
|     }, |     }, | ||||||
|     "semver": { |     "semver": { | ||||||
| @@ -2387,14 +2396,16 @@ | |||||||
|       "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" |       "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" | ||||||
|     }, |     }, | ||||||
|     "stream-to": { |     "stream-to": { | ||||||
|       "version": "https://registry.npmjs.org/stream-to/-/stream-to-0.2.2.tgz", |       "version": "0.2.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/stream-to/-/stream-to-0.2.2.tgz", | ||||||
|       "integrity": "sha1-hDBgmNhf25kLn6MAsbPM9V6O8B0=" |       "integrity": "sha1-hDBgmNhf25kLn6MAsbPM9V6O8B0=" | ||||||
|     }, |     }, | ||||||
|     "stream-to-buffer": { |     "stream-to-buffer": { | ||||||
|       "version": "https://registry.npmjs.org/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz", |       "version": "0.1.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz", | ||||||
|       "integrity": "sha1-JnmdkDqyAlyb1VCsRxcbAPjdgKk=", |       "integrity": "sha1-JnmdkDqyAlyb1VCsRxcbAPjdgKk=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "stream-to": "https://registry.npmjs.org/stream-to/-/stream-to-0.2.2.tgz" |         "stream-to": "0.2.2" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "string_decoder": { |     "string_decoder": { | ||||||
| @@ -2478,7 +2489,8 @@ | |||||||
|       "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" |       "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" | ||||||
|     }, |     }, | ||||||
|     "tinycolor2": { |     "tinycolor2": { | ||||||
|       "version": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", |       "version": "1.4.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", | ||||||
|       "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" |       "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" | ||||||
|     }, |     }, | ||||||
|     "to-array": { |     "to-array": { | ||||||
| @@ -2497,7 +2509,8 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "trim": { |     "trim": { | ||||||
|       "version": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", |       "version": "0.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", | ||||||
|       "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" |       "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" | ||||||
|     }, |     }, | ||||||
|     "tunnel-agent": { |     "tunnel-agent": { | ||||||
| @@ -2563,10 +2576,11 @@ | |||||||
|       "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" |       "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" | ||||||
|     }, |     }, | ||||||
|     "url-regex": { |     "url-regex": { | ||||||
|       "version": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz", |       "version": "3.2.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz", | ||||||
|       "integrity": "sha1-260eDJ4p4QXdCx8J9oYvf9tIJyQ=", |       "integrity": "sha1-260eDJ4p4QXdCx8J9oYvf9tIJyQ=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "ip-regex": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz" |         "ip-regex": "1.0.3" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "user-home": { |     "user-home": { | ||||||
| @@ -2699,29 +2713,33 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "xhr": { |     "xhr": { | ||||||
|       "version": "https://registry.npmjs.org/xhr/-/xhr-2.4.0.tgz", |       "version": "2.4.1", | ||||||
|       "integrity": "sha1-4W5mpF+GmGHu76tBbV7/ci3ECZM=", |       "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.4.1.tgz", | ||||||
|  |       "integrity": "sha512-pAIU5vBr9Hiy5cpFIbPnwf0C18ZF86DBsZKrlsf87N5De/JbA6RJ83UP/cv+aljl4S40iRVMqP4pr4sF9Dnj0A==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "global": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", |         "global": "4.3.2", | ||||||
|         "is-function": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", |         "is-function": "1.0.1", | ||||||
|         "parse-headers": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", |         "parse-headers": "2.0.1", | ||||||
|         "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" |         "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "xml-parse-from-string": { |     "xml-parse-from-string": { | ||||||
|       "version": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz", |       "version": "1.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz", | ||||||
|       "integrity": "sha1-qQKekp09vN7RafPG4oI42VpdWig=" |       "integrity": "sha1-qQKekp09vN7RafPG4oI42VpdWig=" | ||||||
|     }, |     }, | ||||||
|     "xml2js": { |     "xml2js": { | ||||||
|       "version": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", |       "version": "0.4.19", | ||||||
|  |       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", | ||||||
|       "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", |       "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "sax": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", |         "sax": "1.2.4", | ||||||
|         "xmlbuilder": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz" |         "xmlbuilder": "9.0.4" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "xmlbuilder": { |     "xmlbuilder": { | ||||||
|       "version": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", |       "version": "9.0.4", | ||||||
|  |       "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", | ||||||
|       "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=" |       "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=" | ||||||
|     }, |     }, | ||||||
|     "xmlhttprequest-ssl": { |     "xmlhttprequest-ssl": { | ||||||
|   | |||||||
| @@ -29,8 +29,8 @@ | |||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "bad-words": "^1.5.1", |     "bad-words": "^1.5.1", | ||||||
|     "body-parser": "^1.17.1", |     "body-parser": "^1.17.1", | ||||||
|  |     "color-thief-jimp": "^2.0.2", | ||||||
|     "cookie-parser": "^1.4.3", |     "cookie-parser": "^1.4.3", | ||||||
|     "cors-anywhere": "^0.2.3", |  | ||||||
|     "emoji-strip": "^0.0.3", |     "emoji-strip": "^0.0.3", | ||||||
|     "express": "^4.15.2", |     "express": "^4.15.2", | ||||||
|     "express-handlebars": "^3.0.0", |     "express-handlebars": "^3.0.0", | ||||||
| @@ -40,7 +40,7 @@ | |||||||
|     "gulp-concat": "^2.6.1", |     "gulp-concat": "^2.6.1", | ||||||
|     "gulp-uglifyjs": "^0.6.2", |     "gulp-uglifyjs": "^0.6.2", | ||||||
|     "gulp-util": "^3.0.8", |     "gulp-util": "^3.0.8", | ||||||
|     "jimp": "^0.2.27", |     "jimp": "^0.2.28", | ||||||
|     "mobile-detect": "^1.3.7", |     "mobile-detect": "^1.3.7", | ||||||
|     "mongodb": "^2.0.27", |     "mongodb": "^2.0.27", | ||||||
|     "mongojs": "^2.4.0", |     "mongojs": "^2.4.0", | ||||||
|   | |||||||
| @@ -53,8 +53,6 @@ function startClustered() { | |||||||
|  |  | ||||||
| function startSingle(clustered) { | function startSingle(clustered) { | ||||||
|     var app = require('./index.js'); |     var app = require('./index.js'); | ||||||
|     var cors_options = {}; |  | ||||||
|     var cors_proxy = require('cors-anywhere'); |  | ||||||
|     try { |     try { | ||||||
|         var cert_config = require(path.join(path.join(__dirname, 'config'), 'cert_config.js')); |         var cert_config = require(path.join(path.join(__dirname, 'config'), 'cert_config.js')); | ||||||
|         var fs = require('fs'); |         var fs = require('fs'); | ||||||
| @@ -70,27 +68,13 @@ function startSingle(clustered) { | |||||||
|         var https = require('https'); |         var https = require('https'); | ||||||
|         server = https.Server(credentials, app); |         server = https.Server(credentials, app); | ||||||
|  |  | ||||||
|         cors_options = { |  | ||||||
|             requireHeader: ['origin', 'x-requested-with'], |  | ||||||
|             removeHeaders: ['cookie', 'cookie2'], |  | ||||||
|             httpsOptions: credentials |  | ||||||
|         }; |  | ||||||
|  |  | ||||||
|     } catch(err){ |     } catch(err){ | ||||||
|         console.log("Starting without https (probably on localhost)"); |         console.log("Starting without https (probably on localhost)"); | ||||||
|         cors_options = { |  | ||||||
|             requireHeader: ['origin', 'x-requested-with'], |  | ||||||
|             removeHeaders: ['cookie', 'cookie2'], |  | ||||||
|         }; |  | ||||||
|         var http = require('http'); |         var http = require('http'); | ||||||
|         server = http.Server(app); |         server = http.Server(app); | ||||||
|         //add = ",http://localhost:80*,http://localhost:8080*,localhost:8080*, localhost:8082*,http://zoff.dev:80*,http://zoff.dev:8080*,zoff.dev:8080*, zoff.dev:8082*"; |         //add = ",http://localhost:80*,http://localhost:8080*,localhost:8080*, localhost:8082*,http://zoff.dev:80*,http://zoff.dev:8080*,zoff.dev:8080*, zoff.dev:8082*"; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     cors_proxy.createServer(cors_options).listen(8081, function() { |  | ||||||
|         console.log('Running CORS Anywhere on :' + 8081 + " [" + process.pid + "]"); |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     if(clustered) { |     if(clustered) { | ||||||
|         server.listen(onListen); |         server.listen(onListen); | ||||||
|     } else { |     } else { | ||||||
|   | |||||||
| @@ -38,6 +38,12 @@ module.exports = function() { | |||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         socket.on('color', function(msg) { | ||||||
|  |             if(msg.hasOwnProperty("id")) { | ||||||
|  |                 List.sendColor(false, socket, msg.id); | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  |  | ||||||
|         socket.on('chromecast', function(msg) { |         socket.on('chromecast', function(msg) { | ||||||
|             try { |             try { | ||||||
|                 if(typeof(msg) == "object" && msg.hasOwnProperty("guid") && msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel")) { |                 if(typeof(msg) == "object" && msg.hasOwnProperty("guid") && msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel")) { | ||||||
|   | |||||||
| @@ -1,3 +1,5 @@ | |||||||
|  | var ColorThief = require('color-thief-jimp'); | ||||||
|  | var Jimp = require('jimp'); | ||||||
|  |  | ||||||
| function now_playing(list, fn, socket) { | function now_playing(list, fn, socket) { | ||||||
|     if(typeof(list) !== 'string' || typeof(fn) !== 'function') { |     if(typeof(list) !== 'string' || typeof(fn) !== 'function') { | ||||||
| @@ -443,12 +445,16 @@ function send_play(coll, socket) | |||||||
|                     toSend = {np: np, conf: conf, time: Functions.get_time()}; |                     toSend = {np: np, conf: conf, time: Functions.get_time()}; | ||||||
|                     if(socket === undefined) { |                     if(socket === undefined) { | ||||||
|                         io.to(coll).emit("np", toSend); |                         io.to(coll).emit("np", toSend); | ||||||
|  |                         // | ||||||
|                         List.getNextSong(coll) |                         List.getNextSong(coll) | ||||||
|  |                         sendColor(coll, false, np[0].id); | ||||||
|                     } else { |                     } else { | ||||||
|                         socket.emit("np", toSend); |                         socket.emit("np", toSend); | ||||||
|  |                         sendColor(coll, socket, np[0].id); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             } catch(e){ |             } catch(e){ | ||||||
|  |                 console.log(e); | ||||||
|                 if(socket) { |                 if(socket) { | ||||||
|                     socket.emit("np", {}); |                     socket.emit("np", {}); | ||||||
|                 } else { |                 } else { | ||||||
| @@ -459,6 +465,19 @@ function send_play(coll, socket) | |||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function sendColor(coll, socket, id) { | ||||||
|  |     var url = 'https://img.youtube.com/vi/'+id+'/mqdefault.jpg'; | ||||||
|  |     Jimp.read(url).then(function (image) { | ||||||
|  |  | ||||||
|  |         var c = ColorThief.getColor(image); | ||||||
|  |         if(socket) { | ||||||
|  |             socket.emit("color", {color: c}); | ||||||
|  |         } else { | ||||||
|  |             io.to(coll).emit("color", {color: c}); | ||||||
|  |         } | ||||||
|  |     }); | ||||||
|  | } | ||||||
|  |  | ||||||
| function getNextSong(coll) { | function getNextSong(coll) { | ||||||
|     db.collection(coll).aggregate([{ |     db.collection(coll).aggregate([{ | ||||||
|         $match:{ |         $match:{ | ||||||
| @@ -518,6 +537,7 @@ function left_channel(coll, guid, short_id, in_list, socket, change) | |||||||
|     Functions.remove_unique_id(short_id); |     Functions.remove_unique_id(short_id); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | module.exports.sendColor = sendColor; | ||||||
| module.exports.now_playing = now_playing; | module.exports.now_playing = now_playing; | ||||||
| module.exports.list = list; | module.exports.list = list; | ||||||
| module.exports.skip = skip; | module.exports.skip = skip; | ||||||
|   | |||||||
| @@ -540,6 +540,7 @@ var Channel = { | |||||||
|                         socket.removeEventListener("channel"); |                         socket.removeEventListener("channel"); | ||||||
|                         //socket.removeEventListener(id); |                         //socket.removeEventListener(id); | ||||||
|                     } |                     } | ||||||
|  |                     socket.removeEventListener("color"); | ||||||
|                     document.getElementById("volume-button").removeEventListener("click", Playercontrols.mute_video); |                     document.getElementById("volume-button").removeEventListener("click", Playercontrols.mute_video); | ||||||
|                     document.getElementById("playpause").removeEventListener("click", Playercontrols.play_pause); |                     document.getElementById("playpause").removeEventListener("click", Playercontrols.play_pause); | ||||||
|                     document.getElementById("fullscreen").removeEventListener("click", Playercontrols.fullscreen); |                     document.getElementById("fullscreen").removeEventListener("click", Playercontrols.fullscreen); | ||||||
|   | |||||||
| @@ -191,6 +191,7 @@ function setup_chat_listener(){ | |||||||
|  |  | ||||||
| function setup_list_listener(){ | function setup_list_listener(){ | ||||||
|     socket.on("channel", List.channel_function); |     socket.on("channel", List.channel_function); | ||||||
|  |     socket.on("color", Player.setBGimage); | ||||||
| } | } | ||||||
|  |  | ||||||
| function setup_playlist_listener(){ | function setup_playlist_listener(){ | ||||||
|   | |||||||
| @@ -37,7 +37,9 @@ var Player = { | |||||||
|             Helper.log("mobile_beginning variable: " + mobile_beginning); |             Helper.log("mobile_beginning variable: " + mobile_beginning); | ||||||
|             try{ |             try{ | ||||||
|                 Helper.log("getVideoUrl(): " + Player.player.getVideoUrl().split('v=')[1]); |                 Helper.log("getVideoUrl(): " + Player.player.getVideoUrl().split('v=')[1]); | ||||||
|             } catch(e){} |             } catch(e){ | ||||||
|  |  | ||||||
|  |             } | ||||||
|             Helper.log("video_id variable: " + video_id); |             Helper.log("video_id variable: " + video_id); | ||||||
|             Helper.log("---------------------------------"); |             Helper.log("---------------------------------"); | ||||||
|  |  | ||||||
| @@ -56,7 +58,9 @@ var Player = { | |||||||
|                     if(!chromecastAvailable) { |                     if(!chromecastAvailable) { | ||||||
|                         Player.stopVideo(); |                         Player.stopVideo(); | ||||||
|                     } |                     } | ||||||
|                 }catch(e){} |                 }catch(e){ | ||||||
|  |  | ||||||
|  |                 } | ||||||
|                 //List.importOldList(channel.toLowerCase()); |                 //List.importOldList(channel.toLowerCase()); | ||||||
|             } else if(paused){ |             } else if(paused){ | ||||||
|  |  | ||||||
| @@ -87,7 +91,7 @@ var Player = { | |||||||
|                 seekTo     = (time - conf.startTime) + Player.np.start; |                 seekTo     = (time - conf.startTime) + Player.np.start; | ||||||
|                 song_title = obj.np[0].title; |                 song_title = obj.np[0].title; | ||||||
|                 duration   = obj.np[0].duration; |                 duration   = obj.np[0].duration; | ||||||
|                 Player.setBGimage(video_id); |                 //Player.setBGimage(video_id); | ||||||
|             } else if(!paused){ |             } else if(!paused){ | ||||||
|                 //Helper.log("gotten new song"); |                 //Helper.log("gotten new song"); | ||||||
|                 if(previous_video_id === undefined) { |                 if(previous_video_id === undefined) { | ||||||
| @@ -127,7 +131,7 @@ var Player = { | |||||||
|                 }catch(e){} |                 }catch(e){} | ||||||
|  |  | ||||||
|                 Player.getTitle(song_title, viewers); |                 Player.getTitle(song_title, viewers); | ||||||
|                 Player.setBGimage(video_id); |                 //Player.setBGimage(video_id); | ||||||
|                 //if(player_ready && !Helper.mobilecheck()) |                 //if(player_ready && !Helper.mobilecheck()) | ||||||
|                 if(player_ready && !window.MSStream) { |                 if(player_ready && !window.MSStream) { | ||||||
|                     try { |                     try { | ||||||
| @@ -324,6 +328,9 @@ var Player = { | |||||||
|             window.player = Player.player; |             window.player = Player.player; | ||||||
|             Player.player.loadVideoById({'videoId': id, 'startSeconds': s, 'endSeconds': e}); |             Player.player.loadVideoById({'videoId': id, 'startSeconds': s, 'endSeconds': e}); | ||||||
|         } |         } | ||||||
|  |         if(offline) { | ||||||
|  |             socket.emit("color", {id: id}); | ||||||
|  |         } | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     stopVideo: function(){ |     stopVideo: function(){ | ||||||
| @@ -366,7 +373,7 @@ var Player = { | |||||||
|         }; |         }; | ||||||
|  |  | ||||||
|         Player.getTitle(song_title, viewers); |         Player.getTitle(song_title, viewers); | ||||||
|         Player.setBGimage(video_id); |         //Player.setBGimage(video_id); | ||||||
|         if(chromecastAvailable){ |         if(chromecastAvailable){ | ||||||
|             castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end:end}); |             castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end:end}); | ||||||
|             chrome.cast.media.GenericMediaMetadata({metadataType: "GENERIC", title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg'}); |             chrome.cast.media.GenericMediaMetadata({metadataType: "GENERIC", title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg'}); | ||||||
| @@ -402,7 +409,7 @@ var Player = { | |||||||
|         }; |         }; | ||||||
|  |  | ||||||
|         Player.getTitle(song_title, viewers); |         Player.getTitle(song_title, viewers); | ||||||
|         Player.setBGimage(video_id); |         //Player.setBGimage(video_id); | ||||||
|  |  | ||||||
|         if(chromecastAvailable){ |         if(chromecastAvailable){ | ||||||
|             castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end: end}); |             castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end: end}); | ||||||
| @@ -517,32 +524,19 @@ var Player = { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     readyLooks: function() { |     readyLooks: function() { | ||||||
|         Player.setBGimage(video_id); |         //Player.setBGimage(video_id); | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     setBGimage: function(id){ |     setBGimage: function(c){ | ||||||
|         if(id !== undefined && !embed) |         var color = c.color; | ||||||
|         { |         if(window.location.pathname != "/") { | ||||||
|             var img    = new Image(); |             document.getElementById("main-container").style.backgroundColor = Helper.rgbToHsl(color,true); | ||||||
|             img.onload = function () |             $("meta[name=theme-color]").attr("content", Helper.rgbToHex(color[0], color[1], color[2])); | ||||||
|             { |             var new_color =  Helper.rgbToHex(color[0], color[1], color[2]); | ||||||
|  |             new_color = Helper.hexToComplimentary(new_color); | ||||||
|                 var colorThief = new ColorThief(); |             new_color = Helper.hexToRgb(new_color); | ||||||
|                 var color      = colorThief.getColor(img); |             new_color = Helper.rgbToHsl([new_color.r, new_color.g, new_color.b], true); | ||||||
|  |             $("#controls").css("background", new_color); | ||||||
|                 if(window.location.pathname != "/") { |  | ||||||
|                     document.getElementById("main-container").style.backgroundColor = Helper.rgbToHsl(color,true); |  | ||||||
|                     $("meta[name=theme-color]").attr("content", Helper.rgbToHex(color[0], color[1], color[2])); |  | ||||||
|                     var new_color =  Helper.rgbToHex(color[0], color[1], color[2]); |  | ||||||
|                     new_color = Helper.hexToComplimentary(new_color); |  | ||||||
|                     new_color = Helper.hexToRgb(new_color); |  | ||||||
|                     new_color = Helper.rgbToHsl([new_color.r, new_color.g, new_color.b], true); |  | ||||||
|                     $("#controls").css("background", new_color); |  | ||||||
|                 } |  | ||||||
|             }; |  | ||||||
|  |  | ||||||
|             img.crossOrigin = 'Anonymous'; |  | ||||||
|             img.src         = 'https://zoff.me:8081/https://img.youtube.com/vi/'+id+'/mqdefault.jpg'; |  | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user