Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 #1

Merged
merged 26 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e0a2a2b
added nsis build config
unknownskl Jul 24, 2021
2ccbb97
Publish linux deb
unknownskl Jul 24, 2021
8826ed6
Add auto-updater
unknownskl Jul 24, 2021
beb066a
Bump version
unknownskl Jul 24, 2021
9aeae69
Bump version
unknownskl Jul 24, 2021
c0481dc
Revert "Add auto-updater"
unknownskl Jul 24, 2021
d01b670
Added friendslist
unknownskl Jul 24, 2021
07476e3
Added audio latency counters too debug
unknownskl Jul 24, 2021
eacbadc
Add input latency counter to debug view
unknownskl Jul 24, 2021
68e388d
Improved audio timings
unknownskl Jul 24, 2021
05de80b
Improve audio by flushing the buffer and resetting the timers every 6…
unknownskl Jul 24, 2021
9917009
Added network quality indicator
unknownskl Jul 24, 2021
4cd08f7
Added some animations to the ui
unknownskl Jul 24, 2021
bcb7b5d
Moved video processing to its own worker thread
unknownskl Jul 26, 2021
a20da7c
Optimise audio a bit more
unknownskl Jul 27, 2021
446c9ed
fix typescript validation
unknownskl Jul 27, 2021
331c53f
Revert audio channel changes as it was not an improvement
unknownskl Jul 27, 2021
69fd4b4
Move audio decoding to a web worker for better performance
unknownskl Jul 28, 2021
c9052bd
Cleanup old libopus libs
unknownskl Jul 28, 2021
204b0f3
Improved audio stability (Audio reset every 2 seconds)
unknownskl Jul 28, 2021
de181a8
Hugely improve performance for controller input
unknownskl Jul 28, 2021
12121eb
Again change some audio parameters for smoother playback
unknownskl Jul 28, 2021
f948971
Add readme and changelog
unknownskl Jul 30, 2021
65097eb
Add build badge to readme
unknownskl Jul 30, 2021
d11c562
Add known issues
unknownskl Jul 30, 2021
2c1eefe
Prepare for release
unknownskl Jul 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added friendslist
  • Loading branch information
unknownskl committed Jul 24, 2021
commit d01b670bacec5ee719fcc51cf54b5dbaafc3b0dd
87 changes: 82 additions & 5 deletions src/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,83 @@ body {
background-size: cover;
}

#appView #appContent {
padding-top: 70px;
}

#appView #appContent #consolesList {
width: 70%;
position: absolute;
top: 70px;
left: 0px;
}

#appView #appContent #friendsList {
width: 30%;
backdrop-filter: blur(20px);

background: rgba(0, 0, 0, 0.55);
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
padding-top: 70px;
max-width: 400px;
overflow-y: auto;
}

#appView #appContent #friendsList p.center {
color: #ffffff;
padding: 20px;
text-align: center;
}

#appView #appContent #friendsList .lds-ring {
margin: 20px auto;
}

#appView #friendsList ul.people {
padding-top: 10px;
}

#appView #friendsList ul.people li {
display: block;
height: 55px;
padding-top: 15px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#appView #friendsList ul.people li.offline {
opacity: 0.3;
}
#appView #friendsList ul.people li.offline:hover {
opacity: 0.7;
}

#appView #friendsList ul.people li .userimage {
display: block;
width: 40px;
height: 40px;
border-radius: 20px;
float: left;
margin-left: 20px;
margin-right: 20px;
}

#appView #friendsList ul.people div.userinfo p {
color: #ffffff;
font-size: 14px;
padding-bottom: 5px;
}

#appView #friendsList ul.people div.userinfo p.userstatus {
font-size: 12px;
opacity: 0.7;
}


/* Actionbar */

#actionBar {
backdrop-filter: blur(20px);

Expand Down Expand Up @@ -184,11 +261,11 @@ body {
color: #ffffff;
text-decoration: none;
padding: 10px;
opacity: 0.5;
opacity: 0.7;
}

#actionBar ul li a:hover {
opacity: 0.75;
opacity: 1;
}


Expand All @@ -203,9 +280,9 @@ body {
font-weight: bold;
}

#actionBar ul.userProfile li {
opacity: 0.5;
}
/* #actionBar ul.userProfile li {
opacity: 0.7;
} */

