Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Merge "Add continueTtsDuringTouch"
Browse files Browse the repository at this point in the history
  • Loading branch information
taycaldwell authored and Gerrit Code Review committed Jun 16, 2021
2 parents 597190f + 50daed6 commit df8731a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Add continueTtsDuringTouch to Canvas, which is used to continue TTS output when a user interacts with a Canvas element.

## [3.7.1]
### Changed
Expand Down
5 changes: 5 additions & 0 deletions src/api/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,11 @@ export interface Canvas {
* name, and instructions for exiting the Action. Default value: `false`.
*/
enableFullScreen?: boolean
/**
* If `true`, screen taps will not stop TTS for the entire canvas session.
* Default value: `false`.
*/
continueTtsDuringTouch?: boolean
/**
* Optional. Default value: false.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/conversation/_test/conversation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ test('Canvas response sent', async t => {
}],
suppressMic: true,
enableFullScreen: true,
continueTtsDuringTouch: true,
}))
})
const res = await app.handler(
Expand All @@ -378,6 +379,7 @@ test('Canvas response sent', async t => {
}],
suppressMic: true,
enableFullScreen: true,
continueTtsDuringTouch: true,
},
},
})
Expand Down
7 changes: 7 additions & 0 deletions src/conversation/prompt/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export class Canvas implements Schema.Canvas {
* name, and instructions for exiting the Action. Default value: `false`.
*/
enableFullScreen?: boolean
/**
* If `true`, screen taps will not stop TTS for the entire canvas session.
* Default value: `false`.
*/
continueTtsDuringTouch?: boolean

/** @hidden */
constructor(input: Schema.Canvas = {}) {
Expand All @@ -80,10 +85,12 @@ export class Canvas implements Schema.Canvas {
suppressMic = false,
url = '',
enableFullScreen = false,
continueTtsDuringTouch = false,
} = input
this.data = data
this.suppressMic = suppressMic
this.url = url
this.enableFullScreen = enableFullScreen
this.continueTtsDuringTouch = continueTtsDuringTouch
}
}

0 comments on commit df8731a

Please sign in to comment.