-
Notifications
You must be signed in to change notification settings - Fork 477
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
Make server side network adaptation the default when creating VideoPriorityBasedPolicy
#2889
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,7 +130,8 @@ export default class VideoTileCollection implements AudioVideoObserver { | |
constructor(private videoTileController: VideoTileControllerFacade, | ||
private logger: Logger, | ||
private remoteVideoManager: RemoteVideoManager, | ||
private pageSize: number) { | ||
private pageSize: number, | ||
private localAttendeeId: string) { | ||
this.setupVideoTiles(); | ||
|
||
if (!this.remoteVideoManager.supportsRemoteVideoPreferences()) { | ||
|
@@ -162,7 +163,7 @@ export default class VideoTileCollection implements AudioVideoObserver { | |
} | ||
|
||
videoTileDidUpdate(tileState: VideoTileState): void { | ||
console.log(`video tile updated: ${JSON.stringify(tileState, null, ' ')}`); | ||
this.logger.info(`video tile updated: ${JSON.stringify(tileState, null, ' ')}`); | ||
if (!tileState.boundAttendeeId) { | ||
return; | ||
} | ||
|
@@ -209,22 +210,20 @@ export default class VideoTileCollection implements AudioVideoObserver { | |
} | ||
demoVideoTile.attendeeId = tileState.boundAttendeeId; | ||
|
||
// We need to add local video or content to pagination from tile updates | ||
const shouldUpdatePagination = tileState.localTile || (tileState.isContent && tileState.boundAttendeeId.startsWith(this.localAttendeeId)); | ||
if (tileState.boundVideoStream) { | ||
demoVideoTile.show(tileState.isContent); | ||
|
||
if (tileState.localTile) { | ||
if (shouldUpdatePagination) { | ||
this.pagination.add(tileState.boundAttendeeId); | ||
this.updatePaginatedVisibleTiles(); | ||
} | ||
} else { | ||
// Hide non-active tiles that aren't just paused | ||
demoVideoTile.hide(); | ||
|
||
if (tileState.localTile) { | ||
if (shouldUpdatePagination) { | ||
this.pagination.remove(tileState.boundAttendeeId); | ||
this.updatePaginatedVisibleTiles(); | ||
} | ||
} | ||
this.updatePaginatedVisibleTiles(); | ||
this.updateLayout(); | ||
this.layoutFeaturedTile(); | ||
} | ||
|
@@ -374,6 +373,9 @@ export default class VideoTileCollection implements AudioVideoObserver { | |
for (const tile of this.videoTileController.getAllVideoTiles()) { | ||
const state = tile.state(); | ||
if (state.isContent) { | ||
if (state.boundAttendeeId.startsWith(this.localAttendeeId) && !this.pagination.currentPage().includes(state.boundAttendeeId)) { | ||
return null; | ||
} | ||
return state.tileId; | ||
} | ||
} | ||
|
@@ -452,10 +454,10 @@ export default class VideoTileCollection implements AudioVideoObserver { | |
// We need to manually control visibility of paused tiles anyways so we just do | ||
// everything here, even though the preference manager adding/removing will | ||
// result in tile callbacks as well. | ||
for (let [index, videoTile] of this.tileIndexToDemoVideoTile.entries()) { | ||
for (let videoTile of this.tileIndexToDemoVideoTile.values()) { | ||
if (attendeesToShow.includes(videoTile.attendeeId)) { | ||
videoTile.show(false); | ||
} else if (this.tileIndexToTileId[index] !== this.findContentTileId()) { // Always show content | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks because of the local content that automatically makes a tile. It doesn't really need to make UX decisions like this (not like UX eng ever assisted with demo) so simpler is better IMO |
||
} else { | ||
videoTile.hide(); | ||
} | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some unrelated pagination fixes here