Regarding play video

Regarding play video

  

Dear outsystems team,


     Am new to outsystems. I have url(video) in DB. How to play that in screen.

It depends a bit on your platform... and how you want to present your user interface.

Web or Mobile?

Do you want a user to select from a List?  A Dropdown?

Also, where is your video hosted?  Is it yours... or coming from YouTube?

There is a Video Widget in both Web and Mobile... which takes a URL (not YouTube) as its data source.


Davidk wrote:

It depends a bit on your platform... and how you want to present your user interface.

Web or Mobile?

Do you want a user to select from a List?  A Dropdown?

Also, where is your video hosted?  Is it yours... or coming from YouTube?

There is a Video Widget in both Web and Mobile... which takes a URL (not YouTube) as its data source.



Am using video widget in web. If i want to play youtube url mean how to achieve that. 

Hi Saravana,

Isn't it as simple as using the right iframe tag?

Kilian Hekhuis wrote:

Hi Saravana,

Isn't it as simple as using the right iframe tag?


Hello Kilian Hekhuis,

I tried that with video url as well as address bar url. But it is not working. Could you tell me the correct way or send me the oml with that.


Thanks in advance.  


Hi Saravanna,

What exactly did you try? I created a new screen, put an Expression on it, copied the iframe code from a YouTube video*, put it in the Expression, set the Escape Content property to No, and it works.

*Click Share (below the video), then Embed, then Copy.

I'm quite new to OS as well... but not new to development environments.  I find that there's always something specific that needs doing.  In this case you can use an Expression... and copy in the iframe code... but an Expression requires text and it requires that text to be surrounded by double-quotes.

YouTube iframe code is full of double-quoted attributes... so you need to change all the double-quotes to single quotes in the iframe code.  e.g.

SyntaxEditor Code Snippet

"<iframe width='560' height='315' src='https://www.youtube.com/embed/O7kR3o6STIA' frameborder='0' gesture='media' allow='encrypted-media' allowfullscreen></iframe>"

You can also use the IFrame Widget and provide just the YouTube URL... e.g.

SyntaxEditor Code Snippet

"https://www.youtube.com/embed/O7kR3o6STIA"

Hi Davidk,

Yes, either you can replace the double quotes by single quotes, or, alternatively, you can change them to double-double quotes, the OutSystems way of putting double quotes inside a string:

"<iframe width=""560"" height=""315"" src=""https://www.youtube.com/embed/MNtR15afJZE"" frameborder=""0"" gesture=""media"" allow=""encrypted-media"" allowfullscreen></iframe>"

Using an iframe widget is indeed another option, but it is only available when using SilkUI, and you musn't forget to manually set the width and height.

Kilian Hekhuis wrote:

Hi Saravanna,

What exactly did you try? I created a new screen, put an Expression on it, copied the iframe code from a YouTube video*, put it in the Expression, set the Escape Content property to No, and it works.

*Click Share (below the video), then Embed, then Copy.


Hi Kilian,


        Still am confusing on that. Could you send me the oml which was you created. 

Solution

Saravana Kumar Sivaraj wrote:

Kilian Hekhuis wrote:

Hi Saravanna,

What exactly did you try? I created a new screen, put an Expression on it, copied the iframe code from a YouTube video*, put it in the Expression, set the Escape Content property to No, and it works.

*Click Share (below the video), then Embed, then Copy.


Hi Kilian,


        Still am confusing on that. Could you send me the oml which was you created. 


Hi Saravana,

I've attached an example with an expression as Kilian explained.

Hope it helps.

Regards,

José Gomes

Solution