WordPress.org

Forums

YouTube Embed
Make the video start playing at a specific time (9 posts)

  1. DRAGUIAN
    Member
    Posted 3 years ago #

    Hi, overall it's a great plugin I was just wondering if there was any way for the video to start playing at a selected time. As in instead of starting at 0:0 it should start at 2 mins and 30 seconds. For example if I inserted this url http://www.youtube.com/watch?v=-0Xa4bHcJu8&t=1m0s
    It would start playing at 1:00

    http://wordpress.org/extend/plugins/youtube-embed/

  2. dartiss
    Member
    Plugin Author

    Posted 3 years ago #

    This is already covered in the instructions - there is a parameter of "start" which does just this. Simple state the number of seconds. e.g.

    [youtube start=60]0Xa4bHcJu8[/youtube]

    David.

  3. DRAGUIAN
    Member
    Posted 3 years ago #

    Sorry about that and thank you.

  4. kenitech
    Member
    Posted 2 years ago #

    This won't work for user comments though for auto embed. Any ideas there? I'm looking at the code now. I assume the param will have to be parsed and changed into the 'start' param.

    Also note for a while I've been instructing people to use the "#t=0m0s" syntax but it looks like youtube now supports as a non-hash tag param: "&t=0m0s"

  5. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    I'll look into it, although I don't really support any commands via the comment - this allows the site owner to control everything via a profile.

    David.

  6. kenitech
    Member
    Posted 2 years ago #

    With a little "outsourcing" from stackoverflow, somebody whipped up a nice regex script for me that will parse out the times and allow me to convert to seconds. I plan on adding this to the function aye_filter_comments() in aye-update-post-content.php

    Then I can pass the seconds off to aye_generate_youtube_code()

    http://stackoverflow.com/questions/11351006/extract-minutes-and-seconds-ex-02m12s-from-youtube-url-param

  7. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    I'll look at adding that to the next release.

  8. KeithHopkin
    Member
    Posted 2 years ago #

    Great!

    Something to point out though that I'm noticing as I implement this on my site. All of the youtube embeds on the page are slowing the overall page load time. Users like to post multiple videos on my site. So right now some of the posts have 8-10 videos.

    In my mind, the ideal situation would be a link that calls a function to insert/load the iframe. This would be more or less outside the scope of this plugin though since the main functionality would be on the client side.

  9. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    This is actually I'm thinking of maybe implementing on a later release - an easy way for a user to display a video on request. So they could, say, have a thumbnail which, when clicked on, would then add the code for the video. The former part would need to be user created and I'd add in some easy way to implement the latter bit.

    Still needs some thinking about, though ;)

    David.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.