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 youtube component to only click once on the video #4

Closed
deniskond opened this issue Oct 21, 2019 · 7 comments
Closed

Fix youtube component to only click once on the video #4

deniskond opened this issue Oct 21, 2019 · 7 comments
Assignees
Labels

Comments

@deniskond
Copy link
Owner

There is a possibility to add youtube embed to news, like here: http://dfcomps.ru/news/318. The youtube embed is optimized not to load youtube player at first, and only displays the video image.
The problem is: the user needs to click twice to start video and it needs to be fixed :) This can probably be done by generating second click on youtube embed component just after the first click.
In this issue, only YoutubeComponent needs to be edited.

@not-arzuaga
Copy link
Contributor

Can I take this one?

@deniskond
Copy link
Owner Author

@not-arzuaga sure, I'm assigning it to you :)

@not-arzuaga
Copy link
Contributor

While I was working on this I was questioning, why did you implement an image container to then display the iframe, wouldn't it would be better to have the iframe to begin with?

@not-arzuaga
Copy link
Contributor

I can make a callback to when the iframe is shown to start/click the video, but I think it would be best to show the iframe from the beginning.

@deniskond
Copy link
Owner Author

@not-arzuaga the main problem is site performance, the main page becomes too heavy if it contains more than one youtube iframe, that's why it is optimized not to load iframe at first

@not-arzuaga
Copy link
Contributor

I sent you a pr with a possible fix, it was only nescesary that the video ended in ?autoplay=1, so I made it like if someone added it will not change the url and if not it will be added

@deniskond
Copy link
Owner Author

@not-arzuaga Thanks! that works pretty well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants