<html5mediaview>
Abstract base class to support HTML5 video and audio playback.

JavaScript: lz.html5mediaview
extends <view> » <node> » lz.Eventable »

See <html5videoview> and <html5audioview>

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
autobuffer boolean boolean true read/write
  A Boolean value that gives a hint to the browser that it should automatically buffer media when the webpage is loaded. If true (the default), the media data is automatically buffered; otherwise, it is not. Availability
autoplay boolean boolean false read/write
  A Boolean value that determines whether the media resource plays automatically when available.
buffered expression any   read/write
  The time ranges of the media resource that have been downloaded. (read-only) readonly
controls boolean boolean true read/write
  A Boolean value that determines whether the playback controls appear.
currentTime number Number 0 read/write
  The current playback position in seconds.
defaultPlaybackRate number Number 1.0 read/write
  The default rate used to play the media resource. The value of this property is a multiple of the media resource’s intrinsic speed. The default value is 1.0.
duration number Number 0 read/write
  The length of the media resource in seconds. (read-only) This property is 0 if there is no media data available. This property is NaN if the duration is unknown. The value is positive infinity if the duration is known but is indefinite—for example, a live stream.
end number Number   read/write
  Specifies the time at which an audio or video element will stop playing. If this attribute is not specified, the media element will play to completion.
ended boolean boolean   read/write
  A Boolean value that indicates whether the media played to the end. (read-only) If true, the video played to the end; otherwise, it did not.
error expression any   read/write
  The last error that occurred for this element. (read-only)
loop boolean boolean   read/write
  A Boolean value that determines whether the playback should loop.
__media expression any null read/write
  the HTML5 native media playback object @keywords private
muted boolean boolean   read/write
  A Boolean value that determines whether the audio content should be muted.
networkState expression any   read/write
  The state of downloading the media resource. (read-only)
paused expression any   read/write
  A Boolean value that indicates whether the media is paused. (read-only)
playbackRate number Number 1.0 read/write
  The speed that the media resource is playing. The value of this property is a multiple of the media resource’s intrinsic speed. If set to 0.0, a NOT_SUPPORTED_ERR DOM exception is raised. The default value is 1.0.
played expression any   read/write
  The ranges of the media resource that was played. (read-only)
ready boolean boolean false read/write
  Sent when the media element is ready to accept commands; On iOS, you need to wait for this event before setting the media sources and other attributes, due to a delay in rendering the element in the browser
readyState expression any   read/write
  The ready state of the media resource. (read-only)
src string String   read/write
  The URI address of the media resource to play.
startTime expression any   read/write
  The earliest possible time in seconds to start playback. (read-only)
volume number Number   read/write
  The volume of the audio portion of the media element. The value of this property must be in the range from 0.0 (silent) to 1.0 (loudest); otherwise, a INDEX_SIZE_ERR DOM exception is raised. The default value is 1.0.

Class Attributes

Name (CSS property) Type (tag) Type (js) Default Category
HAVE_CURRENT_DATA expression any 2 unknown
  HAVE_CURRENT_DATA Data for the current playback position is available, but not enough to begin playback. @keywords private
HAVE_FUTURE_DATA expression any 3 unknown
  HAVE_FUTURE_DATA Enough data is available to begin playback. @keywords private
HAVE_NOTHING expression any 0 unknown
  HAVE_NOTHING No media data is available for playback at the current time. @keywords private

Methods

addSource()
html5mediaview.addSource(url, mimetype, codecs);
Parameter Name Type Description
url    
mimetype    
codecs    

canPlayType()
html5mediaview.canPlayType(mtype);
Returns whether the media element supports the specified MIME type. DOMString canPlayType (in DOMString type); Return Value The possible string values are: “no”, “probably” and “maybe”.
Parameter Name Type Description
mtype    

construct()
html5mediaview.construct(parent, args);
Parameter Name Type Description
parent    
args    

getCurrentSrc()
html5mediaview.getCurrentSrc();
The absolute URL of the media resource. (read-only)

load()
html5mediaview.load();
Starts loading the media resource.

pause()
html5mediaview.pause();
Pauses the media playback if in progress.

play()
html5mediaview.play();
Begins playing the media resource.

_readyDelay()
html5mediaview._readyDelay();

removeSources()
html5mediaview.removeSources();
removes all video sources
Parameter Name Type Description
   

seekable()
html5mediaview.seekable();
The ranges that can be played in a nonlinear fashion. (read-only)

seeking()
html5mediaview.seeking();
A Boolean value that indicates whether the element is seeking. (read-only)

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Name Description
onabort Sent when the browser stops fetching the media data before the media resource was completely downloaded.
oncanplay Sent when the browser can resume playback of the media data,
oncanplaythrough Sent when the browser estimates that if playback is started now, the media resource could be rendered
onemptied Sent when the media element network state changes to the NETWORK_EMPTY state.
onended Sent when playback has stopped at the end of the media resource and the ended property is set to true.
onerror Sent when an error occurs while fetching the media data. Use the error property to get the current error.
onloadeddata Sent when the browser can render the media data at the current playback position for the first time.
onloadedmetadata Sent when the browser knows the duration and dimensions of the media resource.
onloadstart Sent when the browser begins loading the media data.
onpause Sent when playback pauses after the pause method returns.
onplay Sent when playback starts after the play method returns.
onplaying Sent when playback starts.
onprogress Sent when the browser is fetching the media data.
onratechange Sent when either the defaultPlaybackRate or the playbackRate property changes.
onreadystatechange Sent when the ready-state changes
onseeked Sent when the seeking property is set to false
onseeking Sent when the seeking property is set to true and there is time to send this event.
onstalled Sent when the browser is fetching media data but it has stopped arriving.
onsuspend Sent when the browser suspends loading the media data and does not have the entire media resource downloaded.
ontimeupdate Sent when the currentTime property changes as part of normal playback or because of some other condition.
onvolumechange Sent when either the volume property or the muted property changes.
onwaiting Sent when the browser stops playback because it is waiting for the next frame.

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy