-
Notifications
You must be signed in to change notification settings - Fork 87
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
✨(video_player) lazy load embed video player #2171
base: master
Are you sure you want to change the base?
✨(video_player) lazy load embed video player #2171
Conversation
fd1091b
to
9ab3da6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the user has to click twice to start the video that is weird but unfortunately autoplay has several restriction to be enable (add allow="autoplay"
to the iframe and the video has to be muted by default...)
CleanShot.2023-12-11.at.23.47.18.mp4
src/richie/apps/core/templates/djangocms_video/default/video_player.html
Outdated
Show resolved
Hide resolved
src/richie/apps/core/templates/djangocms_video/default/video_player.html
Outdated
Show resolved
Hide resolved
d1f0949
to
1e9bd87
Compare
1e9bd87
to
ea91b1a
Compare
6f5fc21
to
2cca752
Compare
Added a feature toggle, using the I refactor the implementation. This implementation change, from previous review allows to fix the problem of the "back button", after the user clicks on play and wants to go back to previous page, the page was only removing the Youtube player with the play icon. |
Add an option to lazy load iframe video player. Instead of always loading the external video player, it only loads the video player if the user clicks on the big play ▶ icon.
2cca752
to
964b360
Compare
@sandroscosta Did we need to change something about accessibility? |
@sandroscosta can you check if we need to include something about accessibility? |
Instead of loading the external video player,
it only loads the video player if the user clicks on the big ▶ icon.
It only works on the published page. On the edit mode it still show the old behavior.
This has performance benefits so the external video player JS libraries, like Youtube, only loads when the user wants to view the video.
The image that is uses is the video poster or the course cover.