Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I disable pauses in the video tag? #8702

Open
trookie2000 opened this issue Apr 22, 2024 · 3 comments
Open

How do I disable pauses in the video tag? #8702

trookie2000 opened this issue Apr 22, 2024 · 3 comments

Comments

@trookie2000
Copy link

Description

Using webrtc and js to listen to events, I was able to remotely control the shared computer. But there is a problem, when I left click (for example to close a window on the shared device), the sharing screen will pause.

But when I use

@click="mouseHandler($event)"
onMounted(() => {
remoteDesktop(); // Call remoteDesktop method on component mount
});

After, all mouse operations are forbidden (including clicking and sliding the mouse), how to solve

Reduced test case

null

Steps to reproduce

1.<video class="video" ref="videoElements"
:srcObject="video.stream" controls autoplay @mousedown="e => mouseDown(e, $refs.videoElements[index])"
@mouseup="e => mouseUp(e, $refs.videoElements[index])"
@mousemove="e => mouseMove(e, $refs.videoElements[index])" @wheel="e => wheel(e, $refs.videoElements[index])"
@contextmenu.prevent="e => rightClick(e, $refs.videoElements[index])"
@DBLClick="toggleFullScreen($refs.videoElements[index])" @click="mouseHandler($event)">

2.const mouseHandler = (event) => {
// 阻止视频默认点击事件
event.preventDefault();
};

Errors

No response

What version of Video.js are you using?

null

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

null

What OS(es) and version(s) does this occur with?

null

@trookie2000 trookie2000 added the needs: triage This issue needs to be reviewed label Apr 22, 2024
Copy link

welcome bot commented Apr 22, 2024

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@trookie2000
Copy link
Author

controlslist currently only supports disabling nodownload, nofullscreen, and noremoteplayback.

@mister-ben
Copy link
Contributor

You can disable the default click action. See https://videojs.com/guides/options/#useractionsclick

"userActions": {"click": false}

@mister-ben mister-ben removed needs: triage This issue needs to be reviewed labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants