31
Views
10
Comments
Solved
Can not play video which is stored in AWS S3

Hi everyone, after integrating Outsystems and AWS S3, I could upload a video to S3, then I want to watch the video back in OS appliction. I can get the URL and can play it in browser, but I cant play it in my OS application which is used Video widget. Can help me to solve this issue ? 

Here is the url link of video: https://event-recordings-test.s3.ap-southeast-2.amazonaws.com/mp4video.mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240406/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240406T162631Z&X-Amz-SignedHeaders=host&X-Amz-Signature=0595035236b8097479eb8454c7ebfc905cf9a7b1aac5a1a969ddf5e155ba60a4

2019-01-07 16-04-16
Siya
 
MVP
Solution

Here is my observation after putting the given url on the Video Player. The generated HTML is as below

<video data-advancedhtml="" class="osui-video" name="0.v48ltc7jyk9" id="b3-Video" controls="" poster=""><source class="osui-video-source" src="https://event-recordings-test.s3.ap-southeast-2.amazonaws.com/mp4video.mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240406/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240406T162631Z&X-Amz-SignedHeaders=host&X-Amz-Signature=0595035236b8097479eb8454c7ebfc905cf9a7b1aac5a1a969ddf5e155ba60a4" type="video/mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240406/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240406T162631Z&X-Amz-SignedHeaders=host&X-Amz-Signature=0595035236b8097479eb8454c7ebfc905cf9a7b1aac5a1a969ddf5e155ba60a4"></video>

It appears that the `type` attribute is being populated with more information than the expected "video/mp4". This behavior suggests a potential bug in the Video Player, where it inadvertently includes additional data from the `src` attribute—beyond the ".mp4" extension—into the `type` attribute as well. To demonstrate this, I set the `src` attribute to "https://abc.com/a.mp4?test". The resulting HTML was ``, indicating that the query string "?test" from the `src` URL was mistakenly added to the `type` attribute.

To address this issue, you can add the provided script to the onReady event as a temporary workaround. This script corrects the type attribute by replacing its value with 'video/mp4'


tempscript.txt
2023-11-05 14-47-05
Thuan Pham Dinh

can you provide the oap file. Because I have tried but it is not working . Thank you

2019-01-07 16-04-16
Siya
 
MVP

Looks like the video link is expired. I get the error as below for the given link

2023-11-05 14-47-05
Thuan Pham Dinh

Sorry for that. I have uploaded the video again. Please use this url: https://event-recordings-test.s3.ap-southeast-2.amazonaws.com/vikings_short.mp4%20(360p).mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240408/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240408T023909Z&X-Amz-SignedHeaders=host&X-Amz-Signature=a156250327cb66cb9450dcc604f18b4b21fc7db68971e3ed38c60d663ca12e5f 

2019-01-07 16-04-16
Siya
 
MVP
Solution

Here's the version of OML that's working for me. Please review the code and identify any discrepancies on your side.

testjs1.oml
2023-11-05 14-47-05
Thuan Pham Dinh
2019-01-07 16-04-16
Siya
 
MVP
Solution

Here's the version of OML that's working for me. Please review the code and identify any discrepancies on your side.

testjs1.oml
2024-08-23 16-02-06
Mario Sebastian Abud Gonzalez

Hi @Thuan Pham Dinh,

You can use the 'HTML Elements' widget for this case, I'll give you an example. 

Best regards

2023-11-05 14-47-05
Thuan Pham Dinh

Thank you, it can play the video. However, I want to use video widget, so are there other ways to utilize the video widget ?

2019-01-07 16-04-16
Siya
 
MVP
Solution

Here is my observation after putting the given url on the Video Player. The generated HTML is as below

<video data-advancedhtml="" class="osui-video" name="0.v48ltc7jyk9" id="b3-Video" controls="" poster=""><source class="osui-video-source" src="https://event-recordings-test.s3.ap-southeast-2.amazonaws.com/mp4video.mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240406/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240406T162631Z&X-Amz-SignedHeaders=host&X-Amz-Signature=0595035236b8097479eb8454c7ebfc905cf9a7b1aac5a1a969ddf5e155ba60a4" type="video/mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240406/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240406T162631Z&X-Amz-SignedHeaders=host&X-Amz-Signature=0595035236b8097479eb8454c7ebfc905cf9a7b1aac5a1a969ddf5e155ba60a4"></video>

It appears that the `type` attribute is being populated with more information than the expected "video/mp4". This behavior suggests a potential bug in the Video Player, where it inadvertently includes additional data from the `src` attribute—beyond the ".mp4" extension—into the `type` attribute as well. To demonstrate this, I set the `src` attribute to "https://abc.com/a.mp4?test". The resulting HTML was ``, indicating that the query string "?test" from the `src` URL was mistakenly added to the `type` attribute.

To address this issue, you can add the provided script to the onReady event as a temporary workaround. This script corrects the type attribute by replacing its value with 'video/mp4'


tempscript.txt
2023-11-05 14-47-05
Thuan Pham Dinh

can you provide the oap file. Because I have tried but it is not working . Thank you

2019-01-07 16-04-16
Siya
 
MVP

Looks like the video link is expired. I get the error as below for the given link

2023-11-05 14-47-05
Thuan Pham Dinh

Sorry for that. I have uploaded the video again. Please use this url: https://event-recordings-test.s3.ap-southeast-2.amazonaws.com/vikings_short.mp4%20(360p).mp4?X-Amz-Expires=604800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARSET7NL6Q3F6Z6U4/20240408/ap-southeast-2/s3/aws4_request&X-Amz-Date=20240408T023909Z&X-Amz-SignedHeaders=host&X-Amz-Signature=a156250327cb66cb9450dcc604f18b4b21fc7db68971e3ed38c60d663ca12e5f 

2019-01-07 16-04-16
Siya
 
MVP
Solution

Here's the version of OML that's working for me. Please review the code and identify any discrepancies on your side.

testjs1.oml
2023-11-05 14-47-05
Thuan Pham Dinh
2021-08-04 12-19-54
Mayank Dharmpurikar

Hi Thuan,

Alternate to Iframe tag, you can also use the HTML Video tag.

Please check the attached OML file for reference.

VideoDemo.oml
2023-11-05 14-47-05
Thuan Pham Dinh

hi. Thank you for your demo. However, can we utilize the video widget ?? or we can only use the HTML Video tag. 

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