Skip to content

Commit 6e481aa

Browse files
authored
Feature/grid mode (#720)
1 parent e66fb0e commit 6e481aa

File tree

74 files changed

+39704
-24488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+39704
-24488
lines changed

.storybook/main.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
addons: [
4+
'@storybook/addon-links',
5+
{
6+
name: '@storybook/addon-essentials',
7+
options: { backgrounds: false, docs: false },
8+
},
9+
'@storybook/preset-create-react-app',
10+
],
11+
framework: '@storybook/react',
12+
webpackFinal: config => {
13+
config.resolve.alias['twilio-video'] = require.resolve('../src/stories/mocks/twilio-video.js');
14+
return config;
15+
},
16+
};

.storybook/preview.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { decorator as TwilioVideoMockDecorator } from '../src/stories/mocks/twilio-video.js';
2+
3+
// Add the decorator to all stories
4+
export const decorators = [TwilioVideoMockDecorator];
5+
6+
export const parameters = {
7+
actions: { argTypesRegex: '^on[A-Z].*' },
8+
controls: {
9+
matchers: {
10+
color: /(background|color)$/i,
11+
date: /Date$/,
12+
},
13+
},
14+
layout: 'fullscreen',
15+
};

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 0.7.0 (July 6, 2022)
2+
3+
### New Feature
4+
5+
- 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.
6+
7+
### Dependency Upgrade
8+
- `twilio-video` has been upgraded from 2.21.2 to 2.22.0.
9+
10+
### Bugfixes
11+
12+
- 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)
13+
- 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)
14+
- 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)
15+
116
## 0.6.5 (June 3, 2022)
217

318
### Dependency Upgrade

app.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
runtime: nodejs12
1+
runtime: nodejs16
22

33
entrypoint: npm run server
44

cypress/integration/twilio-video.spec.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ const getRoomName = () =>
1111
context('A video app user', () => {
1212
describe('before entering a room', () => {
1313
it('should see their audio level indicator moving in the media device panel', () => {
14-
cy.visit('/');
14+
// These tests were written before Gallery View was implemented. This app now activates
15+
// Gallery View by default, so here we activate Speaker View before visiting the app so
16+
// that the tests can pass.
17+
cy.visit('/', {
18+
onBeforeLoad: window => {
19+
window.localStorage.setItem('gallery-view-active-key', false);
20+
},
21+
});
1522

1623
cy.get('#input-user-name').type('testuser');
1724
cy.get('#input-room-name').type(getRoomName());

cypress/plugins/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ module.exports = (on, config) => {
1919
args,
2020
});
2121
const page = (participants[name] = await browser.newPage()); // keep track of this participant for future use
22+
23+
// These tests were written before Gallery View was implemented. This app now activates
24+
// Gallery View by default, so here we activate Speaker View before visiting the app so
25+
// that the tests can pass.
26+
await page.evaluateOnNewDocument(() => {
27+
localStorage.clear();
28+
localStorage.setItem('gallery-view-active-key', false);
29+
});
2230
await page.goto(config.baseUrl);
2331
await page.type('#input-user-name', name);
2432
await page.type('#input-room-name', roomName);

cypress/support/commands.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import detectSound from './detectSound';
22

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

0 commit comments

Comments
 (0)