Allow camera and microphone settings programatically - c#

Flash player has an option in Flash Player Settings manager> camera and Mic > camera and microphone settings > camera and microphone settings by site >
when clicks on this button it shows "website" and "camera and Mic access " we can manually add a website and access permission here.
Is it possible to do programmatic?
If so how...?
I prefer to get a code in C# or Java

It's not possible.
Access to the microphone is done through a permissions-based system in Flash itself. Similar to Google, Facebook & LinkedIn etc., it's done on a approval-from-user basis.
Please read the flash documentation for more information.

Thanks all, I have achieved it by editing sol file. even though it was a tedious task as no documentation available, achieved it with reading each character in the sol file and adding my site content to it.

Related

Play a video on the default media player in Universal App

I would need to execute a function that plays a video in the default media player(Phone or Tab) from Universal Apps that uses Xaml and C#.
I don't want to embed the player .Actually my need is to open a new window with the default player and tell it to play the selected file.
All samples that I've saw in Google are to create an embedded player or send to a device Only.
Could you please give some suggestion for this issue. Thanks in Advance.

How do I get an mp3 to play in a status update from the Windows Phone?

Facebook has this nice feature, that if I paste the link of an mp3 file into my status update, it generates this nice little mp3 player.
For example, paste this link into your status box, and you will see a song named "intro" play on your Facebook wall.
http://pmtmobile.sergata.net/content/songs/4084_Intro.mp3
All very cool.
However, I'm trying share this link with the WindowsPhone share tasks, and Facebook does not generate the mp3 player for it. I have tried both ShareLinkTask and ShareStatusTask but neither seem to allow attachments.
It seems, that facebook generates an "attachment" for the status update, but I'm not seeing any information in the C# APIs to add attachments to a status share.
How can I make this work?
Try ShareLinkTask instead of ShareStatusTask. Here also you face issue means, you may need to implement Facebook library manually for your application.

Build online audio library with ASP.Net + SQL Server

I need some advice on what is the best practice to build an online audio library with ASP.Net + C# + MSSQL. Some key requirements are as follows:
The audio files are stored in database in binary type
On the web UI, user can click on an audio icon to play the audio. The audio will be very short, a few secs max, so there is no need to provide controls except and "play" button.
For playing audio, I don't want to launch a media player explicitly. I just want user to click and s/he will hear the sound.
In addition, I want to stream the audio and I don't want user to be able to download the audio file.
Can anyone shed some light on how to implement this, in particular the playing audio part?
I would use the jQuery Media Plugin. It's freakin awesome!
I would then create an .ashx handler for playing the audio files, and pass those to the media plugin in jQuery.
You can follow this Code Project article, it shows you how to do just about everything you need, except they upload videos. You can easily tweak the code to allow JUST audio though.
It sounds like a very fun project, good luck!

How to play a audio sound in a web page as a background music

I want to play an audio file whenever my page gets loaded onto the client browser. And if a user presses a pause button on the web page then the sound gets paused until he leaves the sound and can resume as well. ?
Here's some examples. But as some said before, its not the best idea to have sound. But if yo do at least have a toggle to mute, turn the volume down or disable it totally.
The easy musicplayer for flash is a easy-to-set up MP3 player solution that does what you need. It provides "play" and "pause" buttons.
Until HTML 5, flash is going to be your best solution, this is mostly because it's an intrusion to have a page commandeer control of the user's speakers, and thus why people have recommended not doing this at all or making it so that the user must explicitly click something.
Here's a page with some freebie flash player options:
http://www.premiumbeat.com/flash_resources/free_flash_music_player/
I found this web site helpful for setting up a sound file from within a page. In my case, I only wanted it to play if they clicked something. I would agree with others here who suggested that.
This web site
http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
One problem I have is when I have a number of web pages open and one of them starts making a sound, it is very difficult to find the page to get it to shut up. It is better to have the user launch the sound.
I guess achieving the same with jquery plugins won't be less exciting!
The jquery mediaplayer does the same. Using this jquery plugin, you can play your media player files without the need of windows media player. The limitation is that this works only with the media player type of files.
Further, since mp3 files are highly used in web pages, we could use the bssound jquery plugin to embed mp3 file in our web page.

how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#?

I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer.
how can i capture a photo from USB connected digital still camera device in my windows application ?
If you use the Windows Image Acquisition Library, you'll see events there for capturing camera new picture events. I had a similar requirement and wrote a test rig; we went down to the local camera store and tried every camera they had. The only cameras we could find that supported this functionality were the Nikon D-series cameras.
We found that with most cameras, you can't even take a picture when they are plugged in. When you plug them in to the USB port, most cameras will switch into a mode where the only thing they'll do is transfer data. The quick way to find out if a camera will work at all is to plug it into a PC, then try to snap a picture. If it lets you do that you have a chance. It also needs to support PTP.
I assume you want to activate the action of taking a picture from the computer which the camera is attached to. If that is the case then the first thing I would do is search for an API for that particular camera model. I don't believe there is a standard protocol/framework for interacting with digital cameras besides accessing the memory card within the camera.
This is depend on the interface the camera exporting. If this is standard mass storage interface you just use standard file interface, i.e you will see the camera as removable disk and can use standard Create/Read/Write/File operation.
Many new cameras have ptp (Picture transport protocol) interface. So you will need using Windows Image Acquisition API.
You might find useful following Link. If i understand correctly this is a sample code for exactly what are you looking for. Google is your friend :)
Another piece of info: many cameras will support both mass storage and ptp interfaces and it will be selectable by camera user interface. In case of automatic mode camera probably will switch to ptp interface.
Usually the camera is displayed as a removable drive when attached.
So for a Winforms application just let the user select the drive and the picture you want to upload. You can do any processing once you have the FileStream of the picture.
In ASP.net you are going to need a FileUpload Control where again the user can select the drive and picture to upload. Processing this time would be via MemoryStream on the HttpRequest.Files object.
Hope that helps.
This depends on your camera.
Many cameras will simply mount as USB mass storage devices. If this is the case, then you can just copy the file from the visible file system like you would any other file on an external disk.
If the camera doesn't make its contents available in this way, you'll need to look at the camera driver documentation to see how they recommend interacting with it.
It will depend on the brand of camera. Here is a link to start with for Canon.

Categories