You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
846 B
JavaScript
33 lines
846 B
JavaScript
"use strict";
|
|
|
|
const Promise = require("bluebird");
|
|
const createSession = require("@modular-matrix/create-session");
|
|
const sendImageEvent = require(".");
|
|
|
|
return Promise.try(() => {
|
|
return createSession("https://pixie.town/", { accessToken: require("../../../private/access-token") });
|
|
}).then((session) => {
|
|
return Promise.try(() => {
|
|
return sendImageEvent(session, {
|
|
roomID: "!TFtSgVEJlHMAhDyHOk:pixie.town",
|
|
description: "video.mp4",
|
|
video: {
|
|
url: "mxc://pixie.town/nOXbufEBytEHyTFPydqLBbsW",
|
|
displayWidth: 176,
|
|
displayHeight: 234,
|
|
mimetype: "video/mp4",
|
|
filesize: 81770
|
|
},
|
|
thumbnail: {
|
|
url: "mxc://pixie.town/ZgoXjZXGehIIVhoyrlwOyEnH",
|
|
displayWidth: 176,
|
|
displayHeight: 234,
|
|
mimetype: "image/jpeg",
|
|
filesize: 113924
|
|
},
|
|
});
|
|
}).then((result) => {
|
|
console.log(result);
|
|
});
|
|
});
|