Skip to content

Commit

Permalink
Merge pull request #3 from git-ced/fix-react-build
Browse files Browse the repository at this point in the history
Fix: Unwanted React Build Error
  • Loading branch information
git-ced authored Oct 7, 2021
2 parents e4fd8cb + 83ed5c9 commit 51763ab
Show file tree
Hide file tree
Showing 19 changed files with 2,040 additions and 505 deletions.
6 changes: 3 additions & 3 deletions .eslintrc → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
"root": true,
"extends": [
"lxsmnsyc/typescript/react"
"lxsmnsyc/typescript"
],
"parserOptions": {
"project": "./tsconfig.eslint.json",
"tsconfigRootDir": __dirname
"project": "./tsconfig.eslint.json"
},
"rules": {
"import/no-extraneous-dependencies": [
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function Player() {
const player = ref()?.plyr;

if (player) {
player.on('timeupdate', event => {
player.on('timeupdate', (event) => {
// Log current time while playing the playback
console.log(event.detail.plyr.currentTime);
});
Expand Down Expand Up @@ -228,7 +228,7 @@ export default function Player() {
const player = ref()?.plyr;

if (player) {
player.on('timeupdate', event => {
player.on('timeupdate', (event) => {
// Log current time while playing the playback
console.log(event.detail.plyr.currentTime);
});
Expand Down Expand Up @@ -289,7 +289,7 @@ export default function Player() {
const player = ref()?.plyr;

if (player) {
player.on('timeupdate', event => {
player.on('timeupdate', (event) => {
// Log current time while playing the playback
console.log(event.detail.plyr.currentTime);
});
Expand Down
16 changes: 8 additions & 8 deletions example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
module.exports = {
"extends": [
'lxsmnsyc/typescript/react',
],
"root": true,
"parserOptions": {
"project": "./tsconfig.eslint.json",
"tsconfigRootDir": __dirname,
},
"extends": [
"lxsmnsyc/typescript/react"
],
"rules": {
"import/no-extraneous-dependencies": [
"error", {
"error",
{
"devDependencies": [
"**/*.test.tsx",
"vite.config.ts"
Expand All @@ -17,15 +18,14 @@ module.exports = {
],
"camelcase": "off",
"react/button-has-type": "off",
"react/destructuring-assignment": "off",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": "off",
"react-hooks/rules-of-hooks": "off",
"react/jsx-no-undef": "off",
"react/prop-types": "off",
"jsx-a11y/anchor-is-valid": "off",
"react/no-unknown-property": "off",
"jsx-a11y/label-has-associated-control": "off",
"react/jsx-props-no-spreading": "off",
"react/destructuring-assignment": "off"
"jsx-a11y/label-has-associated-control": "off"
}
};
2 changes: 2 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
"@twind/aspect-ratio": "^0.1.4",
"@twind/forms": "^0.1.4",
"@twind/typography": "^0.0.2",
"plyr": "^3.6.8",
"rollup-plugin-visualizer": "^5.5.2",
"solid-app-router": "^0.1.7",
"solid-headless": "^0.6.3",
"solid-js": "^1.1.1",
"solid-plyr": "^1.0.9",
"twind": "^0.16.16",
"vite": "^2.5.10",
"vite-plugin-checker": "^0.3.4",
Expand Down
9 changes: 5 additions & 4 deletions example/src/components/DashDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const dashSrc: SourceInfo = {
{
src: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',
type: 'application/dash+xml',
}
]
},
],
};

export default function DashDemo(): JSX.Element {
Expand All @@ -35,12 +35,13 @@ export default function DashDemo(): JSX.Element {

if (dashPlayer) {
setLoading(false);
dashPlayer.on('timeupdate', event => {
dashPlayer.on('timeupdate', (event) => {
const instance = event.detail.plyr;
// eslint-disable-next-line no-console
console.log(instance.currentTime);
});
}
})
});

return (
<div>
Expand Down
11 changes: 6 additions & 5 deletions example/src/components/HlsDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const hlsSrc: SourceInfo = {
{
src:
'https://bitmovin-a.akamaihd.net/content/playhouse-vr/m3u8s/105560.m3u8',
type: 'application/x-mpegURL'
}
]
type: 'application/x-mpegURL',
},
],
};

export default function HlsDemo(): JSX.Element {
Expand All @@ -36,12 +36,13 @@ export default function HlsDemo(): JSX.Element {

if (hlsPlayer) {
setLoading(false);
hlsPlayer.on('timeupdate', event => {
hlsPlayer.on('timeupdate', (event) => {
const instance = event.detail.plyr;
// eslint-disable-next-line no-console
console.log(instance.currentTime);
});
}
})
});

return (
<div>
Expand Down
9 changes: 5 additions & 4 deletions example/src/components/Mp4Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const mp4Src: SourceInfo = {
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4',
type: 'video/mp4',
size: 1080,
}
]
},
],
};

export default function Mp4Demo(): JSX.Element {
Expand All @@ -41,12 +41,13 @@ export default function Mp4Demo(): JSX.Element {

if (mp4Player) {
setLoading(false);
mp4Player.on('timeupdate', event => {
mp4Player.on('timeupdate', (event) => {
const instance = event.detail.plyr;
// eslint-disable-next-line no-console
console.log(instance.currentTime);
});
}
})
});

return (
<div>
Expand Down
11 changes: 6 additions & 5 deletions example/src/components/VimeoDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const vimeoSrc: SourceInfo = {
sources: [
{
src: 'https://vimeo.com/533559247',
provider: 'vimeo'
}
]
provider: 'vimeo',
},
],
};

export default function VimeoDemo(): JSX.Element {
Expand All @@ -35,12 +35,13 @@ export default function VimeoDemo(): JSX.Element {

if (vimeoPlayer) {
setLoading(false);
vimeoPlayer.on('timeupdate', event => {
vimeoPlayer.on('timeupdate', (event) => {
const instance = event.detail.plyr;
// eslint-disable-next-line no-console
console.log(instance.currentTime);
});
}
})
});

return (
<div>
Expand Down
11 changes: 6 additions & 5 deletions example/src/components/YoutubeDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const youtubeSrc: SourceInfo = {
sources: [
{
src: 'yWtFb9LJs3o',
provider: 'youtube'
}
]
provider: 'youtube',
},
],
};

export default function YoutubeDemo(): JSX.Element {
Expand All @@ -35,12 +35,13 @@ export default function YoutubeDemo(): JSX.Element {

if (youtubePlayer) {
setLoading(false);
youtubePlayer.on('timeupdate', event => {
youtubePlayer.on('timeupdate', (event) => {
const instance = event.detail.plyr;
// eslint-disable-next-line no-console
console.log(instance.currentTime);
});
}
})
});

return (
<div>
Expand Down
Loading

0 comments on commit 51763ab

Please sign in to comment.