new EmpFlash( [options] [, ready])
Emp Flash Media Controller - Wrapper for SWF API
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
options |
Object |
<optional> |
Object of options |
ready |
function |
<optional> |
Ready callback function |
Extends
- videojs.Tech
Members
-
<static> entitlementPlayRequest
-
Return the object presentation of the play-request required for the entitlement engine
-
<static> nativeSourceHandler
-
Define source handler options.
These options check whether or not we can playback the source object.
Methods
-
<static> callback(techId, event [, data])
-
Callback method for flash object
Parameters:
Name Type Argument Description techIdString Tech Identifier
eventString Event triggered by flash object
dataObject <optional>
Data associated with event
-
<static> embed(swf, flashVars, params, attributes)
-
Flash embed method.
Parameters:
Name Type Description swfString Path to swf file
flashVarsObject Flash object parameters
paramsObject Flash element parameters
attributesObject Flash element attributes
Returns:
- Type
- HTMLElement
-
<static> getEmbedCode(swf, flashVars, params, attributes)
-
Create flash embed HTML
Parameters:
Name Type Description swfString Path to swf file
flashVarsObject Flash object parameters
paramsObject Flash element parameters
attributesObject Flash element attributes
Returns:
embed code as HTML string
- Type
- String
-
<static> isSupported()
-
Is EMPFlash supported?
Returns:
- Type
- boolean
-
<static> version()
-
Get the installed flash player version
Returns:
- Type
- Array
-
addRemoteTextTrack()
-
Add remote text track
Not supported by the flash object
noop
-
autoPlay()
-
Autoplay
Returns:
- Type
- Boolean
-
bitrate()
-
Get the current average bitrate in bps.
-
bitrates()
-
Returns a list of available bitrates
noop
-
buffered()
-
Get buffered time range
No support by flash object.
Returns:
-
- Type
- TimeRangeObject
-
- Type
- *
-
-
canRestart()
-
Returns true if the playback can be restarted
-
checkAudioTracks()
-
Initializes the audio tracks
-
checkTextTracks()
-
Manually add texttracks to videojs
-
createFlashVars(source, options)
-
Create object with attributes based on source and options
Parameters:
Name Type Description sourceObject Source for playback
optionsTech Tech options
-
currentSrc()
-
Get current source
-
currentTime( [time])
-
Get current time
Parameters:
Name Type Argument Description timeNumber <optional>
Current time of video
Returns:
Current time in seconds
- Type
- Number
-
disableTimeShift(disable)
-
Disables timeshifting for livestreams
Setting this to true, hides the player progress controlbar
Parameters:
Name Type Description disableBoolean -
duration()
-
Get duration
Returns:
duration in seconds
- Type
- Number
-
ended()
-
Returns true if the video has ended
Returns:
- Type
- boolean
-
enterFullScreen()
-
Request to enter fullscreen
Flash does not allow fullscreen through javascript
Returns:
false
- Type
- boolean
-
exitFullScreen()
-
Exit fullscreen
Flash does not allow fullscreen through javascript
Returns:
false
- Type
- boolean
-
featuresPlaybackRate()
-
Removes remote text track
Not supported by the flash object
-
fontBackgroundColor(color)
-
Set subtitle or closed caption font background color
Parameters:
Name Type Description colorString string in hex format
-
fontBackgroundOpacity(opacity)
-
Set subtitle or closed caption font background opacity
Parameters:
Name Type Description opacityNumber value between 0.0 and 2.0
-
fontColor(color)
-
Set subtitle or closed caption font color
Parameters:
Name Type Description colorString string in hex format
-
fontName(name)
-
Set subtitle or closed caption font name
types:
default – Default font type supported by the device.
timesroman
helvetica
courierParameters:
Name Type Description nameString font name
-
fontSize()
-
Set subtitle or closed caption font size
Returns:
size font size
- Type
- Number
-
getAudioTracks()
-
Return all audio tracks
Returns:
audiotracks object
- Type
- Object
-
getBitrate()
-
Get current bitrate
Returns:
bitrate
- Type
- Number
-
getCurrentAudio()
-
Get current audio track/language
Returns:
track language
- Type
- String
-
getMaxBitrate()
-
Get bitrate
Returns:
bitrate in kbps
- Type
- Number
-
handleSource()
-
Handle source
(re)initializes the flash player with the source
-
initWithConfiguration()
-
Initialize player with configuration
Returns:
config Object with parameters
- Type
- Object
-
languageName(language)
-
Returns the name portion of the flash language string
Parameters:
Name Type Description languageString Flash language string
Returns:
- Type
- String
-
liveNow()
-
Jumps to the live edge (now part) of the livestream
-
load()
-
Load media into player
-
loop()
-
Return if looping is on
Returns:
true if looping
- Type
- boolean
-
muted()
-
Get muted
Returns:
- Type
- boolean
-
networkState()
-
Return networkState
Not supported by the flash object
noop
-
pause()
-
Pause method for EmpFlash tech
-
paused()
-
Returns if the player is paused
Returns:
- Type
- Boolean
-
play()
-
Play method for EmpFlash tech
-
playbackRate()
-
Return playback rate
Not supported by the flash object
noop
-
poster()
-
Get poster
noop
-
preload()
-
Returns preload
noop -
program()
-
Get current playing program
Returns:
programId
- Type
- string
-
readyState()
-
Return readyState
Not supported by the flash object
noop
-
remoteTextTrackEls()
-
Return array of remote html track elements
Not supported by the flash object
noop
-
removeRemoteTextTrack()
-
Removes remote text track
Not supported by the flash object
noop
-
reset()
-
Reset the tech
-
seekable()
-
Determine if we can seek in media
Returns:
- Type
- TimeRangeObject
-
seeking()
-
Returns true if the tech is currently seeking
Returns:
true if seeking
- Type
- boolean
-
setAudioTrack(language)
-
Set audio track/language
Parameters:
Name Type Description languageString track language
-
setAutoplay()
-
Set autoplay
Handled by flashvars
noop
-
setControls()
-
Set controls
noop
-
setCurrentAudioTrack(track)
-
Sets the current audio track.
Parameters:
Name Type Description trackAudioTrackList Object with track data
-
setCurrentTime(time)
-
Set current time
Parameters:
Name Type Description timeNumber Current time of video
-
setLoop(loop)
-
Set loop
Parameters:
Name Type Description loopBoolean -
setMaxBitrate(bitrate)
-
Set max bitrate
Setting this to NaN will clear the max bitrate
Parameters:
Name Type Description bitrateNumber in kbps
-
setMuted(mute)
-
Set muted
Parameters:
Name Type Description muteboolean -
setPlaybackRate()
-
Set playback rate
Not supported by the flash object
noop
-
setPoster()
-
Set poster
Poster images are not handled by the EmpFlash player
noop
-
setPreload()
-
Set preload
noop -
setSource( [src])
-
Set video
Parameters:
Name Type Argument Description srcObject <optional>
Source object
-
setVolume(volume)
-
Set volume
Parameters:
Name Type Description volumeNumber between 0 and 1
-
src( [src])
-
Get/set video
Parameters:
Name Type Argument Description srcObject <optional>
Source object
Returns:
- Type
- Object
-
supportsFullScreen()
-
Get fullscreen support
Flash does not allow fullscreen through javascript
Returns:
false
- Type
- Boolean
-
textTracks()
-
Get subtitles
Returns:
Subtitles
- Type
- Object
-
timeShiftEnabled()
-
Get timeShiftEnabled
Returns:
if timeShift is enabled
- Type
- Boolean
-
updateFontSize()
-
Update font size based on player width
-
volume()
-
Get volume
Returns:
volume between 0 and 1
- Type
- Number
EMP Html5 Player