How can I show the video on the  web app from database?

Hi, everyone!
I'm trying to do show the video that user uploaded on the web. I used the upload widget to fetch the video to database that I created(FileName, FileContent, FileType). But I can't figure it out how can I convert this binary data to show it on the web app. Cuz in the video widget the SourceFile must be a path or the file name that is already in resources document, not a content. Does anybody know how to do it? Thanks!!

mvp_badge
MVP
Solution

Here is the OML I used to test with a small video.

VideoTest.oml

Eduardo Jauch wrote:

Here is the OML I used to test with a small video.

Hi Jauch, thanks for reply! Video widget can be used if your file is in the Resources file in Outsystem. But i want to do is user can upload the video on the web page and also show the video that user uploaded, no need to entering OutsystemStudio. So the video can be shown from the Entity, not from Resources. Is this possible? Thanks !!


mvp_badge
MVP

Hi Cheng-Han,

You could take a look at this Forge component. I haven't used it myself, but it seems to do what you want.

mvp_badge
MVP

Hi Cheng-Han, 

Are you talking about this widget? https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Patterns/Using_Web_Patterns/Controls/Video

Source File is an URL I think. 

A simple way to do it is to create a download page. You then use the URL of the page (propably with an input parameter to chose the video) as source to the widget. 

As the video will be played in the browser, and the video is in the server, it needs to be downloaded anyway. 

If you test it, let me know if it works :) 

Cheers

mvp_badge
MVP

@Eduardo: if the file is big (and videos likely are), it needs to be downloaded in its entirety, which may take a long time. It's not about the total time needed to download the video, but about the waiting time before the video starts. The Forge component I linked to, though I haven't used it myself, seems a better way to handle things.

mvp_badge
MVP

Yes, you're right. 

Bigger files, better to do streaming.
Bit streaming is, in fact, nothing more than a download that does not wait for the download finish to use its content... 

The Video widget is not doing a "streaming" already? Like, it downloads the entire content before starting the playing?

Cheers.

mvp_badge
MVP

Good question, I'm not 100% sure. I just assumed that given all the streamer components, the answer was probably "no".

Kilian Hekhuis wrote:

Good question, I'm not 100% sure. I just assumed that given all the streamer components, the answer was probably "no".

Thanks for reply! And yes, I already used that forge and it works fine, but the thing is this can only show the video on a page in HTML, I can't do anything more on it (like UI/UX, button...etc). Is there any other option to deal with? Thanks again!!


mvp_badge
MVP

Hum...

The Video widget is just a wrapper for the video tag of HTML5... 

So, you only need to guarantee that the metadata is at the beginning of the video and as soon as this part is downloaded, the video can start to play.

mvp_badge
MVP
Solution

Here is the OML I used to test with a small video.

VideoTest.oml

Eduardo Jauch wrote:

Here is the OML I used to test with a small video.

Hi Jauch, thanks for reply! Video widget can be used if your file is in the Resources file in Outsystem. But i want to do is user can upload the video on the web page and also show the video that user uploaded, no need to entering OutsystemStudio. So the video can be shown from the Entity, not from Resources. Is this possible? Thanks !!


mvp_badge
MVP

Hi, 

Yes, it is possible. I put the file in resources to make my test easier, but I used a page to provide a URL to the widget: the page has a download in the preoaration. 

So, in the preparation of the download page, you just fetch the binary from database instead of from resource (the documentation of the widget is misleading). 

Cheers 

Eduardo Jauch wrote:

Hi, 

Yes, it is possible. I put the file in resources to make my test easier, but I used a page to provide a URL to the widget: the page has a download in the preoaration. 

So, in the preparation of the download page, you just fetch the binary from database instead of from resource (the documentation of the widget is misleading). 

Cheers 


HI!
I see, but i saw that you wrote in wedges is 

"\VideoTest\Download.aspx?video1.mp4"

but I can't find why is the name video1.mp4, can you help me out?

mvp_badge
MVP

I just give it a name. 

In your case, you probably will want to assembly the link using the real file name, for example. 

More or less the same thing we do with images. 

You probably will want to have a parameter that identify the video, so the download page can fetch the right one from the database. 

Eduardo Jauch wrote:

I just give it a name. 

In your case, you probably will want to assembly the link using the real file name, for example. 

More or less the same thing we do with images. 

You probably will want to have a parameter that identify the video, so the download page can fetch the right one from the database. 

HI! Jauch, It works very well!!!! thanks for sharing your solution!
Thank you very much


mvp_badge
MVP

You're welcome :)

¿Cómo puedo mostrar el video en la aplicación web desde la base de datos? 
¿Cómo puedo hacer lo mismo para la aplicación móvil  
?ya tengo los videos en la base de datos y ahora necesito poderlo ver desde la 
app

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.