Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Chris

    (@zenation)

    Good catch. You can’t! I will implement an autoplay=true option next week, I promise.

    Thread Starter nicktechtt

    (@nicktechtt)

    thanks a lot, looking forward to it.

    Plugin Author Chris

    (@zenation)

    There it is – v1.6.8

    Shortcode: [… autoplay=”true”]

    PHP:

    /* Do your configuration */
      $data     = $RytvAPI->validateConfiguration(
        array(
         'relation' => 'postTitle',
         'max'      => '3',
         'width'    => 150,
         'height'   => 150,
         'lang'     => 'en',
         'region'   => 'de',
         'class'    => 'left center inline bg-black',
         'preview'  => false,
         'autoplay' => true
        )
      );

    Autoplay does not work in preview mode and will be overruled when ‘preview’ is set to true.

    Thread Starter nicktechtt

    (@nicktechtt)

    Thanks a million Chris everything is now perfect

    Thread Starter nicktechtt

    (@nicktechtt)

    Oh sorry one last thing is there any way to get the first two or three lines of the video description below the video? I hope it’s not too far fetched!

    Plugin Author Chris

    (@zenation)

    I’m not quite sure what you mean exactly. You can set showVideoDescripton="true" to view the description as long as YouTube is sending it.

    If there is a description it comes a) automatically shortened by YT and b) as plain text. As far as I can see it also does not contain carriage return characters \r or new line characters \n. So detecting separate lines is not possible.

    And the plugin itself does not have some kind of filter or hook that can be applied to the content easily. You would either have to use Javascript to, for example, cut off the text after a certain number of characters/words. Or you would have to write your own PHP template.

    ...
      /* Search YouTube. */
      $results  = $RytvAPI->searchYouTube( $data );
    
      /* Custom PHP Template */
      foreach( $results as $video ) {
        ...do your own operations...
      }
    Thread Starter nicktechtt

    (@nicktechtt)

    ok thanks I did not know that

    Thread Starter nicktechtt

    (@nicktechtt)

    resolved

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to make videos autoplay’ is closed to new replies.