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

WebPlugin onclick event #1

Open
ksotik opened this issue Jun 6, 2013 · 11 comments
Open

WebPlugin onclick event #1

ksotik opened this issue Jun 6, 2013 · 11 comments

Comments

@ksotik
Copy link

ksotik commented Jun 6, 2013

Hello, how I can catch webplugin video object mouse onclick event?

@dmp42
Copy link

dmp42 commented Jun 6, 2013

On OSX, it just works:
document.getElementById('video1').addEventListener('click', function(){console.warn('clicked');});

I'm not positive it works on Windows - if you can test and report back here - there already is a (quite hideous) hack for mousemove events for windows (see README and hack.js for details)

@ksotik
Copy link
Author

ksotik commented Jun 11, 2013

this code doesn't work in OSX:

    <div id="video-player-container">
        <object id="video-player" type="video/x-roxee">
        </object>
    </div>

    <script>
        document.getElementById('video-player').addEventListener('click', function(){
            alert('click!');
        });
    </script>

@dmp42
Copy link

dmp42 commented Jun 11, 2013

It does work for me.

Can you report:

  • which version of OSX you are testing
  • which version of QT you are compiling with
  • if you are testing in the demo subproject, or in your own project

Thanks!

@ksotik
Copy link
Author

ksotik commented Jun 11, 2013

  1. OSX 10.8.3
  2. QT 5.0.2 x64
  3. Demo

@dmp42
Copy link

dmp42 commented Jun 11, 2013

Strange...
Can you copy the whole content of your video.html file?

Thanks again.

@ksotik
Copy link
Author

ksotik commented Jun 11, 2013

Sorry, it is my mistake. I had some changes in original demo and video object was under the another div layer, so video showed, but mouse event not captured. Thank you!

@ksotik ksotik closed this as completed Jun 11, 2013
@ksotik
Copy link
Author

ksotik commented Jul 8, 2013

I have checked this in Windows. It seems, that onclick & onmousemove events works only if player don't playing movie (only on blackscreen video-object)

@dmp42
Copy link

dmp42 commented Jul 8, 2013

Mousemove event should (kind of) work (but you need to use hack.js from the demo folder).

Indeed mouseclick don't work - this is a platform limitation - I'll look more into it, but I wouldn't hold my breath unfortunately.

@dmp42
Copy link

dmp42 commented Jul 8, 2013

Tracking ticket: #5

@ksotik
Copy link
Author

ksotik commented Jul 8, 2013

Yes, I use hack.js. May be trouble in QT 5.1, but I already use global document mousemove event for my needs

@dmp42
Copy link

dmp42 commented Jul 8, 2013

Ok - I'll try with 5.1 soon then!
Thanks for your time testing this.

@dmp42 dmp42 reopened this Jul 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants