118
Views
6
Comments
Solved
Embed Youtube Player in Reactive Web App

Hello,

I've been trying to embed a youtube video in my web reactive app but without success. I've tried with the "OutPower RWA Escape Content app" and with some other ways that usually worked in traditional web but can't get it done. Also didn't find anything related (to react web apps) in the forum. Does someone have any tips about how to do it or what could be the problem?

Thank you,

mvp_badge
MVP
Rank: #91
Solution

Hi Rafel,

Check this out:  EmbedYTBVideo Demo App Screen

Implementation Steps:

1) Use the RWA HTML Element

2) Define the HTML Element tag property as iframe as mentioned below

PFA - include the .oml Solution file

Note: I think, you won't be able to play the youtube video using the video UI widget by passing/referring the respective Youtube video URL, it won't work.


Hope this helps you!


Regards,

Benjith Sam

EmbedVideoRWA.oml

mvp_badge
MVP
Rank: #91

You're welcome, Rafel :)

Sorry, I never used the GDrive Connector.. will give it a try :)

Glad I could be of help!


Regards,

Benjith Sam

mvp_badge
MVP
Rank: #91

Hi Jason,

See this sample app (Implemented the required functionality in the second video - Video UI Widget)

Add a JavaScript node/element within the screen OnReady event handler screen action flow as shown below (use the below mentioned script)

Code Snippet

var videoElement = document.getElementById($parameters.VideoElementId).querySelectorAll("video")[0];

videoElement.addEventListener("ended", function() {
    $actions.ShowMsg();
});


Let me know if you need the sample .oml file

Hope this helps!


Regards,

Benjith Sam