Home Manual Reference Source Test
public class | source

NetflixPage

Extends:

Page → NetflixPage

Netflix Page

Method Summary

Public Methods
public

registerPlayer(element: *): *

Inherited Summary

From class Page
public

document: Document

The current document to keep as context

public

elements: Object<string, HTMLElement>

Upon load of a page this property can be used by providers to cache html elements that are likely to be used repeatedly.

public

Current Host to trigger changes

public

Current Playback on the page

public

An array holding all Players present in the page

private

_changesObserver: MutationObserver

An observer to trigger change events on the host use observeForChanges to add elements

private

_mediaObserver: MutationObserver

An observer for added media elements use observeForMedia to observer elements

public

Search DOM for any <video> or <audio> elements

public

Get the playbacks active player

public

Get the page's favicon

public

Get the page's title

public

observeForChanges(element: Element, options: MutationObserverInit)

Set element to be observed by this._changesObserver by default check for any changes to itself or it's children

public

observeForMedia(element: Element)

Set element to be observed by this._mediaObserver

public

onMutate(mutations: Array<MutationRecord>)

Callback called by this._mediaObserver Given an array of mutations check if there where any added nodes that are media

public

registerPlayer(element: *): boolean

Take the element and add it to the list of players if it's not already there

Use when detecting a new element on the DOM

If the element is playing it will be set as the active player.

public

Set the playback's active player

Public Methods

public registerPlayer(element: *): * source

Take the element and add it to the list of players if it's not already there

Use when detecting a new element on the DOM

If the element is playing it will be set as the active player.

Override:

Page#registerPlayer

Params:

NameTypeAttributeDescription
element *

Return:

*