Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/av/_Media.js

  • Provides:

    • dojox.av._Media
  • dojox.av._Media

    • type
      Function
    • summary
      Used as a mixin for dojox and AIR media
    • description
      Calculates the current status of the playing media and fires
      the appropriate events.
  • dojox.av._Media.mediaUrl

    • type
      String
  • dojox.av._Media.initialVolume

    • optional
    • type
      Float
    • summary
      The initial volume setting of the player. Acccepts between 0 and 1.
  • dojox.av._Media.autoPlay

    • optional
    • type
      Boolean
    • summary
      Whether the video automatically plays on load or not.
  • dojox.av._Media.bufferTime

    • optional
    • type
      Number
    • summary
      Time in milliseconds that the video should be loaded before it will
      play. May pause and resume to build up buffer. Prevents stuttering.
      Note:
      Older FLVs, without a duration, cannot be buffered.
  • dojox.av._Media.minBufferTime

    • type
      Number
    • summary
      Time in milliseconds bwteen the playhead time and loaded time that
      will trigger the buffer. When buffer is triggered, video will pause
      until the bufferTime amount is buffered.
      Note: Should be a small number, greater than zero.
  • dojox.av._Media.updateTime

    • type
      Number
    • summary
      How often, in milliseconds to get an update of the video position.
  • dojox.av._Media.id

    • optional
    • type
      String
    • summary
      The id of this widget and the id of the SWF movie.
  • dojox.av._Media.isDebug

    • optional
    • type
      Boolean
    • summary
      Setting to true tells the SWF to output log messages to Firebug.
  • dojox.av._Media.percentDownloaded

    • type
      read-only-Number
    • summary
      The percentage the media has downloaded; from 0-100
  • dojox.av._Media._flashObject

    • type
      read-only-Object
    • summary
      The dojox.embed object
  • dojox.av._Media.flashMedia

    • type
      read-only-SWF
    • summary
      The SWF object. Methods are passed to this.
  • dojox.av._Media.allowScriptAccess

    • type
      String
    • summary
      Whether the SWF can access the container JS
  • dojox.av._Media.allowNetworking

    • type
      String
    • summary
      Whether SWF is restricted to a domain
  • dojox.av._Media.wmode

    • type
      String
    • summary
      The render type of the SWF
  • dojox.av._Media.allowFullScreen

    • type
      Boolean
    • summary
      Whether to allow the SWF to go to fullscreen
  • dojox.av._Media._initStatus

    • summary
      Connect mediaStatus to the media.
    • type
      Function
  • dojox.av._Media.status

    • type
      String
  • dojox.av._Media._positionHandle

    • type
      Object
  • dojox.av._Media.getTime

    • returns
      Float
    • summary
      Returns the current time of the video
      Note:
      Consider the onPosition event, which returns
      the time at a set interval. Too many trips to
      the SWF could impact performance.
    • type
      Function
  • dojox.av._Media.onLoad

    • parameters:
      • mov: (typeof SWF)
    • summary
      Fired when the SWF player has loaded
      NOT when the video has loaded
    • type
      Function
  • dojox.av._Media.onDownloaded

    • parameters:
      • percent: (typeof Number)
    • summary
      Fires the amount of that the media has been
      downloaded. Number, 0-100
    • type
      Function
  • dojox.av._Media.onClick

    • parameters:
      • evt: (typeof Object)
    • summary
      TODO: Return x/y of click
      Fires when the player is clicked
      Could be used to toggle play/pause, or
      do an external activity, like opening a new
      window.
    • type
      Function
  • dojox.av._Media.onSwfSized

    • parameters:
      • data: (typeof Object)
    • summary
      Fired on SWF resize, or when its
      toggled between fullscreen.
    • type
      Function
  • dojox.av._Media.onMetaData

    • parameters:
      • data: (typeof Object)
      • evt: (typeof Object)
    • summary
      The video properties. Width, height, duration, etc.
      NOTE: 	if data is empty, this is an older FLV with no meta data.
      Duration cannot be determined. In original FLVs, duration
      could only be obtained with Flash Media Server.
      NOTE: 	Older FLVs can still return width and height
      and will do so on a second event call
    • type
      Function
  • dojox.av._Media.duration

  • dojox.av._Media.onPosition

    • parameters:
      • time: (typeof Float)
    • summary
      The position of the playhead in seconds
    • type
      Function
  • dojox.av._Media.onStart

    • parameters:
      • data: (typeof Object)
    • summary
      Fires when video starts
      Good for setting the play button to pause
      during an autoPlay for example
    • type
      Function
  • dojox.av._Media.onPlay

    • parameters:
      • data: (typeof Object)
    • summary
      Fires when video starts and resumes
    • type
      Function
  • dojox.av._Media.onPause

    • parameters:
      • data: (typeof Object)
    • summary
      Fires when the pause button is clicked
    • type
      Function
  • dojox.av._Media.onEnd

    • parameters:
      • data: (typeof Object)
    • summary
      Fires when video ends
      Could be used to change pause button to play
      or show a post video graphic, like YouTube
    • type
      Function
  • dojox.av._Media.onStop

    • summary
      Fire when the Stop button is clicked
      TODO: 	This is not hooked up yet and shouldn't
      fire.
    • type
      Function
  • dojox.av._Media.onBuffer

    • parameters:
      • isBuffering: (typeof Boolean)
    • summary
      Fires a boolean to tell if media
      is paused for buffering or if buffering
      has finished
    • type
      Function
  • dojox.av._Media.isBuffering

  • dojox.av._Media.onError

    • parameters:
      • data: (typeof Object)
      • url: (typeof String)
    • summary
      Fired when the player encounters an error
    • example
       console.warn("ERROR-"+data.type.toUpperCase()+":",
      		data.info.code, " - URL:", url);
    • type
      Function
  • dojox.av._Media.onStatus

    • parameters:
      • data: (typeof Object)
    • summary
      Simple status
    • type
      Function
  • dojox.av._Media.onPlayerStatus

    • parameters:
      • data: (typeof Object)
    • summary
      The status of the video from the SWF
      playing, stopped, bufering, etc.
    • type
      Function
  • dojox.av._Media.onResize

    • type
      Function
  • dojox.av._Media._figureStatus

    • summary
      Calculate media status, based on playhead movement, and
      onStop and onStart events
      TODO:
      Figure in real status from the media for more accurate results.
    • type
      Function
  • dojox.av._Media._prevPos

  • dojox.av._Media._prevStatus

  • dojox.av._Media._eventFactory

    • returns
      Object
    • summary
      Creates a generic event object.
    • type
      Function
  • dojox.av._Media._sub

    • parameters:
      • topic
      • method
    • summary
      helper for subscribing to topics
    • type
      Function
  • dojox.av._Media._normalizeVolume

    • parameters:
      • vol
    • summary
      Ensures volume is less than one
    • type
      Function
  • dojox.av._Media._normalizeUrl

    • parameters:
      • _url
    • summary
      Checks that path is relative to HTML file or
      convertes it to an absolute path.
    • type
      Function
  • dojox.av._Media.destroy

    • summary
      destroys flash
    • type
      Function
  • dojox.av

    • type
      Object
  • dojox

    • type
      Object