Skip to content

Commit

Permalink
Merge pull request #17 from apivideo/experimental-features
Browse files Browse the repository at this point in the history
Experimental features
  • Loading branch information
olivierapivideo authored Dec 13, 2023
2 parents b59fe71 + e1036a5 commit 013e336
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.0.4] - 2023-12-13
- Add experimental features

## [1.0.3] - 2023-06-12
- Add ads support

Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@api.video/react-player",
"version": "1.0.3",
"version": "1.0.4",
"description": "api.video React player component",
"keywords": [
"player",
Expand Down Expand Up @@ -49,6 +49,6 @@
"typescript": "^4.7.4"
},
"dependencies": {
"@api.video/player-sdk": "^1.2.25"
"@api.video/player-sdk": "^1.2.28"
}
}
12 changes: 12 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export interface ApiVideoPlayerProps {
theme?: PlayerTheme;
videoStyleObjectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
videoStyleTransform?: string;
// This feature is experimental.
// It may change or be removed at any time and could cause significant playback issues.
minimalQuality?: number;
// This feature is experimental.
// It may change or be removed at any time and could cause significant playback issues.
maximalQuality?: number;



Expand Down Expand Up @@ -212,6 +218,12 @@ export default class ApiVideoPlayer extends React.Component<ApiVideoPlayerProps,
if (nextProps.showSubtitles !== undefined && nextProps.showSubtitles !== this.props.showSubtitles) {
nextProps.showSubtitles ? this.playerSdk.showSubtitles() : this.playerSdk.hideSubtitles();
}
if (nextProps.maximalQuality !== undefined && nextProps.maximalQuality !== this.props.maximalQuality) {
this.playerSdk.setMaximalQuality(nextProps.maximalQuality);
}
if (nextProps.minimalQuality !== undefined && nextProps.minimalQuality !== this.props.minimalQuality) {
this.playerSdk.setMinimalQuality(nextProps.minimalQuality);
}
if (nextProps.autoplay !== this.props.autoplay) {
this.playerSdk.setAutoplay(nextProps.autoplay || false);
}
Expand Down

0 comments on commit 013e336

Please sign in to comment.