Skip to content

[Amp story captions] Allow Players to get/set the captions state #37898

@processprocess

Description

@processprocess

Description

This will likely happen here:

/** @enum {!GetStateConfigurationDef} */
const GET_STATE_CONFIGURATIONS = {
'CURRENT_PAGE_ID': {
dataSource: DataSources.STORE_SERVICE,
property: StateProperty.CURRENT_PAGE_ID,
},
'EDUCATION_STATE': {
dataSource: DataSources.STORE_SERVICE,
property: StateProperty.EDUCATION_STATE,
},
'MUTED_STATE': {
dataSource: DataSources.STORE_SERVICE,
property: StateProperty.MUTED_STATE,
},
'PAGE_ATTACHMENT_STATE': {
dataSource: DataSources.STORE_SERVICE,
property: StateProperty.PAGE_ATTACHMENT_STATE,
},
'UI_STATE': {
dataSource: DataSources.STORE_SERVICE,
property: StateProperty.UI_STATE,
},
'STORY_PROGRESS': {
dataSource: DataSources.VARIABLE_SERVICE,
property: AnalyticsVariable.STORY_PROGRESS,
},
};
/** @typedef {{action: !Action, isValueValid: function(*):boolean}} */
let SetStateConfigurationDef;
/** @enum {!SetStateConfigurationDef} */
const SET_STATE_CONFIGURATIONS = {
'MUTED_STATE': {
action: Action.TOGGLE_MUTED,
isValueValid: (value) => typeof value === 'boolean',
},
};
.

Blocked by #37884

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions