Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.7.2 #31

Merged
merged 8 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.7.2 (2024-05-15)

### Fixed

- Fixed an issue where the `SeekBar`'s seekable state was not updated when switching to a MP4 source.
- Fixed an issue where the `SkipButton` components are not rendered when switching sources while casting.

## 0.7.1 (2024-04-16)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theoplayer/react-native-ui",
"version": "0.7.1",
"version": "0.7.2",
"description": "A React Native UI for @theoplayer/react-native",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
3 changes: 2 additions & 1 deletion src/ui/components/button/SkipButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export class SkipButton extends PureComponent<SkipButtonProps, SkipButtonState>

private readonly onPlaying = () => {
const player = (this.context as UiContext).player;
this.setState({ enabled: player.seekable.length > 0 || player.buffered.length > 0 });
const isCasting = player.cast.chromecast?.casting ?? false
this.setState({ enabled: player.seekable.length > 0 || player.buffered.length > 0 || isCasting});
};

private readonly onPress = () => {
Expand Down
5 changes: 4 additions & 1 deletion src/ui/components/seekbar/SeekBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ export class SeekBar extends PureComponent<SeekBarProps, SeekBarState> {
}
};
private _onLoadedMetadata = (event: LoadedMetadataEvent) => this.setState({ duration: event.duration });
private _onDurationChange = (event: DurationChangeEvent) => this.setState({ duration: event.duration });
private _onDurationChange = (event: DurationChangeEvent) => {
const player = (this.context as UiContext).player;
this.setState({ duration: event.duration, seekable: player.seekable });
}
private _onProgress = (event: ProgressEvent) => this.setState({ seekable: event.seekable });

private _onSlidingStart = (value: number) => {
Expand Down