@internetarchive/transcript-view
v1.0.0
Published
A Transcript View LitElement that displays closed captioning and search results.
Downloads
67
Maintainers
Keywords
Readme
<transcript-view>
A transcript view that handles closed captioning and search results.

Installation
yarn add @internetarchive/transcript-viewUsage
// transcript-view.js
import TranscriptView from '@internetarchive/transcript-view';
export default TranscriptView;<!-- index.html -->
<script type="module">
import './transcript-view.js';
</script>
<style>
transcript-view {
display: block;
--timeColor: white;
--timeColumnWidth: 5rem;
--transcriptHeight: 200px;
--autoScrollButtonFontColor: black;
--autoScrollButtonBackgroundColor: white;
--normalTextColor: gray;
--activeTextColor: white;
--searchResultInactiveBorderColor: gray;
--searchResultActiveBorderColor: green;
}
</style>
<transcript-view
currentTime=10
showContextZones=true
topContextHeight=50
bottomContextHeight=50
selectedSearchResultIndex=1
.entries=${transcript}>
</transcript-view>
<script>
const transcriptView = document.querySelector('transcript-view');
// change the current time and the transcript view
// will scroll to the proper entry
transcriptView.currentTime = 50;
</script>
Development
Prerequisite
yarn installStart Development Server
yarn start // start development server and typescript compilerTesting
yarn testTesting via browserstack
yarn test:bsDemoing using storybook
yarn storybookLinting
yarn lint