i'm looking for an activeX component which allows loading .wav files, displaying + playing it - and also is capable of displaying/setting the current playing position.
any ideas?
thanks
You can use either Windows Media Player right of the box (choose Components "Windows Media Player"). It can be used with or without the controls (select Custom from the properties menu to turn off the controls) and supports events for everything you need. It plays wav files, mp3 files, and on Windows 7 and newer operating systems AAC's out of the box (basically anything windows media player supports). If this doesn't float your boat, installing VLC gives you the VLC activex control, however redistributing it might have some issues.
Related
I'm working on site that uses video that should not be stopped by user.
But when video is playing I can change system volume and I see system overlay in top-left screen corner where I can click 'pause' and pause video.
Are there any ways to prevent such behavior? I mean via html / js etc.
System: Windows 10
Browser: Chrome + Chrome-based
You cannot control this. Browsers and most operating systems give users the ability to stop media from playing. In the case of Windows 10, it's the OS that allows users to control the media, and there's zero you can do from the JavaScript layer to change that.
My application is allowing users to upload videos(avi and wmv) and then those videos should be displayed on users home page. Uploaded file is saved on server and path to the file is saved in database.
What is the best way to display those videos on page?
I'm using ASP.NET forms.
Thanks
ASP.net does not have any video or media controls natively. Some people have tried the MediaPlayer control, however this is an ActiveX control so browser compatibility is a major issue. Depending on what formats you are accepting a variety of solutions from simple to complicated exist and can be broken down to two categories:
HTML5 Video
You can use the basic HTML5 Video, depending on what formats you have (avi, mp4, oog, etc.) you will need to have multiple source files for compatiblity across all browsers.
A list of compatible formats for each browser can be found here:W3 Schools HTML5 Video Tutorial
You can add runat="server" and access the properties directly. I've found adding multiple sources requires setting inner text and adding a new src tag.
Third Party Tools
These can be great for cross-browser compatibility and include FlowPlayer, Telerik's Media Player Control, jVideo and others. Solutions like FlowPlayer can fallback to Flash in the event a browser is not compatible with the format and still play. Some are free, some are not. You can wrap a control without server-side methods (FlowPlayer) into a user control depending on what you need.
Is there any way to get window handle of the window which is currently playing video. This is the only information my program will be having.
updated to include info incorrectly provided as an answer
I think I should explain what exactly I want to achieve here.
I actually wanted to share/stream my DVD data to the remote machine. Currently what I am doing is, I am capturing the screen/video into to still frames and sending it to remote system but now I don't want to see the playing video on my host machine. I could think of few probable solutions,
1.) If we can capture the data of a hide/minimized window.
Did some investigation and seems it is not possible. Please add your thoughts.
2.) Convert the DVD data format into ffmpeg format and stream it.
Don't have any idea if we will be allowed to convert the data format. If most of the DVD formats allow to covert then I can go for this option but not sure how complicated it could be.
3.) Will create some virtual surface play the DVD data to that surface and capture the screen of that surface.
Again not sure if DVD will play on that virtual/fake surface created by kernel mode driver.
There are probably three main playback engines used on windows; DirectShow (WMP, MPC) , ffmpeg (VLC, MPlayer) and QuickTime.
If you look closer at DirectShow will will see that it supports hardware overlays, windowed and windowless rendering and Direct3d surface support.
Even if you focus on a single app you are going to have problems since you don't know what kind of renderer is in use. You might be able to find a child window that always has the same position and dimensions as the video, but then you are relying on things that could change between versions etc.
We are using CPNMouse for an application running on Windows XP. One mouse device is detached from the normal event queue, so we can get it's position and events and draw the cursor ourselves.
Unfortunately, CPNMouse does not work on Windows Vista/7 (see here). Is there any library/SDK that provides the same capabilities on Windows 7?
Just to clarify - we want the "normal" cursor to be present and to draw another cursor, that should be mapped to a different mouse device.
Update:
CPNMouse is no longer supported and its previously "open source" withdrawn from SourceForge. Only this legacy documentation page exists on the official CPN Tools site.
Looks like only commercial products are available...
MiniFrame SoftXpand
MultiMouse
If anyone has a copy of the original source from SourceForce please post a link here... Assuming the original license was a standard SourceForge (open to share/expand) variant it should be okay for someone to fork it to a new project for continued development (of a free tool).
Take a look at the MultiPoint SDK, which allows for up to 25 cursors on the same display, which also supports Windows 7.
You should use the dsf from the windows ddk to create an emulated mouse device then any program can accept input from that specific emulated mouse device and draw the pointer it self. So any program you create will have multiple mouse devices in it. Its sad to say that its not possible to have multiple pointers in windows 7 OS though they specifically dont support it. So you would have to draw the poiner onto the screen yourself.
Im afraid the point is you need to draw a pointer yourself for the mouse
You want the "Raw Input" API which comes with the Windows Platform SDK: MSDN: About Raw Input
I want to programmtically detect the state of movie currently being played in Windows Media Player. i..e if the movie is maximized I need to find that it is maximized and put the word "MAXIMIZED" in text file, if the movie is paused I need to capture PAUSED in text file, if movie is stopped I need to capture STOPPED in text file.
The capturing needs to happen in the background i.e. totally transparent to end user as the user takes action while watching the movie on Windows Media player
I am planning to achieve this using Visual Basic 6.0
Kindly provide me inputs / pointers on how to go about this.
Thanks
I think only way how to do this, is using Windows Media Player SDK.
Windows Media Developer Center
You have to create a Media Player plugin and access the state using the Media Player API.
Theoretically you could also do some external analysis of the Media Player, for example by enumerating its windows and handles and reading window texts, but that would be very "hacky" and most fragile.
Although creating a plugin sounds like a lot of work, it'll be the better solution in the long run.