mouse move and click over vlc embed - javascript

I've been searching far and wide for a solution to this, I have a vlc plugin embedded on my pages. I know the "windowless" option exists, but that increases resource usage excessively.
Is there any other way to catch mouse events like click and mouse move over the embedded video in JavaScript?
Any solution to this problem would be helpful.

It is now possible to catch mouse events in a VLC Web Plugin without any local programming knowledge. This method does although require some knowledge of QML (Official Docs).
You will need to install WebChimera Plugin for this to work.
See Working Demo

Related

LinkedIn App Browser Issues: Background Video and Animations

When you open a website in LinkedIn's app (iOS), html5 background videos set to autoplay do not play, and animations do not fire unless you stop scrolling. So, it often looks like there is a bunch of empty space when you use fade and slide animations.
Here are a few examples (you must view within LinkedIn's app to see the issue)...
Background video
https://jobs.netflix.com/
https://thelovinggroup.com/ (also has animation issues)
Animations
https://voidwatches.com/
http://www.clearmotion.com/
Any thoughts on how to tackle this issue until LinkedIn builds a better browser?
I've looked into browser detection as a possible solution. Thinking maybe I could do an if/else statement to check if it's a common browser (Chrome, Safari, Firefox, etc.), else do something else with those videos and animations.
But everything I've read for browser detection strongly recommends against using it unless you absolutely have to (https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent).
Any thoughts would be very much appreciated!
UPDATE
Ok, so I've implemented the code from this Github project to detect UIWebView: https://github.com/simpleweb/UIWebView-Detect
And it works well! However, I really need to differentiate between LinkedIn and other apps with WebView because LinkedIn is the only one with these issues.
I used Udger's parser (based on what I found in another Stack Overflow post): https://udger.com/resources/online-parser
And I can see that Facebook has its own browser, but LinkedIn seems to be using some version of Safari.
I feel like I'm starting to get closer, but I'm still not sure I've come up with a solid solution.

Unresponsive touch in android webview

I need to display four realtime smooth graphs representing user's biodata in my android application. I tried every free android library but they were not as smooth as their javascript counterparts. So I decided to use the highcharts js in webview.
Four graphs in the same screen works smoothly. But webview is not recognising touch events quickly. I tried playing with H/w accelartion, touch events etc. but it did not help.
Whenever I touch a button on the webview logcat says :-
"12-13 16:13:37.436: V/WebViewInputDispatcher(9308): blockWebkitDraw"
"12-13 16:13:37.441: V/WebViewInputDispatcher(9308): blockWebkitDraw lockedfalse"
After touching buttons multiple times it says :-
"12-13 16:13:37.806: V/WebViewInputDispatcher(9308): blockWebkitDraw lockedtrue"
So basically any touch on highcharts graph or the buttons does not work quickly. I am loading html/js/css from assets folder.
What fixes I need to perform in webview to resolve this? I don't think there is any problem with my html/js/css code because it runs perfectly fine on Chrome mobile.
Having your app an important delay is a possible indicator that probably you're doing some hard work in the UIThread that you should probably sepparate in a Thread or an AsyncTask.
You don't mention what is supposed to happen when you touch a chart, but some code would probably clarify that.
I strongly recommend installing Eclipse Memory Analyzer Tool (assuming you use Eclipse, otherwise you should find a similar tool for the environment you use) and combine it's usage with DDMS. This will give you some clues of where the bottleneck might be.
This is a good tutorial on how to use them: http://therockncoder.blogspot.com.es/2012/09/fixing-android-memory-leak.html
This one's very clarifying too: http://eclipsesource.com/blogs/2013/01/21/10-tips-for-using-the-eclipse-memory-analyzer/

Best method to display html5 video on IOS

I'm breaking my head for few days trying to solve this and can't seems to find answer.
I'm trying to build a proof of concept for video player using HTML5 that works on Android and IOS, the trick is that at certain times i need to display objects on the video itself.
Now i would normally use the Video on Canvas or Video tag to solve it and then just create a layer on that with whatever additional data i want synced and triggered by the timer (on my specific example i've used PopcornJS to trigger time-based events).
NOW, it works fine on normal desktop browsers and it works well enough for android
but it seems that Safari won't render it no matter what... it insist on opening the video in it's own player that disregard any additional JS/HTML.
Ref about the issue can be seen here.
Afraid it isn't currently possible on iPhone in Safari. I've been working on an interactive presentation web app and have encountered the same problem.
This question covers the problem of full screen only video on the iPhone. The answers mention the webkit-playsinline attribute but point out that it only works inside a UIWebView object, not in Safari.
Hopefully this will change at some point in the future.

Dragging and dropping images from Firefox into Microsoft Powerpoint

I am trying to make a web page which allows users to drag and drop images into Microsoft Office applications, specifically Powerpoint.
By default (as of FF3.5), Firefox will insert the source URL when an image is dropped rather than the image itself. After adding the following Javascript/jQuery code (derived from https://developer.mozilla.org/En/DragDrop/Drag_Operations),
$('img').attr('draggable', true).bind('dragstart', function (event) {
event.originalEvent.dataTransfer.effectAllowed = 'copy';
});
dragging and dropping works from Firefox to Word and Excel, but not to PowerPoint. For an example of what happens, see http://slides.html5rocks.com/#drag-and-drop. I have tested this with FF3.6 and FF9.
How can I make it work with PowerPoint?
Just drag'n'drop outside the boundaries of the ppt slide (to make sure you're not dropping on a predefined textbox) - and release the mouse button -no coding needed!
Firefox drag will drop the image at the center of te ppt slide.
Status quo
Sadly there is nothing you can do from within your browser and the application to enable drop support for PowerPoint.
This is something that needs to supported at source level in PowerPoint (and it seem to be if you don't drop the image on an existing element but right outside the slide frame you want to drop it onto - but probably depending on version).
If it (for some reason still) does not support the image part of the drop but just the link (and if there is no option provided for changing this behavior) there is little to do but to hope Microsoft will update PowerPoint with this support in the future, - or - check the following options for work-arounds if needed:
Add-ins
You can look into writing an add-in (or possibly just use a macro - you might need to lower security to medium [PDF] for macros) for PowerPoint that will take the link that is dropped and replace it with the image the link refers to.
Here is one place to get you started making add-ins if this is a viable option.
Here is a commercial framework that makes creating add-ins very simple.
(disclaimer in this regard: I am here assuming this will be possible due to add-ins such as this which allow you to show a live web page inside PP).
Pipe-line / work process
There is also the option of injecting a third-party applications in the pipe-line to do screen snapshots of the image and have it inserted automatically into PP.
SnagIt is such an application (and there are probably others) and it has free extensions that will allow you to integrate "snags" directly with PowerPoint.
Or (the perhaps too obvious option): simply copy the image in browser and paste it into PowerPoint.
What is your version of Powerpoint?
It's very important because image format support may be lacking.
If that's the case your code needs a minimum version warning addition.
Could also ask to convert image to suitable format.
It may even be the case that it's impossible to the version of Powerpoint you're using to support this in the way you want.
You could try to use html code.
This code might help you:
http://classroomtech.org.uk/2008/08/drag-and-drop-in-powerpoint/
Other possibilities are OLE object with a link to a image.
Could check how other Microsoft applications, that do something similar, handle things.
If that doesn't work you could try to generate an OLE object with a link to the image in it.

Easeljs: mouse events stop working

I am implementing a touch animation with the EaselJs library.
When I read am image from a local folder all mouse events are working OK, like: onPress.
But when I choose an image source from a URL like:
http://www.visionale.net/wp-content/uploads/cool-accessories-car.jpg
mouse events, like onPress, stop working.
Try for example to dragAndDrop from library and change image link "img/x.jpg" to any link from internet.
That's the <canvas> crossdomain issue (security feature).
There is a workaround: you can use a simple 'proxy script' on your server.
This one is pretty nice: http://benalman.com/projects/php-simple-proxy/

Categories