@scrypted/chromecast
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "@scrypted/chromecast", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Send video, audio, and text to speech notifications to Chromecast and Google Home devices", | ||
@@ -31,3 +31,3 @@ "author": "Scrypted", | ||
"devDependencies": { | ||
"@scrypted/sdk": "0.0.16", | ||
"@scrypted/sdk": "0.0.24", | ||
"raw-loader": "^1.0.0", | ||
@@ -34,0 +34,0 @@ "webpack-merge": "^4.2.1" |
@@ -105,7 +105,9 @@ const fs = require('fs'); | ||
CastDevice.prototype.load = function(media, options) { | ||
const mimeType = options && options.mimeType; | ||
mediaConverter.convert(media, mimeType) | ||
.to('android.net.Uri') | ||
.setCallback((e, result) => { | ||
this.sendMedia(options && options.title, result.toString(), mimeType, options); | ||
// the mediaManager is provided by Scrypted and can be used to convert | ||
// MediaObjects into other objects. | ||
// For example, a MediaObject from a RTSP camera can be converted to an externally | ||
// accessible Uri png image using mediaManager.convert. | ||
mediaManager.convertMediaObjectToUri(media) | ||
.then(result => { | ||
this.sendMedia(options && options.title, result, media.mimeType, options); | ||
}); | ||
@@ -161,7 +163,2 @@ } | ||
if (!media || this.device.type == 'Speaker') { | ||
// the mediaConvert variable is provided by Scrypted and can be used to convert | ||
// MediaObjects into other objects. | ||
// For example, a MediaObject from a RTSP camera can be converted to an externally | ||
// accessible Uri png image using mediaConverter.convert. | ||
memoizeAudioFetch(body) | ||
@@ -168,0 +165,0 @@ .then(result => { |
Sorry, the diff of this file is too big to display
253187
1200