Skip to content

Commit

Permalink
ready for v1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlobu committed Feb 23, 2021
1 parent b3dc152 commit 671763b
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 127 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 1.0.8 (23 Feb 2021)

Changes:

- added locales for Traditional Chinese language, special thanks to @taotieren
- minor UI improvements

<br/>
<br/>

# 1.0.7 (21 Feb 2021)

Changes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ exports[`should match exact snapshot 1`] = `
style={
Object {
"transform": "translateY(2px) translateX(-5px)",
"width": "max-content",
}
}
>
Expand All @@ -137,27 +138,6 @@ exports[`should match exact snapshot 1`] = `
</span>
</span>
</div>
<div
className="col-xs-12 col-md-1"
>
<div
className="row center-xs"
style={
Object {
"height": "42px",
}
}
>
<div
className=""
>
FPS: 
</div>
<p
id="fps-show"
/>
</div>
</div>
<div
className="col-xs-12 col-md-5"
>
Expand Down Expand Up @@ -237,7 +217,7 @@ exports[`should match exact snapshot 1`] = `
className="col-xs"
>
<div
className="bp3-text-large"
className="bp3-text-large play-pause-text"
>
Pause
</div>
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/components/PlayerControlPanel/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.play-pause-text {
width: max-content;
}
29 changes: 18 additions & 11 deletions app/client/src/components/PlayerControlPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import handlePlayerToggleFullscreen from './handlePlayerToggleFullscreen';
import initScreenfullOnChange from './initScreenfullOnChange';
import ScreenSharingSource from '../../features/PeerConnection/ScreenSharingSourceEnum';
import { REACT_PLAYER_WRAPPER_ID } from '../../constants/appConstants';
import './index.css'


const videoQualityButtonStyle: React.CSSProperties = {
width: '100%',
Expand Down Expand Up @@ -152,7 +154,10 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
</Col>
<Col xs>
<div
style={{ transform: 'translateY(2px) translateX(-5px)' }}
style={{
transform: 'translateY(2px) translateX(-5px)',
width: 'max-content',
}}
>
<Text>{t('Donate')}</Text>
</div>
Expand All @@ -161,12 +166,6 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
</Button>
</Tooltip>
</Col>
<Col xs={12} md={1}>
<Row center="xs" style={{ height: '42px' }}>
<Text>FPS:&nbsp;</Text>
<p id="fps-show"></p>
</Row>
</Col>
<Col xs={12} md={5}>
<Row center="xs" style={{ height: '42px' }}>
<Row
Expand Down Expand Up @@ -206,7 +205,8 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
/>
</Col>
<Col xs>
<Text className="bp3-text-large">
{ /* @ts-ignore */ }
<Text className="bp3-text-large play-pause-text">
{isPlaying ? t('Pause') : t('Play')}
</Text>
</Col>
Expand Down Expand Up @@ -252,7 +252,9 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
toaster?.show({
icon: 'clean',
intent: Intent.PRIMARY,
message: `${t('Video quality has been changed to')} ${q}`,
message: `${t(
'Video quality has been changed to'
)} ${q}`,
});
}}
>
Expand All @@ -266,7 +268,10 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
position={Position.BOTTOM}
popoverClassName={Classes.POPOVER_CONTENT_SIZING}
>
<Tooltip content={t('Click to Open Video Settings')} position={Position.BOTTOM}>
<Tooltip
content={t('Click to Open Video Settings')}
position={Position.BOTTOM}
>
<Button minimal>
<Icon icon="cog" color="white" />
</Button>
Expand Down Expand Up @@ -321,7 +326,9 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
icon: 'video',
intent: Intent.PRIMARY,
message: `${
isDefaultPlayerTurnedOn ? t('Default video player has been turned OFF') : t('Default video player has been turned ON')
isDefaultPlayerTurnedOn
? t('Default video player has been turned OFF')
: t('Default video player has been turned ON')
}`,
});
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ exports[`should match exact snapshot 1`] = `
style={
Object {
"transform": "translateY(2px) translateX(-5px)",
"width": "max-content",
}
}
>
Expand All @@ -149,27 +150,6 @@ exports[`should match exact snapshot 1`] = `
</span>
</span>
</div>
<div
className="col-xs-12 col-md-1"
>
<div
className="row center-xs"
style={
Object {
"height": "42px",
}
}
>
<div
className=""
>
FPS: 
</div>
<p
id="fps-show"
/>
</div>
</div>
<div
className="col-xs-12 col-md-5"
>
Expand Down Expand Up @@ -249,7 +229,7 @@ exports[`should match exact snapshot 1`] = `
className="col-xs"
>
<div
className="bp3-text-large"
className="bp3-text-large play-pause-text"
>
Play
</div>
Expand Down
68 changes: 0 additions & 68 deletions app/client/src/features/PeerConnection/peerConnectionHandlePeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,63 +14,6 @@ export function getSharingShourceType(peerConnection: PeerConnection) {
}
}

