Skip to content

Commit

Permalink
DE-7017: Generic improvements (#37)
Browse files Browse the repository at this point in the history
* FEATURES

Add option to configure visibility of player
controls and to fully hide them.

Make base theme configurable: audio controls,
full screen button, track controls.

Add support for UI cues.

Add support for companion component above
the bottom bar of player controls.

* FIXES

Fix rounding of video duration.
Now all values with remainder 0.8 and higher
are rounded UP instead of down, to produce
a more accurate value.

* REFACTOR

Remove unnecessary private annotations.

Cleanup: detach listeners from PRESTO instance.

Allow presto instance to be null.

* APP

Move index.html to root folder.
Add mux.js to support HLS playback.

* TOOLING

Add prepack script, this way it is easy to
pack TGZ NPM packages for local use.

The ESLint rule is getting miss-reported
`@typescript-eslint/no-unsafe-assignment`,
I'm not sure why, but let's just ignore it for
now.
  • Loading branch information
fingerartur authored Apr 8, 2024
1 parent 4807ad2 commit 88cb5a7
Show file tree
Hide file tree
Showing 30 changed files with 454 additions and 162 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
// <div onClick={(event: React.MouseEvent<HTMLButtonElement>) => event.altKey}}/>
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
overrides: [
{
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 0.8.3 (Beta)

## New Features

* Add option to keep player controls hidden.
* Make `BaseThemeOverlay` more configurable:
* Add option to hide buttons (audio, full screen, track options)
* Add option to hide the top bar of player controls
* Add option to render a companion component above the bottom bar
of player controls
* Add option to display cues on the seek bar

## Fixes

* Fix rounding of duration.

# 0.7.3 (Beta)

## Fixes
Expand Down
16 changes: 16 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mux.js"></script>
<title>PRESTOplay React Components</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<script src="./dist/bundle.js"></script>
</body>
</html>
15 changes: 0 additions & 15 deletions app/src/index.html

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"test:watch": "jest --watch",
"lint": "npx eslint .",
"storybook": "storybook dev --port 6006",
"build-storybook": "storybook build --output-dir ./dist/storybook"
"build-storybook": "storybook build --output-dir ./dist/storybook",
"prepack": "npm run build"
},
"license": "Apache-2.0",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/rollup.config.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const options = [
open: true,
verbose: true,
contentBase: ["", "app", "app/src"],
host: "0.0.0.0",
host: "localhost",
port: "3000",
}),
livereload({
Expand Down
Loading

0 comments on commit 88cb5a7

Please sign in to comment.