Skip to content

Commit

Permalink
fix(package): update node-ssdp to version 3.2.4
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
greenkeeper[bot] committed Sep 26, 2017
1 parent 905aa27 commit 88fe425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"castv2-client": "^1.1.0",
"debug": "^2.2.0",
"node-ssdp": "^2.4.0"
"node-ssdp": "^3.2.4"
},
"readme": "chromecast-js\n=================\n\nchromecast-js is a javascript client library for googlecast's remote playback protocol that uses DefaultMediaReceiver to play any (compatible) content in the Chromecast, it works by wrapping the [node-castv2-client](https://github.com/thibauts/node-castv2-client) module.\n\n## Installation\n\nFrom npm:\n\n\tnpm install chromecast-js \n\n## Usage\n\n``` javascript\nchromecastjs = require('chromecast-js');\n\nvar browser = new chromecastjs.Browser();\n\nbrowser.on('deviceOn', function(device) {\n\tdevice.connect();\n\tdevice.on('connected', function() {\n\n\t\tdevice.play('http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4', 60, function() {\n\t\t\tconsole.log('Playing big_buck_bunny on your chromecast!')\n\t\t});\n\n\t\tsetTimeout(function() {\n\t\t\tdevice.pause(function() {\n\t\t\t\tconsole.log('Paused!');\n\t\t\t});\n\t\t}, 30000);\n\n\t\tsetTimeout(function() {\n\t\t\tdevice.stop(function() {\n\t\t\t\tconsole.log('Stoped!');\n\t\t\t});\n\t\t}, 40000);\n\n\t});\n});\n\n```\n\n## Subtitles and Cover\n\nTo include subtitles and a cover image with the media title, use an Object instead of a string in the *play method*:\n\n``` javascript\n\nchromecastjs = require('../');\n\nvar browser = new chromecastjs.Browser();\n\nvar media = {\n\turl : 'http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4',\n\tsubtitles: [\n\t\t{\n\t\t\tlanguage: 'en-US',\n\t\t\turl: 'http://carlosguerrero.com/captions_styled.vtt',\n\t\t\tname: 'English'\n\t\t},\n\t\t{\n\t\t\tlanguage: 'es-ES',\n\t\t\turl: 'http://carlosguerrero.com/captions_styled_es.vtt',\n\t\t\tname: 'Spanish'\n\t\t}\n\t],\n\tcover: {\n\t\ttitle: 'Big Bug Bunny',\n\t\turl: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg'\n\t},\n\tsubtitles_style: { \n\t\tbackgroundColor: '#FFFFFFFF', // see http://dev.w3.org/csswg/css-color/#hex-notation\n\t\tforegroundColor: '#000FFFF', // see http://dev.w3.org/csswg/css-color/#hex-notation\n\t\tedgeType: 'DROP_SHADOW', // can be: \"NONE\", \"OUTLINE\", \"DROP_SHADOW\", \"RAISED\", \"DEPRESSED\"\n\t\tedgeColor: '#AA00FFFF', // see http://dev.w3.org/csswg/css-color/#hex-notation\n\t\tfontScale: 1.5, // transforms into \"font-size: \" + (fontScale*100) +\"%\"\n\t\tfontStyle: 'BOLD_ITALIC', // can be: \"NORMAL\", \"BOLD\", \"BOLD_ITALIC\", \"ITALIC\",\n\t\tfontFamily: 'Droid Sans',\n\t\tfontGenericFamily: 'CURSIVE', // can be: \"SANS_SERIF\", \"MONOSPACED_SANS_SERIF\", \"SERIF\", \"MONOSPACED_SERIF\", \"CASUAL\", \"CURSIVE\", \"SMALL_CAPITALS\",\n\t\twindowColor: '#AA00FFFF', // see http://dev.w3.org/csswg/css-color/#hex-notation\n\t\twindowRoundedCornerRadius: 10, // radius in px\n\t\twindowType: 'ROUNDED_CORNERS' // can be: \"NONE\", \"NORMAL\", \"ROUNDED_CORNERS\"\n\t}\n};\n\n\nbrowser.on('deviceOn', function(device) {\n\tdevice.connect();\n\tdevice.on('connected', function() {\n\n\t\t// Starting to play Big Buck Bunny (made in Blender) exactly in the first minute without subtitles or cover.\n\t\t//device.play('http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4', 60, function(){\n\t\t// console.log('Playing in your chromecast!')\n\t\t//});\n\n\t\t// Starting to play Big Buck Bunny (made in Blender) exactly in the first minute with example subtitles and cover.\n\t\tdevice.play(media, 0, function(){\n\t\t\tconsole.log('Playing in your chromecast!')\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log('subtitles off!')\n\t\t\t\tdevice.subtitlesOff(function(err,status){\n\t\t\t\t\tif(err) console.log(\"error setting subtitles off...\")\n\t\t\t\t\tconsole.log(\"subtitles removed.\")\n\t\t\t\t});\n\t\t\t}, 20000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log('subtitles on!')\n\t\t\t\tdevice.changeSubtitles(1, function(err, status){\n\t\t\t\t\tif(err) console.log(\"error restoring subtitles...\")\n\t\t\t\t\tconsole.log(\"subtitles restored.\")\n\t\t\t\t});\n\t\t\t}, 25000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log('subtitles on!')\n\t\t\t\tdevice.changeSubtitles(1, function(err, status){\n\t\t\t\t\tif(err) console.log(\"error restoring subtitles...\")\n\t\t\t\t\tconsole.log(\"subtitles restored.\")\n\t\t\t\t});\n\t\t\t}, 25000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.pause(function(){\n\t\t\t\t\tconsole.log('Paused!')\n\t\t\t\t});\n\t\t\t}, 30000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.unpause(function(){\n\t\t\t\t\tconsole.log('unpaused!')\n\t\t\t\t});\n\t\t\t}, 40000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log('I ment English subtitles!')\n\t\t\t\tdevice.changeSubtitles(0, function(err, status){\n\t\t\t\t\tif(err) console.log(\"error restoring subtitles...\")\n\t\t\t\t\tconsole.log(\"English subtitles restored.\")\n\t\t\t\t});\n\t\t\t}, 45000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log('Increasing subtitles size...')\n\t\t\t\tdevice.changeSubtitlesSize(10, function(err, status){\n\t\t\t\t\tif(err) console.log(\"error increasing subtitles size...\")\n\t\t\t\t\tconsole.log(\"subtitles size increased.\")\n\t\t\t\t});\n\t\t\t}, 46000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.seek(30,function(){\n\t\t\t\t\tconsole.log('seeking forward!')\n\t\t\t\t});\n\t\t\t}, 50000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log('decreasing subtitles size...')\n\t\t\t\tdevice.changeSubtitlesSize(1, function(err, status){\n\t\t\t\t\tif(err) console.log(\"error...\")\n\t\t\t\t\tconsole.log(\"subtitles size decreased.\")\n\t\t\t\t});\n\t\t\t}, 60000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.pause(function(){\n\t\t\t\t\tconsole.log('Paused!')\n\t\t\t\t});\n\t\t\t}, 70000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.seek(30,function(){\n\t\t\t\t\tconsole.log('seeking forward!')\n\t\t\t\t});\n\t\t\t}, 80000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.seek(30,function(){\n\t\t\t\t\tconsole.log('seeking forward!')\n\t\t\t\t});\n\t\t\t}, 85000);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.unpause(function(){\n\t\t\t\t\tconsole.log('unpaused!')\n\t\t\t\t});\n\t\t\t}, 90000);\n\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.seek(-30,function(){\n\t\t\t\t\tconsole.log('seeking backwards!')\n\t\t\t\t});\n\t\t\t}, 100000);\n\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tdevice.stop(function(){\n\t\t\t\t\tconsole.log('Stoped!')\n\t\t\t\t});\n\t\t\t}, 200000);\n\t\t});\n\t});\n};\n\n```\n\n",
"readmeFilename": "README.md",
Expand Down

0 comments on commit 88fe425

Please sign in to comment.