Page 1 of 2

Problems when trying to put a YouTube video on my website.

Posted: 18 Mar 2018, 17:22
by jprodriguez
I have created an Api to download videos from YouTube uploaded by third parties, in Video Code (YouTube) I place the Api that I have created, when I insert the video link I get the following:
Error
Error while importing YouTube data. Check the YouTube URL, check if the API key is valid. (Bad Request)

What am I doing wrong.

Thank you

Re: Problems when trying to put a YouTube video on my website.

Posted: 18 Mar 2018, 19:26
by christine
Hi,

Check the field: "YouTube API Key" in Phoca-gallery global configuration --> General Setting. Once the API Key is updated, you will able to import Youtube videos in Phoca Images.

see also: https://www.phoca.cz/documents/2-phoca- ... ube-videos

Kind regards
Christine

Re: Problems when trying to put a YouTube video on my website.

Posted: 18 Mar 2018, 20:36
by jprodriguez
Problem solved.
Thank you very much.

Re: Problems when trying to put a YouTube video on my website.

Posted: 18 Mar 2018, 21:14
by jprodriguez
Good afternoon, now I find the problem that when I click on the video I get the image that is downloaded by default but you can not see the video.

What I'm still doing wrong, thanks.

Re: Problems when trying to put a YouTube video on my website.

Posted: 18 Mar 2018, 23:00
by christine
Hi,
try this please:
Before clicking on YouTube button, select category of the image (to store thumbnails to right folder)

This way title, description, YouTube link and filename will be imported. If you don't want to import data from YouTube, don't forget to add an image into a Filename input form field. Thumbnails cannot be created from Youtube video, so you have to add an image to create a medium thumbnail which will be displayed in the thumbnail image list view (in category view).
Kind regards
Christine

Re: Problems when trying to put a YouTube video on my website.

Posted: 19 Mar 2018, 01:45
by jprodriguez
Good evening, I have done what you tell me and remains the same, I put the steps I follow:

- New.
- Select You Tube
- I select the category
- Insert the video link
- To import

I put all the data except for the category that I have to re-select and in the file name I automatically appear an image with the extension of the video that is the one that appears later instead of the video.

If I enter that image I also see the link to the video.

You can see the result at the following address

http://jesuscaido.000webhostapp.com/ind ... -procesion

Thank you

Re: Problems when trying to put a YouTube video on my website.

Posted: 19 Mar 2018, 16:36
by Jan
Hi,
1) which version of Phoca Gallery do you use?
2) Did you select popup javascript method which supports YouTube videos - try to test it with some iframe method:
https://www.phoca.cz/documents/50-phoca ... al-advices (8)
Jan

Re: Problems when trying to put a YouTube video on my website.

Posted: 19 Mar 2018, 17:10
by jprodriguez
Good afternoon, the version of Phoca Gallery that I am using is 4.3.10, joomla version 3.8.6, and forgive my ignorance but where I find the javascript popup, I do not see it anywhere.

Thank you.

Re: Problems when trying to put a YouTube video on my website.

Posted: 19 Mar 2018, 20:35
by Benno
Hi,
this refers to the different detail views. Only iFrame methods can display youtube videos. See Jans Link, #8:
8. Image or Iframe Method

Phoca Gallery uses two different methods to display images in detail window.

Image Method:

Modal Box (image only)
Shadowbox
Highslide JS (image only)
JAK lightbox
Slimbox

Iframe Method:

Standard Popop (not iframe but has the same behaviour like iframe)
Modal Box
Highslide JS
No Popup (not iframe but has the same behaviour like iframe)

Images displayed in detail window used image method are displayed with help of javascript. Because of the javascript effect, there are some limitations. E.g. images displayed in the slideshow are not all images from the category but only images listed on the site. This is because javascript can display only images listed on the site (of course there is possibility to load all the information about all images from the category to the javascript, but this can slow down the server or stop loading the site because of memory issues). You cannot add any statistics to javascript window, because it is not html (php) etc. Image method does not display Youtube code. If you want to display Youtube video in detail window, you need to use an iframe method.

Images displayed in detail window with help of iframe method are in fact displayed in html (php) - it means, you can add statistics code to this html (e.g. Google Analytics code), pagination can be used - in the iframe, information about current, previous and next images are loaded, so if you click on e.g. next arrow, the whole site is newly loaded. Next image becomes the current image, current image becomes the previous image and new information about next image is loaded. Such way you can display all images from the category in the iframe window and there is no problem with memory as everytime new site is loaded (which is different to javascript methods which do not load the whole site, only the image).
Kind regards,
Benno

Re: Problems when trying to put a YouTube video on my website.

Posted: 19 Mar 2018, 22:13
by jprodriguez
Solved, it was a problem of the detail view that I had selected.

Many thanks.