Skip to content

demo: for meeting #1298

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

Merged
merged 7 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
yarn dist:win --${{ matrix.arch }}
working-directory: example

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample-win-${{ matrix.arch }}
path: |
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
yarn dist:mac
working-directory: example

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample-mac-${{ matrix.arch }}
path: |
Expand Down
28 changes: 24 additions & 4 deletions example/src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const { Content, Footer, Sider } = Layout;
class App extends Component {
state = {
version: { version: undefined, build: undefined },
collapsed: false,
showFooter: true,
};

componentDidMount() {
Expand All @@ -38,6 +40,12 @@ class App extends Component {
<Router>
<Layout hasSider style={{ height: '100vh' }}>
<Sider
collapsible
onCollapse={(e) =>
this.setState({
collapsed: e,
})
}
style={{
overflow: 'auto',
height: '100vh',
Expand Down Expand Up @@ -81,7 +89,10 @@ class App extends Component {
})()}
></Menu>
</Sider>
<Layout className="site-layout" style={{ marginLeft: 200 }}>
<Layout
className="site-layout"
style={{ marginLeft: this.state.collapsed ? 0 : 200 }}
>
<Content>
<Switch>
<Route path="/" children={<AuthInfoScreen />} exact={true} />
Expand All @@ -102,9 +113,18 @@ class App extends Component {
</Route>
</Switch>
</Content>
<Footer style={{ textAlign: 'center' }}>
{`Powered by Agora RTC SDK ${version.version} ${version.build}`}
</Footer>
{this.state.showFooter && (
<Footer
style={{ textAlign: 'center', cursor: 'pointer' }}
onClick={() => {
this.setState({
showFooter: !this.state.showFooter,
});
}}
>
{`Powered by Agora RTC SDK ${version.version} ${version.build}`}
</Footer>
)}
</Layout>
</Layout>
</Router>
Expand Down
16 changes: 15 additions & 1 deletion example/src/renderer/components/BaseComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LeftOutlined } from '@ant-design/icons';
import {
ErrorCodeType,
IRtcEngine,
Expand Down Expand Up @@ -31,6 +32,7 @@ export interface BaseComponentState {
joinChannelSuccess?: boolean;
remoteUsers?: number[];
startPreview?: boolean;
hideRightBar?: boolean;
}

export interface BaseAudioComponentState extends BaseComponentState {
Expand Down Expand Up @@ -146,7 +148,19 @@ export abstract class BaseComponent<
<AgoraView className={AgoraStyle.content}>
{users ? this.renderUsers() : undefined}
</AgoraView>
<AgoraView className={AgoraStyle.rightBar}>
<AgoraView
className={`${AgoraStyle.rightBar} ${
this.state.hideRightBar ? AgoraStyle.hide : ''
}`}
>
<LeftOutlined
className={AgoraStyle.rightBarIcon}
onClick={() => {
this.setState({
hideRightBar: !this.state.hideRightBar,
});
}}
/>
{this.renderChannel()}
{configuration ? (
<>
Expand Down
8 changes: 5 additions & 3 deletions example/src/renderer/components/RtcSurfaceView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import styles from './index.scss';

interface Props {
canvas: VideoCanvas;
containerClass?: string;
videoClass?: string;
connection?: RtcConnection;
}

Expand Down Expand Up @@ -132,20 +134,20 @@ export class RtcSurfaceView extends Component<Props, State> {
};

render() {
const { canvas } = this.props;
const { canvas, containerClass, videoClass } = this.props;
const { uniqueId } = this.state;

return (
<div
className={styles['window-item']}
className={containerClass ? containerClass : styles['window-item']}
onClick={() => {
this.setState((preState) => {
return { isMirror: !preState.isMirror };
}, this.updateRenderer);
}}
>
<div
className={styles['video-item']}
className={videoClass ? videoClass : styles['video-item']}
id={`video-${canvas.uid}-${uniqueId}`}
/>
</div>
Expand Down
61 changes: 61 additions & 0 deletions example/src/renderer/components/ui/public.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
flex-direction: row;
overflow: hidden;
height: 100%;
position: relative;

.card {
height: 340px;
Expand All @@ -27,6 +28,18 @@
flex-direction: column;
padding: 16px 16px 0 16px;
background-color: white;
position: relative;
&.hide {
flex: 0;
padding: 0 0 0 16px;
}
}

.rightBarIcon {
position: absolute;
left: 0;
top: 50%;
cursor: pointer;
}

.rightBarBig {
Expand All @@ -41,4 +54,52 @@
color: red;
}
}

.meetContainer {
position: relative;
.meetMain {
position: absolute;
width: 80%;
left: 0;
top: 0;
.meetSurfaceViewContainer {
height: 500px;
}
.meetSurfaceViewVideo {
height: 500px;
}
}
.meetRight {
position: absolute;
width: 20%;
right: 0;
top: 0;
display: flex;
flex-wrap: wrap;
.meetRenderContainer {
max-width: 70px;
}
}
}

.meetRenderContainer {
position: relative;
span {
position: absolute;
width: 100%;
z-index: 333;
color: #fff;
}
.meetSurfaceViewContainer {
flex: 1;
height: 150px;
}

.meetSurfaceViewVideo {
flex: 1;
height: 150px;
background: #000000;
overflow: hidden;
}
}
}
8 changes: 8 additions & 0 deletions example/src/renderer/components/ui/public.scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ declare namespace PublicScssNamespace {
content: string;
require: string;
rightBar: string;
hide: string;
rightBarIcon: string;
rightBarBig: string;
screen: string;
meetRenderContainer: string;
meetContainer: string;
meetMain: string;
meetRight: string;
meetSurfaceViewContainer: string;
meetSurfaceViewVideo: string;
selectedItem: string;
}
}
Expand Down
Loading
Loading