Skip to content

Commit

Permalink
Merge pull request #31 from THEOplayer/release/v0.7.2
Browse files Browse the repository at this point in the history
Release/v0.7.2
  • Loading branch information
wjoosen authored May 15, 2024
2 parents 8f16e82 + 81e630c commit b6ff299
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
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

0 comments on commit b6ff299

Please sign in to comment.