How can I pause a video?

Hello, good to everyone.

I have a problem and the truth is that if you would help me I would appreciate it a lot (I don’t know much about programming).

Here you have the link of the project :

To see the video press play.The video is hosted on a server. And I don’t know how to access a pause.

If you want to access the project, tell me and I will give you access.

The truth is that I’ve been trying to pause the video for a whole day but I can’t. Or if you leave me a reference on how to do it or information, I would really appreciate it.

Greetings and thank you all very much.

PD: I’m sorry for my English

This page is probably best

Ultimately, you call the pause() function on the video object.

sorry @yaustar
I don’t understand much about programming, and I don’t understand how to put it in the code I have about pause ()


Hello @RafaelLopera

Here is script for you…
This script will target 1st video element in playcanvas.

Add this script on Root entity. Press Space to Play and Pause Video.

:warning: Note: You may need to modify this script according to number of video source…

var VideoPlayPauseScript = pc.createScript('videoPlayPauseScript');

// initialize code called once per entity
VideoPlayPauseScript.prototype.initialize = function() {

// update code called every frame
VideoPlayPauseScript.prototype.update = function(dt) {
    var videoElement = document.getElementsByTagName('video')[0];
    if(videoElement !== undefined)
        if (
            if(videoElement.paused === true)
            else if(videoElement.paused === false)

Thank you very much for your help, it has worked perfectly. (I saw this message too late, sorry)

1 Like