c# WPF Browser with html5 video and javascript injecting - javascript

I'm searching a good webbrowser for my project but I can't find one.
I need html5 video streaming (doesn't work in CefSharp) and
I need javascript injecting (doesn't really work in the normal webbrowser)
Thanks for help

CefSharp is able to play html5 video and audio. And here's the list with all the supported audio and video codecs.
Just because CefSharp doesn't include proprietary Audio and Video codecs, doesn't mean it can't. Due to licensing reasons mentioned here, CefSharp is not including them. You can however build cef and embed your own codecs in it.
You can always grab the code from their GitHub Repository and experiment your self considering this great answer on stackoverflow
Or you can use GeckoFx as suggested on another answer posted on similar question on stackoverflow. Which is isn't really a WPF Control, but you can use it with a WindowsFormsHost.

Related

Web AVI Player?

I'm looking to play AVI files in a web browser however I can't seem to find a decent tool to do so.
The basic WMP object embed is what I'm using right now but it doesn't really do what I'd like it to do, and I can't really implement JavaScript into it. (AFAIK I can't. I done a little digging and that's the conclusion I came to)
I've also tried DivX though I don't really like it. It has adverts, and I've no idea if JavaScript can be included either.
AFAIK Flash doesn't support AVI playback at all.
Does anyone know of any player at all that can play AVI files on the web, which I could possibly integrate some kind of JavaScript in (or has an API)?
Just a thought too, but would Java itself have anything like this?
The player also needs to be able to source the files like this:
file:\\Network-PC-Name\avi\avifile.avi
What you're looking for is WebChimera, there's no doubt about it. It has the most complex JS API ever made for web video, and it supports all file types.. it also supports "file:///" (for links like file:///C:/avi/avifile.avi).
It is open source and has no advertising. And the best part is that everything inside the player is editable, so you can skin it, add buttons and even add entirely new features to it with mostly just JavaScript. :)
Update
As you mentioned you need it to connect to file:///Network-PC-Name/avi/avifile.avi, this tells me you need this for some Local / Private / LAN use.
In this case, I think the best solution for you is to use WebChimera with Node-Webkit, as it will also give you a JS API based server environment.
WebChimera Player is already ported to NW for Windows and Mac:
https://github.com/jaruba/WebChimeraPlayerNW
On Windows, just download the package, and run nw.exe. To customize just edit the html pages. For Mac, just follow the instructions in the Readme.md.
The great part about using it like this, is that it already has the plugin embedded in the app, so you won't even need to install the plugin for the player to work.
The only thing I can't be fully sure of, is if Network-PC-Name can even be accessed through the file:/// protocol in it's normal usage. But this would still be possible anyway as you could map the network drive, and you can even map it programatically (with only JavaScript!) by using the child process exec to run the necessary command. (child_process is built in node-webkit natively)
flowplayer is recommended by this post:
Flash video player for AVI files (free for commercial use)
not sure about the file:\ source, as that's on your local machine and could be refused by the browser for security reasons

JavaScript and microphone audio stream

Since HTML5 isn't ready yet, and getUserMedia doesn't work in browsers i have tested, I am asking that is there any "wrappers" so I could grap audio stream from microphone and send it to server with Javascript. Similar wrapper has been made with web cameras: (google for a "jquery-webcam-plugin". Two link restriction), but I haven't found any similar things for microphone audio streaming.
Audio can be in any commonly known format.
Flash is not my daily basis, flash tips might not help.
Since Google gears has been deprecated, I think it is not wise to use AudioApi. This is not a good news either, so I am guessing that only choices are Java and Flash.
I will appreciate every hint and tip I get.
I'm not sure what you mean by "Flash is not my daily basis". Your other option is Java, but that's less user-friendly. If you're going to require a plug-in (and you'll have to until getUserMedia() is implemented), you might as well make it Flash.
Here is a project that wraps a simple Flash app with a Javascript API that streams audio via an HTTP post to a web-server of your choice:
https://code.google.com/p/wami-recorder/
It's not ideal, but it works and does not require a clunky Flash Media Server.

Sound in the browser seamlessly with JavaScript

I know, I know, this is a duplicate question of this and this. However, these questions are somewhat outdated, and I haven't found a suitable solution.
I would like an easy, cross-browser and cross-platform solution for playing sound in the browser using JavaScript. I use and love jQuery, and had a look at this pluggin. I've tested the demo but was disappointed. For example, I had to allow the application to play the file. I want it to just work without any plugin, authorisation, etc.
I know that the AngryBirds chrome extension plays sound in the browser seamlessly but I don't know how they do it. Any suggestions for seamless sound in the browser?
I like to use Sound Manager 2 for this. It depends on Flash. It looks like it hasn't been updated in a while though, so it might not be a good choice if it doesn't already work in all the browsers you care about. Support for the audio tag is getting pretty good.

Is HTML5 developed and documented enough?

I own a site which offers a Flash based music shopping cart which steams music using RTMP. Mobile devices are getting more and more popular and the exclusion of Flash means they don't support my Flash application. I was wondering if it's possible to create the same kind of Flash widget I have on my site in HTML5 or maybe even JavaScript alone? Is HTML5 developed enough for this kind of system? If possible, would users be able to embed an HTML5 version of our players? Can you stream music via RTMP using anything but Flash?
Thanks for your help
To answer your question YES HTML5 is documented and developed enough but the question that you should be asking is "Is HTML5 supported enough?"
HTML5 is markup AND JavaScript and its not supported in every browser. This is mitigated though by many great JavaScript libraries that will gracefully degrade depending on what browser/device is viewing it.
If you just want to learn more and make a decision for yourself I would suggest reading Dive into HTML5 to figure out what HTML5 is all about and what it offers.
No, you cannot stream music using RTMP in HTML5. However, you can offer music in mp3 and ogg formats. (You'll need to offer both to cover all browsers)
After looking at your site, I would recommend you continue to use flash because HTML5 does not support streaming audio, only audio available to download. While the shopping cart and everything else can mostly be done in HTML5, your users will still need Flash unless you want to allow users to download the music easily.

Can JS/jQuery interact with audio?

I'm writing a page for a musician and am excited about using the HTML5 <audio> tag to create a custom player. I'd also like to experiment with some kind of visual feedback from the music being played. Are there any JavaScript experiments/libraries/APIs that exploit this idea? Is it even possible?
EDIT: It's indeed possible. Here is an impressive list of apps using the Chrome Web Audio API. I'd still love to see what you've got.
I know it's possible in Firefox
Spectrum Visualization:
http://ajaxian.com/archives/spectrum-visualization-with-the-html5-audio-data-api
Mozilla Audio API:
https://wiki.mozilla.org/Audio_Data_API
But I'm not sure about other browsers... I couldn't find much else on the topic.

Categories