Closed innoflash closed 4 years ago
@imanghafoori1 can you merge this PR? I was going to implement this myself to manage who's watching and who's not the videos and which percentage each one has stopped. I know someone could fast-forward it to the end, but at least it's one more layer. =)
@innoflash Could you please provide some documentation about the new feature, thank you.
The newer functionalities are pretty straight-forward.
There are 2 new events (VideoStreamStarted
, VideoStreamEnded
) that carries video information (size, path, percentage watched, etc), so now if you want to keep track of which user is watching what, you can create your own event listeners and listen to VideoStreamStarted
and VideoStreamEnded
, calculate how many seconds it was watched, do things like calculate the video length and the watched length to see if the user just fast-forward, if he paused to take some notes, etc.
The only thing I would commit on top of this merged PR is the removal of the line 30 of VideoStreamStarted
: info('video ended');
.
Please send pull requests as I am so busy these days. Thanks ;)
Perhaps uses have some actions to do when video start and end streaming.
Just added 2 events that they can listen to:
VideoStreamStarted
VideoStreamEnded
Users can listen to those in their project