Constructor
new GreenView(player?, meta?)
GreenView constructor.
Name | Type | Description |
---|---|---|
player? | Object | Reference to video HTML object or JavaScript player object. |
meta? | Meta | Device related details. |
- Source
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.
Name | Type | Description |
---|---|---|
div | Node | The div node element that GreenView will use. |
- Source
useGreenView(enable, cbopt)
Controls status of GreenView mode.
Will apply a fullscreen layer with default opacity.
Name | Type | Attributes | Description |
---|---|---|---|
enable | boolean | Enable or disable GreenView mode. | |
cb | function | <optional> | Callback. |
- Source
useGreenViewEco(enable, cbopt)
Controls status of GreenView "Eco" mode.
Will apply a fullscreen layer with opacity for "Eco" mode.
Name | Type | Attributes | Description |
---|---|---|---|
enable | boolean | Enable or disable GreenView "Eco" mode. | |
cb | function | <optional> | Callback. |
- Source
describeContent(content)
Let GreenView know what content is used for playback.
This method is optional.
Name | Type | Description |
---|---|---|
content | Content |
- Source
setOpacity(opacity)
Will apply a fullscreen layer with the provided opacity percentage.
Use carefully as it will override the default opacity value.
Name | Type | Description |
---|---|---|
opacity | number | A percentage number value. |
- Source