Skip to content
levonkeleman edited this page Jul 17, 2015 · 4 revisions

Services

videoService

field:
this.serviceObject = {this.vidList=[], this.currentVideo={}}
methods:
getVideo(id) Returns video from the server by ID
getVidList() Returns list of all available videos from the server

annotationService

field:
this.annoList = [] List of annotations
methods:
getAnnotations() Returns list of all available annotations from the server

Controllers

mainController

field:
$scope.vidList = [] Video list from videoService

videoController

field:
$scope.vidID Gets ID from the mainView
methods:
nextVideo()Selects next video to be played
prevVideo()Selects previous video to be played
setCurrentVideo(id)Changes currently played video

annotationController

field:
$scope.annoList = []List of annotations from annotationService
methods:
openAnnotation(id)Opens editAnnotationView and sends ID as a $routeParam
addAnnotation()Pauses video, opens editAnnotationView and sends -1 as a $routeParam

editAnnotationController

field:
$scope.annoIDGets annoID from the selected annotation in annotationView
methods:
saveAnnotation()Sends a request to the server to save annotation and updates list of available annotations in annotationService. If $scope.annoID is -1 creates new annotation, otherwise updates existing one
deleteAnnotation(id)sends a request to the server to delete annotation and updates list of available annotations in annotationService

Clone this wiki locally