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

JW Player #433

Merged
merged 25 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9ee71da
feat(cxl-ui): cxl-jw-player rename jw player component
saas786 Dec 1, 2022
c83003c
feat(cxl-ui): cxl-jw-player add styles directory
anoblet Feb 20, 2023
b14bfcd
feat(cxl-ui): cxl-jw-player rename playerId, playerSource to libraryI…
anoblet Feb 20, 2023
27b4a22
feat(cxl-ui): cxl-jw-player add ability to save playlist index
anoblet Mar 7, 2023
ab8abe3
feat(cxl-ui): cxl-jw-player add nextupoffset attribute
anoblet Mar 7, 2023
702065a
feat(cxl-ui): cxl-jw-player add separate mobile CTA
anoblet Mar 7, 2023
2a873b4
feat(cxl-ui): cxl-jw-player refactor base url
anoblet Sep 23, 2024
b72df62
feat(cxl-ui): cxl-jw-player remove jw player link
anoblet Sep 25, 2024
9e0a30c
feat(cxl-ui): cxl-jw-player update player styles
anoblet Sep 28, 2024
69f5778
feat(cxl-ui): cxl-jw-player improve support for source url
anoblet Sep 28, 2024
88913ef
feat(cxl-ui): cxl-jw-player remove support for plugins
anoblet Sep 28, 2024
1ab4e12
feat(cxl-ui): cxl-jw-player update player styles
anoblet Sep 28, 2024
5bc46c2
feat(cxl-ui): cxl-jw-player update search result count styles
anoblet Sep 30, 2024
9e4fbd9
fix(cxl-ui): cxl-jw-player scroll only the captions container
anoblet Sep 30, 2024
f770f6c
feat(cxl-ui): cxl-jw-player add error handling
anoblet Sep 30, 2024
a4ae583
fix(cxl-ui): cxl-jw-player reset play position on video complete
anoblet Oct 1, 2024
036bd53
feat(cxl-ui): cxl-jw-player update result count styles
anoblet Oct 1, 2024
6d3c79f
feat(cxl-ui): cxl-jw-player transcript scroll to next result when pre…
anoblet Oct 2, 2024
9df9201
feat(cxl-ui): cxl-jw-player transcript remove empty tracks
anoblet Oct 2, 2024
5639cbf
feat(cxl-ui): cxl-jw-player add margin to the bottom of the captions
anoblet Oct 3, 2024
e179515
fix(cxl-ui): cxl-jw-player setup crashes when transcripts aren't turn…
anoblet Oct 3, 2024
464df2f
feat(cxl-ui): cxl-jw-player transcript only highlight active search r…
anoblet Oct 3, 2024
73371c3
fix(cxl-ui): cxl-jw-player toggle captions not properly working
anoblet Oct 4, 2024
dadc6bb
fix(cxl-ui): cxl-course-dialog remove import of cxl-jw-player
anoblet Oct 4, 2024
da3dd1f
refactor(cxl-ui): cxl-jw-player modify transcript search highlight co…
pawelkmpt Oct 7, 2024
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
2 changes: 2 additions & 0 deletions packages/cxl-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
"@vaadin/tooltip": "^23.3.7",
"@vaadin/vaadin-themable-mixin": "^23.3.7",
"cross-env": "~7.0.2",
"crypto-js": "^4.1.1",
"headroom.js": "^0.12.0",
"imports-loader": "^2.0.0",
"jose": "^4.13.1",
"laravel-mix": "^6.0.39",
"lit": "^2.2.5",
"lodash-es": "^4.17.21",
Expand Down
147 changes: 147 additions & 0 deletions packages/cxl-ui/scss/cxl-jw-player/cxl-jw-player-shadow.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
@use '~@conversionxl/cxl-lumo-styles/scss/mixins';
@use '~@conversionxl/cxl-lumo-styles/scss/mq';

:host {
background-color: var(--wp--preset--color--white);
box-sizing: border-box;
display: block;

* {
box-sizing: border-box;
}

[active] {
background-color: var(--lumo-shade-10pct);
}

[hidden] {
display: none;
}
}

:host([captions]) {
#container {
background-color: var(--lumo-shade-5pct);
display: grid;
grid-template-rows: max-content max-content auto;
padding-bottom: var(--lumo-space-m);
}
}

.captions {
line-height: calc(var(--lumo-line-height-m) * 1.25);
margin: 0 auto;
max-height: 16rem;
max-width: var(--cxl-content-max-width);

h2,
span {
&:hover {
color: var(--lumo-primary-color);
}

cursor: var(--captions-cursor, pointer);
}

mark {
background-color: var(--lumo-shade-10pct);

&.search-active {
background-color: var(--lumo-primary-color);
color: #fff;
}
}

span {
padding: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
}
}

.center {
display: flex;
align-items: center;
justify-content: center;
}

.cxl-jw-player-container {
height: 100%;
}

.flex {
display: flex;
height: 100%;
}

.flex.column {
flex-direction: column;
}

.flex.grow {
flex-grow: 1;
}

.gap {
gap: var(--lumo-space-s);
}

.grid {
display: grid;
}

.height-50 {
height: 50%;
}

.height-100 {
height: 100%;
}

.overflow-hidden {
overflow: hidden;
}

.padding {
padding: var(--lumo-space-s);
}

.scroll {
@include mixins.better-webkit-scrollbars();

overflow: hidden;

&:hover {
overflow: auto;
}
}

.search {
flex-direction: column;
margin: 0 auto;
max-width: var(--cxl-content-max-width);
width: 100%;

#search-result-count {
font-size: var(--lumo-font-size-s);
}

vaadin-checkbox {
--lumo-body-text-color: #fff;

display: none;
}

vaadin-checkbox:not([checked])::part(checkbox) {
background-color: #fff;
}

vaadin-text-field {
box-shadow: var(--lumo-box-shadow-xs);
background-color: #fff;
border-radius: var(--lumo-space-xs);
width: 100%;

&::part(input-field) {
background-color: initial;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:host(:not([hidden])) {
display: block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
background: var(--lumo-shade);
gap: var(--lumo-space-s);

&[hidden] {
display: none;
}

.close {
font-size: var(--lumo-font-size-xs);
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cxl-jw-player {
&[wide] {
.jw-nextup-cta-mobile {
display: none;
}
}

&:not([wide]) {
.jw-nextup-cta {
display: none;
}
}

.jw-nextup-container {
display: flex;
flex-direction: column;
align-items: flex-end;

.jw-nextup-cta,
.jw-nextup-cta-mobile {
a {
pointer-events: all;
}
}

.jw-nextup-cta {
max-width: 400px;
width: 64%;

vaadin-button {
width: 100%;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:host(:not([hidden])) {
display: block;
}
29 changes: 29 additions & 0 deletions packages/cxl-ui/scss/global/cxl-jw-player/cxl-jw-player.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cxl-jw-player {
.jw-player-button {
width: 32px;
fill: rgba(255, 255, 255, 0.8);

&:hover {
fill: rgba(255, 255, 255, 1);
}
}

.jw-related-item {
height: 100% !important; /* stylelint-disable-line declaration-no-important */
}

.jwplayer:not(.jw-flag-small-player) .jw-related-item-next-up {
.jw-related-item-poster {
height: 100%;
}

.jw-related-item-title {
position: absolute;
bottom: 0;
}
}
}

.jw-rightclick-list li:last-of-type {
display: none;
}
107 changes: 0 additions & 107 deletions packages/cxl-ui/scss/jw-player/jw-player.scss

This file was deleted.

5 changes: 2 additions & 3 deletions packages/cxl-ui/src/components/cxl-course-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { registerGlobalStyles } from '@conversionxl/cxl-lumo-styles/src/utils';
import '@vaadin/button';
import '@vaadin/dialog';
import './cxl-time.js';
import './jw-player/index.js';
import { dialogFooterRenderer, dialogRenderer } from '@vaadin/dialog/lit.js';
import cxlCourseDialogGlobalStyles from '../styles/global/cxl-course-dialog-css.js';

Expand Down Expand Up @@ -64,14 +63,14 @@ export class CXLCourseDialogElement extends LitElement {
</div>
<section>
${this.video
? html` <jw-player
? html` <cxl-jw-player
?captions=${this.video.captions}
media-id=${this.video.mediaId}
minimum-search-length=${this.video.minimumSearchLength}
player-id=${this.video.playerId}
playlist-id=${this.video.playlistId}
plugin-path="${this.video.pluginPath}"
></jw-player>`
></cxl-jw-player>`
: ''}
<div class="content">
<p>${this.course.description}</p>
Expand Down
Loading
Loading