10
Views
6
Comments
Solved
how can allowing for user to store Trailer  in an entity  and calculate the duration
Question
Application Type
Reactive

how can allowing for user to store Trailer which  we get form you tube in attribute ( Trailer ) in an entity (Movie Movie) then calculate the duration for this trailer and store in attribute (duration) in an entity (Movie Movie)

how can i do it  

as at attachment OML

Movies.oml

Rank: #311
Solution

Please see attached updated OML. Let me know, if you need any other help.

MoviesSachin25.oml

Rank: #311

Hi Andrew,

What I understand from your comments is that you want to store video clips into an entity attribute along with the duration of that clip into another attribute. Is it correct? Please confirm.

Thanks & Kind Regards,

Sachin

Rank: #1443

yes using as like 

<iframe width="560" height="315" src="https://www.youtube.com/embed/07d2dXHYb94" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Rank: #311

Do you want to store Just this link of youtube with these additional parameters/tags or the entire video?

Rank: #1443

i want store just this link of youtube with these additional parameters/tags  and then i  use it in other screen 

Rank: #311
Solution

Please see attached updated OML. Let me know, if you need any other help.

MoviesSachin25.oml

mvp_badge
MVP
Rank: #2

Hi Andrew,

You shoulnd't store movie clips or other videos in the database. They are way too large to handle properly. The best approach is to store them either in the file system (if you have a dedicated server) or some online storage (like Dropbox) or even non-searchable in YouTube or other streaming services.

As for calculating the duration, that's not easy to do. You cannot know the duration easily, unless you parse the image format etc. Perhaps there are external libraries for doing this, but I'm not aware of them.