aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/platform.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/platform.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/platform.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/platform.js b/packages/meshbay-hub/src/meshbay_hub/static/platform.js
index 0174edc..3a0c628 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/platform.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/platform.js
@@ -460,6 +460,15 @@ export const cast = {
if (!bridge || !bridge.cast || !bridge.cast.subtitle) return null;
return bridge.cast.subtitle(sub);
},
+ // A photo for the receiver: `{ bytes, type }`, already scaled to the
+ // television. Absent from an older shell, so callers check `canShowImages`.
+ get canShowImages() {
+ return Boolean(bridge && bridge.cast && bridge.cast.image);
+ },
+ async image(img) {
+ if (!this.canShowImages) return null;
+ return bridge.cast.image(img);
+ },
async finish() {
if (!bridge || !bridge.cast) return false;
return bridge.cast.finish();