(Quick Reference)
VideoService.
The
com.cantina.lab.VideoService
provides methods for managing
Movie
objects and corresponding files on the filesystem.
This service is non-transactional.
Primary Methods.
The main methods provided by this service for users are as follows:
putMovie
. Saves a new
Movie
domain object, setting its status to
'new'
.
deleteMovie
. Deletes the files on disk for the master movie file, converted movie file, and thumbnail image, then deletes the
Movie
object in the database.
convertVideo
. Converts the master video file for a
Movie
object into the format set in the
'config.video'
property and generates a thumbnail image. Sets the
pathFlv
,
pathThumb
,
size
,
contentType
,
playTime
,
createDate
, and
url
fields of the
Movie
object. Updates the
status
field to 'converted' if successful and 'failed' if not.
convertNewVideo
. Converts videos for all
Movie
objects in the database whose status is
'new'
.
streamFlv
. Streams the flv video for a
Movie
object. The first argument is
Map
containing either a
pos
entry for the jw-flv player or a
start
entry for the flowplayer as the position to stream from. The second is the
HttpServletRequest
. The third is the
HttpServletResponse
. The fourth is the
Movie
object whose content should be streamed.
streamMp4
. Streams the mp4 video for a
Movie
object. The first argument is an unused params maps. The second is the
HttpServletRequest
. The third is the
HttpServletResponse
. The fourth is the
Movie
object whose content should be streamed.