GreenView

GreenView class.

Constructor

new GreenView(player?, meta?)

GreenView constructor.

Parameters:
NameTypeDescription
player?Object

Reference to video HTML object or JavaScript player object.

meta?Meta

Device related details.

Methods

setElementLayer(div)

Allows to provide a custom DOM <div> node element that brightness will be set on.

This <div> should be positioned in responsability outside of GreenView. GreenView will apply brightness settings to this element only.

Calling this function as setElementLayer(null) will tell GreenView to set brightness internally again instead. GreenView will not remove the element itself.

Parameters:
NameTypeDescription
divNode

The div node element that GreenView will use.

useGreenView(enable, cbopt)

Controls status of GreenView mode.

Will apply a fullscreen layer with default opacity.

Parameters:
NameTypeAttributesDescription
enableboolean

Enable or disable GreenView mode.

cbfunction<optional>

Callback.

useGreenViewEco(enable, cbopt)

Controls status of GreenView "Eco" mode.

Will apply a fullscreen layer with opacity for "Eco" mode.

Parameters:
NameTypeAttributesDescription
enableboolean

Enable or disable GreenView "Eco" mode.

cbfunction<optional>

Callback.

describeContent(content)

Let GreenView know what content is used for playback.

This method is optional.

Parameters:
NameTypeDescription
contentContent

setOpacity(opacity)

Will apply a fullscreen layer with the provided opacity percentage.

Use carefully as it will override the default opacity value.

Parameters:
NameTypeDescription
opacitynumber

A percentage number value.