telemetry.page.actions.play
index
telemetry/page/actions/play.py

A Telemetry page_action that performs the "play" action on media elements.
 
Media elements can be specified by a selector attribute. If no selector is
defined then then the action attempts to play the first video element or audio
element on the page. A selector can also be 'all' to play all media elements.
 
Other attributes to use are: wait_for_playing and wait_for_ended, which forces
the action to wait until playing and ended events get fired respectively.

 
Modules
       
telemetry.core.exceptions
telemetry.page.actions.media_action
telemetry.page.actions.page_action

 
Classes
       
telemetry.page.actions.media_action.MediaAction(telemetry.page.actions.page_action.PageAction)
PlayAction

 
class PlayAction(telemetry.page.actions.media_action.MediaAction)
    
Method resolution order:
PlayAction
telemetry.page.actions.media_action.MediaAction
telemetry.page.actions.page_action.PageAction
__builtin__.object

Methods defined here:
RunAction(self, page, tab)
WillRunAction(self, page, tab)
Load the media metrics JS code prior to running the action.
__init__(self, attributes=None)

Methods inherited from telemetry.page.actions.media_action.MediaAction:
HasEventCompletedOrError(self, tab, selector, event_name)
LoadJS(self, tab, js_file_name)
Loads and executes a JS file in the tab.
WaitForEvent(self, tab, selector, event_name, timeout)
Halts media action until the selector's event is fired.
 
Args:
  tab: The tab to check for event on.
  selector: Media element selector.
  event_name: Name of the event to check if fired or not.
  timeout: Timeout to check for event, throws an exception if not fired.

Methods inherited from telemetry.page.actions.page_action.PageAction:
BindMeasurementJavaScript(self, tab, start_js, stop_js)
Let this action determine when measurements should start and stop.
 
A measurement can call this method to provide the action
with JavaScript code that starts and stops measurements. The action
determines when to execute the provided JavaScript code, for more accurate
timings.
 
Args:
  tab: The tab to do everything on.
  start_js: JavaScript code that starts measurements.
  stop_js: JavaScript code that stops measurements.
CanBeBound(self)
If this class implements BindMeasurementJavaScript, override CanBeBound
to return True so that a test knows it can bind measurements.
CleanUp(self, page, tab)
CustomizeBrowserOptionsForPageSet(self, options)
Override to add action-specific options to the BrowserOptions
object. These options will be set for the whole page set.
 
If the browser is not being restarted for every page in the page set then
all browser options required for the action must be set here. This, however,
requires that they do not conflict with options require by other actions
used up by the page set.
GetActiveRangeOnTimeline(self, timeline)
RunActionAndMaybeWait(self, page, tab)
WillWaitAfterRun(self)

Static methods inherited from telemetry.page.actions.page_action.PageAction:
ResetNextTimelineMarkerId()

Data descriptors inherited from telemetry.page.actions.page_action.PageAction:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)