Stirlitz Media Logger - Server
Using webPlayer in other web aplications

SML web Player can be integrated into another web application using JavaScript API

 

sample: http://smlserver/player/embeddedplayertest.html

(replace http://smlserver/ with address of you working server)

 

Required import:

<script src="http://smlserver/player/embeddedplayer.js">
 

Setting options:

//default value is false for all fields listed below

sml.config.showTimelineSeconds=true;   //displays Timeline - seconds bar
sml.config.showTimelineMinutes=true;   //displays Timeline - minutes bar
sml.config.showTimelineHours=true;   //displays Timeline - hours bar
sml.config.showTimelineDays=true;   //displays Timeline - days bar
sml.config.showTimelineMonths=true;   //displays Timeline - months bar
sml.config.showStationName=true;   //displays station name
sml.config.showDate=true;   //displays calendar
sml.config.showTime=true;    //displays current play time
sml.config.showTimezone=true;   //displays timezone field
sml.config.showPlayButton=true;   //displays default Play button
sml.config.showStopButton=true;   //displays default Stop button
sml.config.showFullscreenButton=true;   //displays default video full screen button
sml.config.showLinkButton=true;   //displays button showing URL to current position
sml.config.showTracksButtons=true;   //displays video tracks list
sml.config.showExport=true;   //displays export controls
sml.config.showAudioTracks=true;   //displays audio tracks list
sml.config.showExitButton=true;   //displays button exiting to default station list
sml.config.showMetadata=true;   //displays metadata

Functions:

sml.setStation (station, date);   //select station and seek to time given
sml.play();   //start playback
sml.pause();   //pause playback
sml.seek(date);   //seek to given Date
sml.readPosition();   //return current playback position
sml.exportMp4ToServer(begin,end,callback);   //execute server side export for current station, from begin to end