Upload and Show Video using Video Widget in Mobile

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi,

Your url on the video widget is a hardcodes string:

"https://pvdi-dev.outsystemsenterprise.com/ashiapdemo/HomeScreen?VideoId=1"

This is not the URL of the video, this is an url of a screen in your application.

The widget expects an url pointing to the video (so for example extension ".mp4".

You uploaded the video to entity to Video and store it as binary.

I would advice against storing the video in an outsystems entity. It will eat your storage, and performance wise it is not the most performant solution if you want to play the video again.

I would suggest to change your video upload logic, upload the video to (ftp) fille storage, or external storage (for example AWS S3). Then only store the url in your video entity of where you stored the video.

Then use that URL on the video widget.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Rizqi,

Your url on the video widget is a hardcodes string:

"https://pvdi-dev.outsystemsenterprise.com/ashiapdemo/HomeScreen?VideoId=1"

This is not the URL of the video, this is an url of a screen in your application.

The widget expects an url pointing to the video (so for example extension ".mp4".

You uploaded the video to entity to Video and store it as binary.

I would advice against storing the video in an outsystems entity. It will eat your storage, and performance wise it is not the most performant solution if you want to play the video again.

I would suggest to change your video upload logic, upload the video to (ftp) fille storage, or external storage (for example AWS S3). Then only store the url in your video entity of where you stored the video.

Then use that URL on the video widget.

Regards,

Daniel

Hi Daniel,

On the url link in the source file, before I also made a video upload using the web and the video was successfully displayed on mobile. Is there a difference in terms of logic when displaying video?

I will attach .oml using the web version when uploading video and for mobile that displays videos, I use .oml that I attached earlier in this post


Thanks,

Rizqi

Rizqi Ananda wrote:

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi Ananda,

                        On your uploading action use BInarydata action from dependencies from that use BinaryToBase64 action and give input as the variable holding video and store  the output in a text variable (var1)  on showing in video source file 

SyntaxEditor Code Snippet

"data:video/webm;base64,"+Var1

Thanks 

soundarya

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi Ananda,

                        On your uploading action use BInarydata action from dependencies from that use BinaryToBase64 action and give input as the variable holding video and store  the output in a text variable (var1)  on showing in video source file 

SyntaxEditor Code Snippet

"data:video/webm;base64,"+Var1

Thanks 

soundarya

Hi, Soundarya

I tried the method you gave but the video didn't appear either. Can you share the .oml as an example? 


Thanks,

Rizqi


Rizqi Ananda wrote:

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi Ananda,

                        On your uploading action use BInarydata action from dependencies from that use BinaryToBase64 action and give input as the variable holding video and store  the output in a text variable (var1)  on showing in video source file 

SyntaxEditor Code Snippet

"data:video/webm;base64,"+Var1

Thanks 

soundarya

Hi, Soundarya

I tried the method you gave but the video didn't appear either. Can you share the .oml as an example? 


Thanks,

Rizqi




soundarya palanimuthu wrote:

Rizqi Ananda wrote:

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi Ananda,

                        On your uploading action use BInarydata action from dependencies from that use BinaryToBase64 action and give input as the variable holding video and store  the output in a text variable (var1)  on showing in video source file 

SyntaxEditor Code Snippet

"data:video/webm;base64,"+Var1

Thanks 

soundarya

Hi, Soundarya

I tried the method you gave but the video didn't appear either. Can you share the .oml as an example? 


Thanks,

Rizqi


Hi, Soundarya

On 'Testing.oml' that you make, can the video uploaded on the 'Screen 1' page be showing on another page? and whether the source file of the video widget ("data: video / webm; base64," + Var1) that you create will also change if the video is showing on another page?


Thanks,

Rizqi



Solution

Rizqi Ananda wrote:

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi Ananda,

                        On your uploading action use BInarydata action from dependencies from that use BinaryToBase64 action and give input as the variable holding video and store  the output in a text variable (var1)  on showing in video source file 

SyntaxEditor Code Snippet

"data:video/webm;base64,"+Var1

Thanks 

soundarya

Hi, Soundarya

I tried the method you gave but the video didn't appear either. Can you share the .oml as an example? 


Thanks,

Rizqi


Hi, Soundarya

On 'Testing.oml' that you make, can the video uploaded on the 'Screen 1' page be showing on another page? and whether the source file of the video widget ("data: video / webm; base64," + Var1) that you create will also change if the video is showing on another page?


Thanks,

Rizqi



Hi  Rizqi Ananda,

      im attaching oml for your recuirement.The above source path having the local variable at the end it will show the current video you upload.Upload some different videos.Sure the screen will show the video 


Thanks 

Soundarya


Solution

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

soundarya palanimuthu wrote:

Rizqi Ananda wrote:

Hi All, 

I want to upload a video and display the video using mobile. when uploading the video successfully entered into the database but when wanting to display or showing the video using the video widget it was not successful. I think I'm wrong with the URL in the source file of the widget video.
How to display or showing the videos using a video widget?


Thanks,

Rizqi

Hi Rizqi Ananda,

                        On your uploading action use BInarydata action from dependencies from that use BinaryToBase64 action and give input as the variable holding video and store  the output in a text variable (var1)  on showing in video source file 

SyntaxEditor Code Snippet

"data:video/webm;base64,"+Var1

Thanks 

soundarya

Hi, Soundarya

I tried the method you gave but the video didn't appear either. Can you share the .oml as an example? 


Thanks,

Rizqi


Hi, Soundarya

On 'Testing.oml' that you make, can the video uploaded on the 'Screen 1' page be showing on another page? and whether the source file of the video widget ("data: video / webm; base64," + Var1) that you create will also change if the video is showing on another page?


Thanks,

Rizqi



Hi  Rizqi Ananda,

      im attaching oml for your recuirement.The above source path having the local variable at the end it will show the current video you upload.Upload some different videos.Sure the screen will show the video 


Thanks 

Soundarya


Hi Soundarya,

The way you give it works, thank you very much! :)


Thanks,

Rizqi