Skip to content

Commit

Permalink
[#259] Ignore broken player definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwebdev committed Oct 18, 2023
1 parent 3c98bc1 commit 0555b73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"args": "none"
}
],
// need that for shaka-player workaround
"@typescript-eslint/ban-ts-comment": "off",
// works incorrectly with type imports
"no-import-assign": "off",
"react/prop-types": "off",
Expand Down
5 changes: 4 additions & 1 deletion src/ebay-video/controls.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React, { ReactElement } from 'react'
import ReactDOM from 'react-dom'
// need that for broken definitions workaround
// @ts-ignore
import { ui } from 'shaka-player/dist/shaka-player.ui'
import { ReportButton } from './reportButton'

export function customControls(onReport = () => {}): { Report } {
// Have to contain in order to not execute until shaka is downloaded
const Report = class extends ui.Element {
// eslint-disable-next-line no-extra-parens
const Report = class extends (ui.Element as any) {
constructor(parent, controls, text) {
super(parent, controls)

Expand Down
2 changes: 2 additions & 0 deletions src/ebay-video/video.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ComponentProps, FC, SyntheticEvent, MouseEvent, useEffect, useRef, useState } from 'react'
import classNames from 'classnames'
// need that for broken definitions workaround
// @ts-ignore
import shaka from 'shaka-player/dist/shaka-player.ui'

import { filterByType } from '../common/component-utils'
Expand Down

0 comments on commit 0555b73

Please sign in to comment.