Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is there a way to show the number of viewers on a website video like youtube has

  • @lynnham

    Participant

    My client would like to be able to know how many times her media videos are getting viewed on her site. Is there a way to add viewing statistics to a video similar to the way youtube has their videos set up?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @henrywright

    Moderator

    Hi @lynnham

    It’s possible as I’ve done it with audio in the past. The play event fires on the <video> element so you could target it like this:

    $( 'video' ).on( 'play', function( event ) {
        // Do your stuff here.
    } );

    ended, playing and pause events are also available if you need to use them.

    @lynnham

    Participant

    @henrywright okay thanks I will give it a try. Word Press is so advanced, its kind of complicated at times.

    @henrywright

    Moderator

    Word Press is so advanced, its kind of complicated at times.

    I agree it can be complicated at times, but if you consider what you’re trying to do, then you could also say that WordPress does a lot of the heavy lifting for us 😀

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there a way to show the number of viewers on a website video like youtube has’ is closed to new replies.
Skip to toolbar