Skip to content

Commit

Permalink
feat: add needStopPreview param
Browse files Browse the repository at this point in the history
  • Loading branch information
tiankun committed Dec 4, 2024
1 parent 966be7f commit 4d6787a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tuya-panel-ipc-sdk/src/ty-ipc-player/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,15 +544,15 @@ class TYIpcPlayer extends React.Component<TYIpcPlayerProps, TYIpcPlayerState> {
enterBackground = () => {
this.goToBack = true;
this.onLivePage = false;
const { enterBackDisConP2P, showCutScreen } = this.props;
const { enterBackDisConP2P, showCutScreen, needStopPreview } = this.props;

if (showCutScreen) {
TYEvent.emit('hideScreenListen', {});
}

if (!enterBackDisConP2P) {
if (!needStopPreview) {
TYIpcPlayerManager.exitPlayPreviewSpecial();
} else {
} else {
TYIpcPlayerManager.backPlayPreview(enterBackDisConP2P);
}

Expand Down
2 changes: 2 additions & 0 deletions packages/tuya-panel-ipc-sdk/src/ty-ipc-player/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export interface TYIpcPlayerProps {
displayInPortrait: boolean;
useCustomContainer: boolean;
wirelessAwake: boolean;
needStopPreview: boolean;
}

export const _defaultProps = {
Expand Down Expand Up @@ -247,4 +248,5 @@ export const _defaultProps = {
displayInPortrait: true,
useCustomContainer: false,
wirelessAwake: false,
needStopPreview: true
};

0 comments on commit 4d6787a

Please sign in to comment.