Required X1 JavaScript API methods for X1 Applications

    Required X1 JavaScript API methods for X1 Applications


    Article summary

    Required X1 JavaScript API methods for X1 Apps

    The following methods must be called as specified below.


    appActionMetricsHandler()

    Must be called whenever a user is interacting with content (playing a game, listening to music, watching a video).


    errorMetricsHandler()

    Must be called to support the Error Free Session Rate metric:

    MetricDefinitionMethodologyRequirement
    Error Free Session Rate (EFSR)The number of Error Free Sessions divided by the total number of sessions over a given 4hr time period.

    An error free session is any App session in which there were zero user-detectable errors (inclusive of errors which do not display an error message)
    Error-free session count
    รท
    Total session count
    Greater than 95% over a 4hr period (min 1000 launches)


    dismissLoadingScreen()

    Must be called when your X1 App has loaded and is minimally useable (defined as being able to do the core function it was meant to do such as play media, display photos, etc.)


    showToaster()

    If a customer launches content from a deep link, the showToaster method must be called when the final credits start; the notification that another asset is about to autoplay appears; or the video asset is 15 seconds from completion.


    This only applies to the first asset played in a session.


    shutdown()

    Must be called any time a user has pressed the LAST key on their remote when the X1 App is at the top of its view stack. Must be called anywhere the X1 App would have normally called window.close().


    Was this article helpful?