#actionBar ul.userProfile li span#actionBarUserGamerscore {
color: #ffffff;
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/apiclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ export default class apiClient {
getProfile() {
return this.get('https://profile.xboxlive.com/users/me/profile/settings?settings=GameDisplayName,GameDisplayPicRaw,Gamerscore,Gamertag')
}

getFriends() {
return this.get('https://peoplehub.xboxlive.com/users/me/people/social/decoration/preferredcolor,detail,multiplayersummary,presencedetail')
}
}
6 changes: 3 additions & 3 deletions src/frontend/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default class Application {
if(event.view === 'auth'){
const backgrounds = [
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_1.jpg\')',
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_2.jpg\')',
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_3.jpg\')',
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_4.jpg\')',
// 'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_2.jpg\')',
// 'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_3.jpg\')',
// 'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_4.jpg\')',
]

const authView = (<HTMLInputElement>document.getElementById('authView'))
Expand Down
93 changes: 90 additions & 3 deletions src/frontend/appview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class AppView {

const backgrounds = [
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_1.jpg\')',
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_2.jpg\')',
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_3.jpg\')',
'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_4.jpg\')',
// 'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_2.jpg\')',
// 'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_3.jpg\')',
// 'linear-gradient(0deg, rgba(26,27,30,1) 0%, rgba(26,27,30,1) 50%, rgba(0,212,255,0) 100%), url(\'assets/images/background_4.jpg\')',
]

const appView = (<HTMLInputElement>document.getElementById('appView'))
Expand Down Expand Up @@ -97,6 +97,93 @@ export default class AppView {
console.log('error:', error)
})

// Load friends

this._apiClient = new apiClient(this._application._tokenStore._web.uhs, this._application._tokenStore._web.userToken)
this._apiClient.getFriends().then((profiles:any) => {
console.log('Loaded friends:', profiles.people)
console.log('User has '+profiles.people.length+' friends')

const friendsList = (<HTMLInputElement>document.getElementById('friendsList'))
let friendsHtml = '<ul class="people">'

// Query for online peopple
for(const person in profiles.people){
if(profiles.people[person].presenceState === 'Online'){
friendsHtml += '<li class="online">'
friendsHtml += ' <img class="userimage" src="'+profiles.people[person].displayPicRaw+'" />'
friendsHtml += ' <div class="userinfo">'
friendsHtml += ' <p>'+profiles.people[person].displayName+'</p>'

friendsHtml += ' <p class="userstatus">'+profiles.people[person].presenceText+'</p>'

friendsHtml += ' </div>'
friendsHtml += '</li>'
}
}

// Query for offline people
for(const person in profiles.people){
if(profiles.people[person].presenceState === 'Offline'){
friendsHtml += '<li class="offline">'
friendsHtml += ' <img class="userimage" src="'+profiles.people[person].displayPicRaw+'" />'
friendsHtml += ' <div class="userinfo">'
friendsHtml += ' <p>'+profiles.people[person].displayName+'</p>'

if(profiles.people[person].presenceText === profiles.people[person].presenceState)
friendsHtml += ' <p>'+profiles.people[person].presenceState+'</p>'
else
friendsHtml += ' <p class="userstatus">'+profiles.people[person].presenceState+' - '+profiles.people[person].presenceText+'</p>'

friendsHtml += ' </div>'
friendsHtml += '</li>'
}
}
friendsHtml += '</ul>'

friendsList.innerHTML = friendsHtml

document.querySelectorAll('img.userimage').forEach(function(img){
img = (<HTMLElement>img)
console.log(img)
// img.onerror = function(){
// this.style.display='none';
// };
})

// if(profile.profileUsers[0] !== undefined){

// const userProfileName = (<HTMLInputElement>document.getElementById('actionBarUserProfile'))
// const userProfileLogo = (<HTMLInputElement>document.getElementById('userProfileLogo'))
// const userProfileGamerscore = (<HTMLInputElement>document.getElementById('actionBarUserGamerscore'))


// const settings = profile.profileUsers[0].settings
// for(const setting in settings){

// switch(settings[setting].id){
// case 'GameDisplayName':
// // console.log('game name:', settings[setting].value)
// userProfileName.innerText = settings[setting].value
// break;
// case 'GameDisplayPicRaw':
// userProfileLogo.src = settings[setting].value
// break;
// case 'Gamerscore':
// userProfileGamerscore.innerText = settings[setting].value
// break;
// case 'GamerTag':
// console.log('game name:', settings[setting].value)
// break;
// }
// }

// // @TODO: Show user menu
// }
}).catch((error) => {
console.log('error:', error)
})

// Load user profile
// this._apiClient.isAuthenticated().then(() => {
// console.log('User is authenticated.')
Expand Down
8 changes: 6 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ <h1>Login to Xbox</h1>
<div id="appView" style="display:none;">

<div id="appContent">
<h1>Application View</h1>

<div id="consolesList">

<div class="consoleItem">
Expand All @@ -119,6 +117,12 @@ <h1>Application View</h1>
</div>

</div>

<div id="friendsList">
<center>
<div class="lds-ring"><div></div><div></div><div></div><div></div></div><br />
</center>
</div>
</div>
</div>

Expand Down