Commit 8e5a63c4 by Awais Jibran

Videos should emit `stop_video` event once the video segment is compelte.

TNL-2008
parent 75d37591
...@@ -49,7 +49,8 @@ function (HTML5Video, Resizer) { ...@@ -49,7 +49,8 @@ function (HTML5Video, Resizer) {
update: update, update: update,
figureOutStartEndTime: figureOutStartEndTime, figureOutStartEndTime: figureOutStartEndTime,
figureOutStartingTime: figureOutStartingTime, figureOutStartingTime: figureOutStartingTime,
updatePlayTime: updatePlayTime updatePlayTime: updatePlayTime,
logStopVideo:logStopVideo
}; };
VideoPlayer.prototype = methodsDict; VideoPlayer.prototype = methodsDict;
...@@ -348,6 +349,8 @@ function (HTML5Video, Resizer) { ...@@ -348,6 +349,8 @@ function (HTML5Video, Resizer) {
this.trigger('videoProgressSlider.notifyThroughHandleEnd', { this.trigger('videoProgressSlider.notifyThroughHandleEnd', {
end: true end: true
}); });
// Emit `stop_video` event
this.videoPlayer.logStopVideo();
} }
} }
} }
...@@ -531,12 +534,7 @@ function (HTML5Video, Resizer) { ...@@ -531,12 +534,7 @@ function (HTML5Video, Resizer) {
function onEnded() { function onEnded() {
var time = this.videoPlayer.duration(); var time = this.videoPlayer.duration();
this.videoPlayer.log( this.videoPlayer.logStopVideo();
'stop_video',
{
currentTime: this.videoPlayer.currentTime
}
);
this.trigger('videoControl.pause', null); this.trigger('videoControl.pause', null);
this.trigger('videoProgressSlider.notifyThroughHandleEnd', { this.trigger('videoProgressSlider.notifyThroughHandleEnd', {
...@@ -593,6 +591,15 @@ function (HTML5Video, Resizer) { ...@@ -593,6 +591,15 @@ function (HTML5Video, Resizer) {
this.videoPlayer.player.setPlaybackQuality(value); this.videoPlayer.player.setPlaybackQuality(value);
} }
function logStopVideo(){
this.videoPlayer.log(
'stop_video',
{
currentTime: this.videoPlayer.currentTime
}
);
}
function onPlaybackQualityChange() { function onPlaybackQualityChange() {
var quality; var quality;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment