vvvmax / unitegallery

Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:
http://unitegallery.net
MIT License
530 stars 158 forks source link

Take action when video starts playing #103

Open waldozevenster opened 8 years ago

waldozevenster commented 8 years ago

Hi, I might be missing something completely but how can I make use of the UGVideoPlayer events and take action when one of them triggers.

Example, when a video starts playing I want to send an ajax request to the server to count how many times it has been played.

Also want to know when it ended etc so to be able to listen and take action on any of these events would be super helpful (mainly just the start, stop and end): this.events = { SHOW: "video_show", HIDE: "video_hide", PLAY_START: "video_play_start", PLAY_STOP: "video_play_stop", VIDEO_ENDED: "video_ended" };

Is there something existing for this?

vvvmax commented 8 years ago

HI, in short, you shoule have them in API. You can look how the API works, and add the events you want there. I already has some of the events, if you want more events you can try to add them there.

On Wed, Aug 24, 2016 at 11:17 AM, waldozevenster notifications@github.com wrote:

Hi, I might be missing something completely but how can I make use of the UGVideoPlayer events and take action when one of them triggers.

Example, when a video starts playing I want to send an ajax request to the server to count how many times it has been played.

Also want to know when it ended etc so to be able to listen and take action on any of these events would be super helpful (mainly just the start, stop and end): this.events = { SHOW: "video_show", HIDE: "video_hide", PLAY_START: "video_play_start", PLAY_STOP: "video_play_stop", VIDEO_ENDED: "video_ended" };

Is there something existing for this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vvvmax/unitegallery/issues/103, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_K_k7kxfZTkqAiySB9UdzAt7kerKqLks5qi_4ngaJpZM4JrwJL .

macauhome commented 4 years ago

waldozevenster, please how to use UGVideoPlayer thanks