Video loop that auto plays when in view.
- Source:
Properties:
Name | Type | Description |
---|---|---|
selector |
string | video loop DOM selector |
Methods
(inner) autoplayDetected(success)
- Source:
Handler for when video autoplay detection has taken place. Add in view listener when video autoplay is supported.
Parameters:
Name | Type | Description |
---|---|---|
success |
boolean | whether or not auto play is supported. |
(inner) detectAutoplay()
- Source:
Detect if autoplay is allowed by attempting to play the first video.
(inner) handleInView()
- Source:
Handler for in view event. Play video loop when it is in view, pause when out of view.
(inner) init()
- Source:
Check to see if there are any video loop elements on the page. If so, detect if auto play is supported.