let lastFramesReceived = 0;
let lastCalculatedFPS = 0;
let lastCalculatedFPSTimestamp = 0;

function dumpStatsFramesPerSecondOnly(results: any) {
// framesReceived
let isFremsPerSecondSet;
// let statsString = '';

results.forEach((res: any) => {
// statsString += '<h3>Report type=';
// statsString += res.type;
// statsString += '</h3>\n';
// statsString += `id ${res.id}<br>`;
// statsString += `time ${res.timestamp}<br>`;
Object.keys(res).forEach(k => {
if (k.includes('framesPerSecond') && k !== 'timestamp' && k !== 'type' && k !== 'id') {
// statsString += `${k}: ${res[k]}<br>`;
const fpsElement = document.getElementById('fps-show');
if (fpsElement) {
fpsElement.innerHTML = res[k];
}
isFremsPerSecondSet = true;
}

if (k.includes('framesReceived') && k !== 'timestamp' && k !== 'type' && k !== 'id') {
const currentTime = new Date().getTime();
const currentFramesReceived = parseInt(res[k], 10);

if (lastFramesReceived === 0) {
lastFramesReceived = currentFramesReceived;
lastCalculatedFPSTimestamp = currentTime;
return;
}
const framesDifference = currentFramesReceived - lastFramesReceived;
console.log('framesDifference', framesDifference);

const timeDifference = currentTime - lastCalculatedFPSTimestamp;
console.log('timeDifference', timeDifference);
const howManyTimesTimeDifferenceIsMorThanOneSecond = timeDifference / 1000;
console.log('howManyTimesTimeDifferenceIsMorThanOneSecond', howManyTimesTimeDifferenceIsMorThanOneSecond);

lastCalculatedFPS = Math.floor(framesDifference / howManyTimesTimeDifferenceIsMorThanOneSecond);
lastFramesReceived = currentFramesReceived;
lastCalculatedFPSTimestamp = currentTime;
}
});
});
if (!isFremsPerSecondSet) {
const fpsElement = document.getElementById('fps-show');
if (fpsElement) {
fpsElement.innerHTML = `~${lastCalculatedFPS}`;
}
}
// return statsString;
}

export default (peerConnection: PeerConnection) => {
if (peerConnection.peer === null) {
throw new PeerConnectionPeerIsNullError();
Expand Down Expand Up @@ -100,17 +43,6 @@ export default (peerConnection: PeerConnection) => {
});
}, 1000);

setInterval(() => {
// console.log('peerConnection framerate', peerConnection.peer);
// @ts-ignore
if (peerConnection.peer && peerConnection.peer._pc) {
// @ts-ignore
peerConnection.peer._pc.getStats(null).then((results: any) => {
dumpStatsFramesPerSecondOnly(results);
});
}
}, 2000);

peerConnection.videoAutoQualityOptimizer.startOptimizationLoop();

setTimeout(getSharingShourceType, 1000, peerConnection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export default function ChooseAppOrScreenOverlay(
onClick={handleRefreshSources}
style={{
borderRadius: '100px',
width: 'max-content',
}}
>
{t('Refresh')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ exports[`should match exact snapshot 1`] = `
style={
Object {
"borderRadius": "100px",
"width": "max-content",
}
}
>
Expand All @@ -562,6 +563,7 @@ exports[`should match exact snapshot 1`] = `
style={
Object {
"borderRadius": "100px",
"width": "max-content",
}
}
type="button"
Expand Down
7 changes: 6 additions & 1 deletion app/components/TopPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ export default function TopPanel(props: any) {
/>
</Col>
<Col xs>
<div style={{ transform: 'translateY(2px) translateX(-5px)' }}>
<div
style={{
transform: 'translateY(2px) translateX(-5px)',
width: 'max-content',
}}
>
<Text>{t('Donate')}</Text>
</div>
</Col>
Expand Down
1 change: 1 addition & 0 deletions app/components/__snapshots__/TopPanel.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports[`<TopPanel /> should match exact snapshot 1`] = `
style={
Object {
"transform": "translateY(2px) translateX(-5px)",
"width": "max-content",
}
}
>
Expand Down
1 change: 1 addition & 0 deletions app/containers/__snapshots__/HomePage.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ exports[`should match exact snapshot 1`] = `
style={
Object {
"transform": "translateY(2px) translateX(-5px)",
"width": "max-content",
}
}
>
Expand Down
2 changes: 1 addition & 1 deletion app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "deskreen",
"productName": "Deskreen",
"version": "1.0.7",
"version": "1.0.8",
"description": "Deskreen turns any device into a secondary screen for your computer",
"main": "./main.prod.js",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "deskreen",
"productName": "Deskreen",
"version": "1.0.7",
"version": "1.0.8",
"description": "Deskreen turns any device into a secondary screen for your computer",
"scripts": {
"build": "yarn build-client && yarn build-main && yarn build-renderer",
Expand Down

0 comments on commit 671763b

Please sign in to comment.