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

fix(FEC-14080): Accessibility fix for the top bar and the bottom bar #150

Merged
merged 4 commits into from
Sep 3, 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
8 changes: 6 additions & 2 deletions src/components/pip/pip-parent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ export class PipParent extends Component<PIPParentComponentProps> {
videoContainerRef = createRef<HTMLDivElement>();

componentDidMount() {
const {player,playerType} = this.props;
if(playerType === PlayerType.VIDEO){
const {player, playerType} = this.props;
if (playerType === PlayerType.VIDEO) {
const videoElement = player.getVideoElement();
videoElement.removeAttribute('disablePictureInPicture');
}
const videoFilter = document.createElement('div');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a critical one, but since player applying the same styles we can move creation and appending element into ui.utils

videoFilter.classList.add('playkit-video-filter');

this.videoContainerRef?.current?.appendChild(player.getVideoElement());
this.videoContainerRef?.current?.appendChild(videoFilter);
}

render(props: PIPParentComponentProps) {
Expand Down
5 changes: 5 additions & 0 deletions src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
:global(.playkit-slideIn) {
z-index: 1;
}
:global(.playkit-container .playkit-video-filter) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably we can use utility from ui to manage video-filter node (add/remove)

&:before, &:after {
display: none;
}
}
}
Loading