Provide a property that allows looping to be enabled so that the video is automatically restarted upon completion. Currently, this has to be accomplished by monitoring for stateChange, then manually calling playVideo() once getPlayerState() reports 0 (zero).
Incidentally, this has to be done using the native object (passed via $event) - it does not work if trying to call playVideo() from a reference to the YouTubePlayer object obtained via ViewChild() for some reason. The object is present and properties seem to be available. But calling playVideo() on that object doesn't work. I have to call it on $event.target.
Feature Description
Provide a property that allows looping to be enabled so that the video is automatically restarted upon completion. Currently, this has to be accomplished by monitoring for
stateChange
, then manually callingplayVideo()
oncegetPlayerState()
reports 0 (zero).Incidentally, this has to be done using the native object (passed via
$event
) - it does not work if trying to callplayVideo()
from a reference to theYouTubePlayer
object obtained viaViewChild()
for some reason. The object is present and properties seem to be available. But callingplayVideo()
on that object doesn't work. I have to call it on$event.target
.Use Case
No response