Question
Gmail
AU
Last activity: 16 Feb 2017 4:27 EST
How to embed video file in a section
Hi ,
Can anyone please let me know as how to embed a video file in a section ? I have a requirement to play a video on click of a tab. It should have play,pause and stop buttons as in any video. I tried using the below code. I'am just seeing a black screen with play button, but nothing is happening on click of it. Please suggest.
<iframe width="420" height="315" src=wb/TestVideo.mp4 AUTOSTART="true" LOOP="true"> </iframe>
I have this added in the Value field of a cell in a section. TestVideo.mp4 is present in the wb directory.
Regards,
Rachana
***Moderator Edit: Vidyaranjan | Updated Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hi Rachana,
Convert the video file to ogv format and try with chrome. Also, please test with 3gp video format as well.
There are multiple issues reported in various website regarding chrome supporting .mp4 video codec and video tag.
Regards,
Sudhish OP
Pegasystems Inc.
IN
Couple of things to try:
- Please add the source as any sample youtube video
- Try to place the video in webwb folder
Kindly share your observations.
Best Regards,
Mounika
Gmail
AU
Hi Mounika,
Tried by placing the video in webwb folder. But still Iam facing the issue. Now Iam using the below code. Iam able to see the video running only at sometimes. But most of the time it does'nt load and the play button is not responsive.
<html>
<body>
<video width="320" height="240" controls="controls" autoplay="false"> <source src= webwb/Test.mp4 type="video/mp4"> <object data="" width="320" height="240"> <embed width="320" height="240" src= webwb/Test.mp4> </object>
</video>
</body>
</html>
Regards,
Rachana
Pegasystems Inc.
IN
Hi Rachana,
Are you able to reproduce the same issue copying the code to an html web page?
Please note MP4 file should with H264 video codec and AAC audio codec else it will not render in the webpage or cause issue.
Pegasystems Inc.
IN
Hi Rachana,
Please try with this code and let me know the result.
<html>
<body>
<video width="320" height="240" controls src=Test.mp4 type="video/mp4"> <object data="" width="320" height="240"> <embed width="320" height="240" src=Test.mp4> </object>
</video>
</body>
</html>
I have tested with the above code and it is working
Regards,
Sudhsih OP
Gmail
AU
Hi Sudhish,
I tried with the above code creating a html file, I'am able to run the video when I run this html file. PFB.
But when I use the same in PEGA PRPC and replace the source as shown below , I'am not able to play the video. The play button is not responsive.
<html>
<body>
<video width="320" height="240" controls src=webwb/Test.mp4 type="video/mp4" > <object data="" width="320" height="240"> <embed width="320" height="240" src=webwb/Test.mp4> </object>
</video>
</body>
</html>
Regards,
Rachana
Pegasystems Inc.
IN
Hi Rachana,
Can you please test the same in other browsers and let me know the result? . And which browser you are using for PRPC ?
Gmail
AU
Hi,
Tested in IE and it worked. We are using chrome . Issue seems to be in chrome.
Regards,
Rachana
Accepted Solution
Pegasystems Inc.
IN
Hi Rachana,
Convert the video file to ogv format and try with chrome. Also, please test with 3gp video format as well.
There are multiple issues reported in various website regarding chrome supporting .mp4 video codec and video tag.
Regards,
Sudhish OP
Gmail
AU
Hi,
Video is playing now after converting it into ogv. Even the webm format works. MP4 format has issues in chrome when used with video tag. Below is code I'am using now. Thanks for the support.!!
<html>
<body>
<video width="320" height="240" controls >
<source src=webwb/Testing.webm type="video/webm">
<object data="" width="320" height="240"> <embed width="320" height="240" src= webwb/Testing.webm> </object>
</video>
</body>
</html>
Hi,
Video is playing now after converting it into ogv. Even the webm format works. MP4 format has issues in chrome when used with video tag. Below is code I'am using now. Thanks for the support.!!
<html>
<body>
<video width="320" height="240" controls >
<source src=webwb/Testing.webm type="video/webm">
<object data="" width="320" height="240"> <embed width="320" height="240" src= webwb/Testing.webm> </object>
</video>
</body>
</html>
Regards,
Rachana
Pegasystems Inc.
IN
Hi Rachana,
Thanks for the update and confirmation.
J.P. Morgan Services India PVT Ltd
IN
HI,
i think the src is not given correctly. can you try once your html code on a .htm file in local sourcing the video and check whether it is picking up the video or not?
Pegasystems Inc.
IN
Hi Rachana,
Below code has been used for the similar requirement in my personal PHP website. May be you can use the same.
<video autoplay muted id="myvid" >
<source src="profile.mp4" type="video/mp4" />
</video>
Pegasystems Inc.
GB
Additionally: see this post - it is actually for embedding PDFs; but the solution also allows for other formats (and works for Videos as it happens): https://collaborate.pega.com/question/how-display-pdf-sectioninvoice
(There is a RAP file available for this also - which is referenced in the Post).
Gmail
AU
Hi Pritj,
This post talks about displaying a PDF or any sort of attachment which is an instance of Data-WorkAttach-File class. That is the attachment is already internally stored in PRPC and associated with the particular work item. In my requirement, I'am playing the same video file every time the portal is loaded and this is not instance of Data-WorkAttach-File class. Please suggest.
Regards,
Rachana
Pegasystems Inc.
GB
Where is your video hosted in this case ?
EDIT: I believe you are hosting your video as a 'rule-file-binary' here (judging from the links in some of the examples).
Also : do I understand that you have this working now ?
Cheers !
John