I have an angularjs app and a url for a MS Stream video. How can I embed this video into my page? The user should paste this link into the page and embed the video. This is my js code:
let video = document.createElement("video");
video.src = videoUrl;
video.load();
video.addEventListener('loadeddata', function() {
scope.myContent._videoConfig = {
sources: [{
src: $sce.trustAsResourceUrl(videoUrl),
type: "video/mp4"
}]
};
scope.$apply();
scope.myContent.url = videoUrl;
});
I does not throw an error but I reckon the load() statement does not work.