Support & information center

rtcEvent()

Add a vertical event line on graphs shown.

rtcEvent() can be used to mark certain actions taken by the test script to find out how they affect the media transmission. It works well with conjunction with rtcSetNetworkProfile().

rtcEvent() can also be used alongside .rtcSetEventsExpectation() and using .rtcSetCustomEventsExpectation(). You can read more about it on event based test expectations.

Arguments

NameTypeDescription
event namestringThe name given to the event. This name will appear when you hover on the horizontal line in the graph
event typestring“local” or “global”:

 

  • local – if you want the horizontal line for the event to appear only on the graphs of the probe who added the event (recommended)
  • global – if you want the horizontal line for the event to appear on all graphs of all probes as well as the high level graphs. It is recommended to use that for a limited number of events, preferably 1 or 2 in the whole test scenario, otherwise, it will clutter the graphs too much

Code examples

client
    // Limit network
    .rtcEvent('throttle', 'global')
    .rtcSetNetworkProfile('Poor 3G')

    // In the session
    .pause(30000)
    .rtcScreenshot('hi there 2')
    .pause(30000)
    
    // Back to normal
    .rtcSetNetworkProfile('') // back to pristine network conditions
    .rtcEvent('unthrottle', 'global');
Code language: JavaScript (javascript)

Was this article helpful?

Related Articles