• Resolved dbrecknell

    (@dbrecknell)


    I would like to show excerpts of YouTube videos by appending “?start=xxx&end=yyy” (where xxx and yyy represent start and end times in seconds) to the url. However, the “Add video” button removes this information. I’m sure lots of people would like to do this. Is there a way of doing this at present?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author totalsoft

    (@totalsoft)

    Hello, daer dbrecknell.

    Thank you for contacting us!

    Yes, we have such an opportunity in the gallery. Please, when you add a link from YouTube after the link, add this symbol =&start=20&end=40. 20 number can be changed. This means from what second do you want the video starts. This means from what second do you want the video ends.

    Have a good day!

    Sincerely, Total-Soft

    Thread Starter dbrecknell

    (@dbrecknell)

    Thank you for your reply.
    Unfortunately, I have had no success adding the extra text you suggested to the video URL.

    Did I follow the correct procedure:
    1. In Video manager, I clicked the Edit button for the gallery, and then the edit button for the video whose URL I wanted to update
    2. I clicked on the Add video button on the AddVideo form. This opened the Add media page of the Media Library
    3. I clicked on “Insert from URL” and pasted in the modified URL
    4. I was returned to the Add Video form of the Video editor, but the URL which appeared did not include the added text.

    The video when test started from the beginning.

    I also tried replacing the “=” with “?”at the beginning of the text you suggested I add – this is what a web search suggested the correct syntax should be.

    I look forward to your further suggestions.

    Plugin Author totalsoft

    (@totalsoft)

    Daer dbrecknell.

    I am very sorry that you are having a problem with the video gallery.

    Edit our gallery file Total-Soft-Gallery-Video-Admin.js. Please add this code on line 164.

    ` var youtube_time=”;
    if(code.indexOf(‘www.youtube.com/’) > 0) {
    if(code.indexOf(‘start’) > 0) {
    youtube_time=code.split(‘?’)[1];
    youtube_time = ‘?’+youtube_time.split(‘[/embed]‘)[0]
    }`

    Then save the gallery file.

    Edit our Total-Soft-Gallery-Video-Admin.js file. Find code in line 183 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]);

    Please edit the code and write like this.

    data-poster="<?php echo $TS_GV_EG_PSR; ?>" onclick="TotalsoftLink<?php echo $Total_Soft_Gallery_Video; ?>('<?php echo $Total_Soft_GalleryV_Videos[$i]->TotalSoftGallery_Video_VLink; ?>',<?php echo $i + 1; ?>)"

    Find code in line 210 and change

    jQuery(‘#TotalSoftGallery_Video_URL_2’).val(‘https://www.youtube.com/embed/&#8217; + TotalSoftCodeSrc[0]);

    Please edit the code and write like this.

    jQuery(‘#TotalSoftGallery_Video_URL_2’).val(‘https://www.youtube.com/embed/&#8217; + TotalSoftCodeSrc[0]+youtube_time);

    • This reply was modified 3 years ago by totalsoft.
    • This reply was modified 3 years ago by totalsoft.
    Plugin Author totalsoft

    (@totalsoft)

    Find code in line 237 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]);

    Please edit the code and write like this.

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]+youtube_time);

    Find code in line 270 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]);

    Please edit the code and write like this.

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]+youtube_time);

    Find code in line 299 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodeSrc[0]);

    Please edit the code and write like this.

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodeSrc[0]+youtube_time);

    • This reply was modified 3 years ago by totalsoft.
    Plugin Author totalsoft

    (@totalsoft)

    Find code in line 334 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodeSrc[0]);

    Please edit the code and write like this.

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodeSrc[0]+youtube_time);

    Find code in line 366 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]);

    Please edit the code and write like this.

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodes3[1]+youtube_time);

    Find code in line 395 and change

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodeSrc[0]);

    Please edit the code and write like this.

    jQuery('#TotalSoftGallery_Video_URL_2').val('https://www.youtube.com/embed/' + TotalSoftCodeSrc[0]+youtube_time);

    Thread Starter dbrecknell

    (@dbrecknell)

    Thanks for your reply – you have obviously put some work into solving my problem. However, I have no experience with Javascript or its syntax, so I don’t feel competent to make the changes you suggested.

    Is the any chance you could send me the modified JS file, by uploading to https://tinyurl.com/2p888rve ?

    Thanks again.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Video start and stop times’ is closed to new replies.