Skip to content

[Camera] Update Push AV server API usage and refactor popup modal component#35

Open
chulspro wants to merge 7 commits intoproject-chip:mainfrom
chulspro:feature/contribution-certification-tool-frontend-7
Open

[Camera] Update Push AV server API usage and refactor popup modal component#35
chulspro wants to merge 7 commits intoproject-chip:mainfrom
chulspro:feature/contribution-certification-tool-frontend-7

Conversation

@chulspro
Copy link
Contributor

This PR:

  • The Push AV reference server APIs were updated, hence the API usage has been updated like wise.
  • Refactors the popup modal into submodules: pushav, webrtc, video player and snapshot modules.
  • Improves VideoDecoder error handling.

chulspro and others added 6 commits February 25, 2026 16:33
Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
Signed-off-by: s-gatti <s.gatti@samsung.com>
Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
Signed-off-by: s-gatti <s.gatti@samsung.com>
Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
Signed-off-by: s-gatti <s.gatti@samsung.com>
Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @chulspro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the camera-related functionalities by updating the Push AV server API interactions and performing a major refactoring of the popup modal component. The refactoring effort separates concerns into distinct submodules for WebRTC, Push AV playback, video streaming, and snapshot viewing, making the codebase more organized and easier to manage. Additionally, the changes include improvements to video decoding error handling, contributing to a more stable user experience.

Highlights

  • Push AV Server API Update: The usage of Push AV reference server APIs has been updated to reflect recent changes in the server implementation.
  • Popup Modal Refactoring: The monolithic popup modal component has been refactored into dedicated submodules for Push AV, WebRTC, video player, and snapshot functionalities, improving modularity and maintainability.
  • VideoDecoder Error Handling: Error handling within the VideoDecoder has been improved, leading to more robust video streaming capabilities.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/app/app.module.ts
    • Imported new popup modal subcomponents.
    • Declared new popup modal subcomponents in the NgModule.
  • src/app/components/shared/popup-modal/popup-modal.component.html
    • Removed inline HTML for WebRTC, video streaming, Push AV, and image display.
    • Replaced removed content with conditional rendering of new subcomponents.
  • src/app/components/shared/popup-modal/popup-modal.component.scss
    • Updated styling for file info elements to include box shadows and icon padding.
    • Removed extensive styles related to WebRTC audio levels, video player, and stream lists, which are now managed by dedicated subcomponent stylesheets.
  • src/app/components/shared/popup-modal/popup-modal.component.ts
    • Removed numerous imports for video decoding, Shaka Player, and audio level utilities.
    • Simplified component lifecycle hooks by removing OnInit, OnDestroy, and AfterViewInit implementations.
    • Removed all properties and methods related to stream management, video decoding, and audio level visualization.
    • Added new helper methods (isWebRTCStream, isVideoStream, isSnapshot, isPushAV) to control subcomponent visibility.
  • src/app/components/shared/popup-modal/push-av-player/push-av-player.component.html
    • Added new file containing the HTML structure for the Push AV player, including stream list, video player, and content displays.
  • src/app/components/shared/popup-modal/push-av-player/push-av-player.component.scss
    • Added new file containing SCSS styles for the Push AV player component.
  • src/app/components/shared/popup-modal/push-av-player/push-av-player.component.ts
    • Added new file implementing the Push AV player logic, including stream fetching, Shaka Player integration, and error handling.
  • src/app/components/shared/popup-modal/snapshot-view/snapshot-view.component.html
    • Added new file containing the HTML structure for displaying snapshot images.
  • src/app/components/shared/popup-modal/snapshot-view/snapshot-view.component.scss
    • Added new file containing SCSS styles for the snapshot view component.
  • src/app/components/shared/popup-modal/snapshot-view/snapshot-view.component.ts
    • Added new file implementing the snapshot image display logic.
  • src/app/components/shared/popup-modal/video-stream/video-stream.component.html
    • Added new file containing the HTML structure for displaying raw video streams on a canvas.
  • src/app/components/shared/popup-modal/video-stream/video-stream.component.scss
    • Added new file containing SCSS styles for the video stream component.
  • src/app/components/shared/popup-modal/video-stream/video-stream.component.ts
    • Added new file implementing the video stream decoding and display logic using WebSockets and VideoDecoder, with improved error handling.
  • src/app/components/shared/popup-modal/webrtc-stream/webrtc-stream.component.html
    • Added new file containing the HTML structure for WebRTC streams, including video and audio level indicators.
  • src/app/components/shared/popup-modal/webrtc-stream/webrtc-stream.component.scss
    • Added new file containing SCSS styles for the WebRTC stream component.
  • src/app/components/shared/popup-modal/webrtc-stream/webrtc-stream.component.ts
    • Added new file implementing the WebRTC stream logic, including audio level visualization and microphone control.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant and well-executed refactoring of the PopupModalComponent. By breaking it down into smaller, more focused sub-components (WebrtcStreamComponent, SnapshotViewComponent, PushAvPlayerComponent, VideoStreamComponent), the code is now much more modular and maintainable. The updates to the Push AV server API usage and the improved error handling in the VideoDecoder are also valuable additions. My review includes a few suggestions to further improve code organization by centralizing type and interface definitions.

Copy link
Contributor

@raul-marquez-csa raul-marquez-csa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, good refactor and improvement.
LGTM

- Create push-av-player.model.ts for Stream and NonConformingFile interfaces
- Create webrtc-stream.model.ts for WebRTCSession interface
- Create src/typings.d.ts for global video decoder type declarations

Addresses gemini code review comments.

Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants