Skip to content

Apply width, height, left, and top params to newStream#28

Open
ianjennings wants to merge 1 commit intomuaz-khan:masterfrom
ianjennings:patch-1
Open

Apply width, height, left, and top params to newStream#28
ianjennings wants to merge 1 commit intomuaz-khan:masterfrom
ianjennings:patch-1

Conversation

@ianjennings
Copy link

The code from examples here don't work properly as the positional properties don't carry to newStream on creation.

screenStream.fullcanvas = true;
screenStream.width = screen.width; // or 3840
screenStream.height = screen.height; // or 2160 

cameraStream.width = parseInt((20 / 100) * screenStream.width);
cameraStream.height = parseInt((20 / 100) * screenStream.height);
cameraStream.top = screenStream.height - cameraStream.height;
cameraStream.left = screenStream.width - cameraStream.width;

This pull ensures the positional properties of the given stram map to the newStream.

The code from examples here don't work properly as the positional properties don't carry to `newStream` on creation.

```js
screenStream.fullcanvas = true;
screenStream.width = screen.width; // or 3840
screenStream.height = screen.height; // or 2160 

cameraStream.width = parseInt((20 / 100) * screenStream.width);
cameraStream.height = parseInt((20 / 100) * screenStream.height);
cameraStream.top = screenStream.height - cameraStream.height;
cameraStream.left = screenStream.width - cameraStream.width;
```
This pull ensures the positional properties of the given stram map to the `newStream`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant