Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
mediaPlayerWrapper = null
videoWrapper = null
video = null
state = {
videoState: PAUSED,
screenState: WINDOWED_SCREEN,
muted: false,
volume: 1,
playbackSpeed: 1,
loadingSrc: true,
selectedSrc: this.getSourceFromProps(),
sources: this.props.sources,
showControls: true,
videoId: uid('VideoPlayer')
}
componentDidMount () {
this._registerEventHandlers()
}
componentWillUnmount () {
screenfull.off('change', this.updateScreenState)
MEDIA_ELEMENT_EVENTS.forEach((evt) => {
this.video.removeEventListener(evt, this.getDerivedStateFromVideoProps)
})
// remove the video ref and stop applying video props
this.video = null
this.videoWrapper = null
this.mediaPlayerWrapper = null
}
get tabIds () {
// cache tab ids for better performance and to prevent errors with animations
const ids = this._tabIds || []
let diff = ids.length - this.tabs.length
while (diff++ < 0) {
ids.push(uid('Tab'))
}
this._tabIds = ids
return ids
}
get tabIds () {
// cache tab ids for better performance and to prevent errors with animations
const ids = this._tabIds || []
let diff = ids.length - this.tabs.length
while (diff++ < 0) {
ids.push(uid('Tab'))
}
this._tabIds = ids
return ids
}
constructor (props) {
super()
this._defaultId = uid('Select')
}
constructor (props) {
super()
this.state = {
expanded: this.isControlled(props) ? props.expanded : !!props.defaultExpanded
}
this._contentId = uid('Expandable__content')
}
const maybeAddExample = (props) => {
const componentProps = getComponentProps(props)
const exampleProps = getExampleProps(props)
const key = uid()
const propsString = JSON.stringify(componentProps)
const ignore = (typeof filter === 'function') ? filter(componentProps) : false
if (!ignore && !PROPS_CACHE.includes(propsString)) {
exampleCount++
if (exampleCount < maxExamples) {
PROPS_CACHE.push(propsString)
addExample(componentProps[sectionProp], {
Component,
componentProps,
exampleProps,
key
})
}
constructor (props) {
super(props)
this.video = null
this.state = {
state: PAUSED,
loadingSrc: true,
showControls: true,
videoId: uid('VideoPlayer')
}
}
constructor (props) {
super()
this.state = {}
if (typeof props.show === 'undefined') {
this.state.show = props.defaultShow
}
this.labelId = uid('PopoverMenu')
this.raf = []
}