I am using Video-react (https://video-react.js.org/components/player/) and on the page, it says I can use this.refs.player.load()
once I have updated its source. But I do not think that method is supported any more as It will not work at all plus I could not find it in the source code downloaded with npm.
Is there another way to do this or has anyone found a solution? This is my partial code:
var videoRow = document.createElement("div");
videoRow.className = 'col-md-4';
videoRow.setAttribute("id", "videoRows");
//create the myPlayer div which will contain the Player.
var myPlayerDiv = document.createElement("div");
myPlayerDiv.setAttribute("id", "myPlayer");
//create my player with the information from the attributes.
var videoPlayer = document.createElementNS('', 'Player');
videoPlayer.setAttribute("src", data.val().videoURL);
videoPlayer.setAttribute("ref","player");
myPlayerDiv.appendChild(videoPlayer);
videoRow.appendChild(myPlayerDiv);
document.getElementById('videoList').appendChild(videoRow);
this.refs.player.load();
This has not worked. I tried renaming the ref but still nothing. The div shows up but not the player.
Edit: Just found this in the Player.js component but can't figure out how to implement it: Player.js component source code