* Configures the encoder with the given configuration.
(config: VideoEncoderConfig)
| 258 | * Configures the encoder with the given configuration. |
| 259 | */ |
| 260 | configure(config: VideoEncoderConfig) { |
| 261 | // Spec 6.5: If [[state]] is "closed", throw an InvalidStateError. |
| 262 | if (this._state === 'closed') { |
| 263 | throw new DOMException('Cannot configure a closed encoder', 'InvalidStateError'); |
| 264 | } |
| 265 | |
| 266 | // Spec 6.5: Set [[state]] to "configured". |
| 267 | this._state = 'configured'; |
| 268 | |
| 269 | // Spec 6.5: Queue a control message to configure the encoder... |
| 270 | this.configureInternal(config) |
| 271 | .catch(e => this.handleAsyncError(e)); |
| 272 | } |
| 273 | |
| 274 | private async configureInternal(config: VideoEncoderConfig) { |
| 275 | const currentConfigId = this.currentConfigId; |
nothing calls this directly
no test coverage detected