Skip to content

Commit

Permalink
Feature/grid mode (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
olipyskoty authored Jul 6, 2022
1 parent e66fb0e commit 6e481aa
Show file tree
Hide file tree
Showing 74 changed files with 39,704 additions and 24,488 deletions.
16 changes: 16 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
{
name: '@storybook/addon-essentials',
options: { backgrounds: false, docs: false },
},
'@storybook/preset-create-react-app',
],
framework: '@storybook/react',
webpackFinal: config => {
config.resolve.alias['twilio-video'] = require.resolve('../src/stories/mocks/twilio-video.js');
return config;
},
};
15 changes: 15 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { decorator as TwilioVideoMockDecorator } from '../src/stories/mocks/twilio-video.js';

// Add the decorator to all stories
export const decorators = [TwilioVideoMockDecorator];

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
layout: 'fullscreen',
};
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 0.7.0 (July 6, 2022)

### New Feature

- This release adds a Gallery View feature. Gallery View is an additional layout setting which allows users to view other participants' videos in the form of a grid. Users can update the max number of participants per page via the Audio and Video Settings > Gallery View. Users can also switch to Speaker View (the app's original layout) by accessing the More menu. Please note that Gallery View will be enabled by default.

### Dependency Upgrade
- `twilio-video` has been upgraded from 2.21.2 to 2.22.0.

### Bugfixes

- Fixes an issue where the `<AudioLevelIndicator />` could cause a memory leak after it is mounted/unmounted many times. [#703](https://github.com/twilio/twilio-video-app-react/pull/703)
- Provides a workaround for a bug introduced in Chrome 103, where calling `.stop()` on a cloned `MediaStreamTrack` could cause a loss of audio in the app. [#713](https://github.com/twilio/twilio-video-app-react/pull/713)
- Removes the `frame rate` and `resolution` constraints when requesting a screen share track which should allow for higher quality screen share tracks to be published. [#715](https://github.com/twilio/twilio-video-app-react/pull/715)

## 0.6.5 (June 3, 2022)

### Dependency Upgrade
Expand Down
2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
runtime: nodejs12
runtime: nodejs16

entrypoint: npm run server

Expand Down
9 changes: 8 additions & 1 deletion cypress/integration/twilio-video.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ const getRoomName = () =>
context('A video app user', () => {
describe('before entering a room', () => {
it('should see their audio level indicator moving in the media device panel', () => {
cy.visit('/');
// These tests were written before Gallery View was implemented. This app now activates
// Gallery View by default, so here we activate Speaker View before visiting the app so
// that the tests can pass.
cy.visit('/', {
onBeforeLoad: window => {
window.localStorage.setItem('gallery-view-active-key', false);
},
});

cy.get('#input-user-name').type('testuser');
cy.get('#input-room-name').type(getRoomName());
Expand Down
8 changes: 8 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ module.exports = (on, config) => {
args,
});
const page = (participants[name] = await browser.newPage()); // keep track of this participant for future use

// These tests were written before Gallery View was implemented. This app now activates
// Gallery View by default, so here we activate Speaker View before visiting the app so
// that the tests can pass.
await page.evaluateOnNewDocument(() => {
localStorage.clear();
localStorage.setItem('gallery-view-active-key', false);
});
await page.goto(config.baseUrl);
await page.type('#input-user-name', name);
await page.type('#input-room-name', roomName);
Expand Down
9 changes: 8 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import detectSound from './detectSound';

Cypress.Commands.add('joinRoom', (username, roomname) => {
cy.visit('/');
// These tests were written before Gallery View was implemented. This app now activates
// Gallery View by default, so here we activate Speaker View before visiting the app so
// that the tests can pass.
cy.visit('/', {
onBeforeLoad: window => {
window.localStorage.setItem('gallery-view-active-key', false);
},
});
cy.get('#input-user-name').type(username);
cy.get('#input-room-name').type(roomname);
cy.get('[type="submit"]').click();
Expand Down
Loading

0 comments on commit 6e481aa

Please sign in to comment.