@playkit-js/transcript 3.5.2-canary.0-9781460 → 3.5.2-canary.0-ff51a39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -89,6 +89,7 @@ export class CaptionList extends Component<Props> {
|
|
|
89
89
|
shouldScroll: this._getShouldScroll(id),
|
|
90
90
|
shouldScrollToSearchMatch: this._getShouldScrollToSearchMatch(id),
|
|
91
91
|
isAutoScrollEnabled,
|
|
92
|
+
searchCaption: this.props.searchMap[captionData.id],
|
|
92
93
|
...this._getSearchProps(id)
|
|
93
94
|
};
|
|
94
95
|
return newCaptionProps;
|
|
@@ -104,6 +105,7 @@ export class CaptionList extends Component<Props> {
|
|
|
104
105
|
|
|
105
106
|
render() {
|
|
106
107
|
const {data} = this.props;
|
|
108
|
+
let isSearchCaption = false;
|
|
107
109
|
return (
|
|
108
110
|
<div className={styles.transcriptWrapper} onKeyUp={this._handleKeyUp}>
|
|
109
111
|
{data.map((captionData, index) => {
|
|
@@ -116,7 +118,15 @@ export class CaptionList extends Component<Props> {
|
|
|
116
118
|
} else if (index === data.length - 1) {
|
|
117
119
|
this._lastCaptionRef = node;
|
|
118
120
|
}
|
|
119
|
-
if (captionProps.
|
|
121
|
+
if (captionProps.searchCaption){
|
|
122
|
+
Object.keys(captionProps.searchCaption).forEach(key => {
|
|
123
|
+
if (parseInt(key) === this.props.activeSearchIndex) {
|
|
124
|
+
this._currentCaptionRef = node
|
|
125
|
+
isSearchCaption = true;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (!isSearchCaption && captionProps.highlighted[captionData.id]) {
|
|
120
130
|
this._currentCaptionRef = node;
|
|
121
131
|
}
|
|
122
132
|
}}
|
|
@@ -252,6 +252,7 @@ export class Transcript extends Component<TranscriptProps, TranscriptState> {
|
|
|
252
252
|
ref={node => {
|
|
253
253
|
this._skipTranscriptButtonRef = node;
|
|
254
254
|
}}
|
|
255
|
+
data-testid="transcript_skipButton"
|
|
255
256
|
className={styles.skipTranscriptButton}
|
|
256
257
|
onKeyDown={this._handleKeyDown}
|
|
257
258
|
onClick={this._handleClick}
|