Update videoSyncServerScript.js
Adding automatically scaling entity to handle aspect ratio of video playing.
This commit is contained in:
parent
db5730c8a8
commit
d467a54c6c
@ -156,6 +156,12 @@
|
|||||||
if (useGatewayServer && gatewayServerConnected) {
|
if (useGatewayServer && gatewayServerConnected) {
|
||||||
ws.send(JSON.stringify(wsNow));
|
ws.send(JSON.stringify(wsNow));
|
||||||
}
|
}
|
||||||
|
console.log(JSON.stringify(messageData));
|
||||||
|
var entity = Entities.getEntityProperties(videoPlayerChannel);
|
||||||
|
entity.dimensions.y = (entity.dimensions.x / messageData.aspectRatio) + .1
|
||||||
|
Entities.editEntity(videoPlayerChannel, {
|
||||||
|
dimensions: entity.dimensions
|
||||||
|
});
|
||||||
} else if (messageData.action == "play") {
|
} else if (messageData.action == "play") {
|
||||||
timeStamp = messageData.timeStamp;
|
timeStamp = messageData.timeStamp;
|
||||||
if (intervalIsRunning) {
|
if (intervalIsRunning) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user