Just wanted to share a solution which worked for me.
If you need to add only youtube videos to your site and don't need other features, which has Video field I recommend to use this solution.
Because it is responsive, it loads thumb image and loads video only when you click on play button which leads to faster page load.
What you should do?
Simply extract file from attached zip into this folder /components/com_cobalt/fields/text/tmpl/output
and use text field to display video(it will work anyway even if you have not purchased video field, becasue it needs text field which come with Cobalt free version).
In template for list and full view for this text field select ytid and on submit page when adding video add only ID of youtube video in this url https://www.youtube.com/watch?v=0FB2EoKTK_Q
ID is 0FB2EoKTK_Q
and you are done.
I worked for me, hope it will work for you too.
I found some problems on listing page. Will solve it and update file.
File is updated. Now it works on List view and Full view without problems. ytid
I can't guarantee that this is best solution and will work in 100% of situations, but for me this discreased load time of pages where I display multiple videos more then 20.
I am not good in JS, I just used code which I found on the internet and optimized it to work in my situation, if you are good in JS you can check it and get better solution.
If you want better quality thumb images you can edit hqdefault to maxresdefault but I noticed that some videos does not have image for second variant so I used first in template file.
Soon I will share link of Video gallery where I used this solution.
Just wanted to share a solution which worked for me. If you need to add only youtube videos to your site and don't need other features, which has Video field I recommend to use this solution. Because it is responsive, it loads thumb image and loads video only when you click on play button which leads to faster page load. What you should do? Simply extract file from attached zip into this folder
/components/com_cobalt/fields/text/tmpl/output
and use text field to display video(it will work anyway even if you have not purchased video field, becasue it needs text field which come with Cobalt free version). In template for list and full view for this text field select ytid and on submit page when adding video add only ID of youtube video in this urlhttps://www.youtube.com/watch?v=0FB2EoKTK_Q
ID is0FB2EoKTK_Q
and you are done. I worked for me, hope it will work for you too.I found some problems on listing page. Will solve it and update file.
File is updated. Now it works on List view and Full view without problems. ytid
I can't guarantee that this is best solution and will work in 100% of situations, but for me this discreased load time of pages where I display multiple videos more then 20.
I am not good in JS, I just used code which I found on the internet and optimized it to work in my situation, if you are good in JS you can check it and get better solution.
If you want better quality thumb images you can edit hqdefault to maxresdefault but I noticed that some videos does not have image for second variant so I used first in template file.
Soon I will share link of Video gallery where I used this solution.