Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

How to open a video clip in our Neptune application?

I developed an application to show the Image and some text. I like to play a video clip along with these image and text. Is there any UI element available for Video Clip?

Hi Gopal,

You will need an Iframe inside and HTML component (inside one of your pages).

Then in the javascript, assign the source of the iframe to the video you want to show.

For example:

// Update iFrame

var iframe = document.getElementById("iframeVideo");

iframe.src = YOUR_VIDEO_URL;

Hope you find it useful.

PS: Great that you are using the forum, next time please do not open a ticket so we do not have duplicate answers :)

1 person likes this

Thank you Julian. Is there any sample application using this?

Unfortunately no.  Please try the code I sent you, you will nail it !

1 person likes this

Hi Julian,

Thank you for your reply. I am trying to code as you suggested. But still getting some errors. Screenshots below.

Can you please tell me, where I did the mistake.

Hi Gopal,

maybe your script is being executed before the DOM is fully rendered.  Try putting a delay for your logic.

Also, try your code in the Browser Dev console, does it work ?

// InitLoad

sap.ui.getCore().attachInit(function() {

    setTimeout(function() {

       var iframe = document.getElementById("iframeVideo");

       iframe.src = YOUR_VIDEO_URL;

    }, 500);

1 person likes this

Thank you Julian. 

Actually It is not an URL, I had stored the video in our MIME repository. Need to call that video in my application. As per your code I am able to play the video clip from the you tube, Please help me to play the video from my  repository. I like to pass the path(/neptune/public/video/Volini) instead of URL.

You are welcome.

Actually, the logic you need is the same.  Instead of using the Youtube URL, you need to use the internal URL to your video.

Login or Signup to post a comment