• M C

    (@mcyger)


    Your plugin looks fantastic, and exactly what I’m looking for.

    However, some of my articles have embedded YouTube videos. Is there any way to include the video duration within the “reading time” calculation of the plugin?

    I’d even be fine if there was a way for me to manually add a meta field to the post/page with the duration that could then be added to the plugin calculation. (Of course, ideally, I’d prefer not to do that.)

    Thank you for your assistance in advance!

Viewing 1 replies (of 1 total)
  • Plugin Author Jason Yingling

    (@yingling017)

    There’s nothing at the moment to auto add video length to the reading time, but I’ll make a note of it for a future feature.

    Right now the best way to do it would be to add to the word count using the rtwp_filter_wordcount filter.

    function add_to_reading_time( $word_count ) {
        $word_count += $addl_video_time_in_words;
    
        return $word_count;
    }
    add_filter( 'rtwp_filter_wordcount', 'add_to_reading_time', 10, 1 );
    

    If you stored your video time as post meta you could get that as $addl_video_time_in_words.

Viewing 1 replies (of 1 total)
  • The topic ‘Including Embedded Video Watch Time’ is closed to new replies.