How to play HTML5 video using Qt WebKit - qt5

I have created one QtWebkit based app , and trying to load below mention URL, which if we open in Firefox , it will show as a HTML5 video.
http://www.youtube.com/watch?v=JYc2jP4LLGo&html5=True
In my application I am getting youtube html5 player getting loaded, but it is not displaying any video content.
I tried even in the browser sample application which comes along with the Qt SDK installtion.
I am getting the same result as my app is.
below mention is the code which I wrote
QWebView *view = new QWebView();
QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
view->load(QUrl("http://www.youtube.com/watch?v=cTl3U6aSd2w&html5=True"));
view->setGeometry(50,50, 800, 600);
view->show();
Machine :- both Windows 7 X64, Windows7 ultimate X86
Qt5.1 SDK

QT5.2 ( http://qt-project.org/downloads ) now supports <video> tag (html5).
if using QT-32bit, the system must have installed video codecs for 32bit.
K-lite codec download:
http://www.codecguide.com/download_k-lite_codec_pack_full.htm

Related

Chromium does not play video

I am trying to play video on the Chromium browser but it is not working. Just for an example, when I went to this URL https://edition.cnn.com/videos/business/2018/10/03/5g-explained-orig.cnn-business , the video on the page did not play.
Operation System: Windows 10
Chromium Version: Version 79.0.3945.0(Developer Build) (64-bit)
Do you know any solution for that?

Safari 12 Extensions and NativeMessaging

With the release of Safari 12, Safari will no longer support NPAPI plugins. My use case is to be able to launch a java application located on a client from a browser extension which I can currently do in Chrome and Firefox with NativeMessaging. From my reasearch, I do not see a way to do this in Safari 12. The closest I can see is their "Safari App Extension" project but this looks like it requires that you package up your native app with the extension and distribute it through the App Store. I am not at all a Mac developer so I am looking for some advice. Does anyone know if Safari supports my use case?
We can create a extension that will download our dmg app with the native code.And run the dmg app after it is getting downloaded.
Then we can place our extension in the safari extension gallery.
We have implemented it in the similar way where our extension look for the json file which in turns download the DMG app that we have kept in the server.

Render camera preview in Chrome using Native Client SDK

I'm trying to write ppapi plugin for Chrome which will use webcam (show preview and write file). I have installed NaCl sdk with pepper_35.
There available examples in /examples/api/ folder: media_stream_audio and media_stream_video.
The audio example works fine - requests access to microphone and shows some kind of preview.
The "media_stream_video" example must show web-camera video preview, but when I load example on the local web server (with make serve command), there appears red rect, and Chrome asks for the web camera access. When I click “allow” - webcam indicator lights-up, chrome show that web page uses the web camera, and I see the camera settings icon. But the preview doesn't work, there still red rectangle instead.
I checked this on Windows 8.1, Windows 7 and Mac OS X, with five different webcams, and have no idea what can be wrong.
Maybe someone already encountered with the same problem?
Installing the pepper_37(dev) version of NaCl SDK solved the problem. Looks like it is unstable version currently, but it works.

Why would Flash embeds show up as "Missing Plug-In" in a Cocoa WebView?

Building a very straightforward Cocoa app using Xcode 5. The main window is simply a WebView with plugins enabled that attempts to load a page from the Internet with a Flash embed on it.
Sandboxing is disabled and I've double- and triple-checked that plugins are enabled on the webview (both in the nib and programatically.) I've also tried running the app in both 32- and 64-bit modes.
Even navigating the WebView to the Adobe Flash website shows a missing plug-in box. What could cause the WebView object to not have Flash available?
I would guess that it is one of 3 options.
You do not have flash installed at all.
You have flash installed, but do not have the flash plug-in installed.
You have an old version of flash installed, and it has been disabled.
I have verified that it works (on my system) with a very small test:
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:#"http://www.adobe.com/swf/software/flash/about/flashAbout_info_small.swf"]];
[[self.webView mainFrame]loadRequest:request];
Are you sure the necessary WebView plugins are installed?
Is this only happening on your machine or can you replicate on another as well?
Maybe this post is helpful:
Mac OS/WebView: Why Flash and other plugins are not available when a local page is loaded?

Howplay mp4 songs using NAudio

Can we play mp4 songs using NAudio?
Please provide some code to play mp4 songs
I need a c# code that will help me play mp4 songs
You can play .mp4 files using NAudio, there is a demo in the official page.
Donwload the Demo-Apps and look for the "Media Foundation Demo". The C# code of the demo can be found at the Source Code of NAudio.
Link to Demo-Apps
Link to Source Code
The implementation is in the WasapiOutGuiThread class:
WasapiOutGuiThread : IWavePlayer
Update: NAudio can now play MP4 files using the MediaFoundationReader assuming you have the appropriate codecs installed. This works on Windows Vista and above, and if you are running Windows Server you may need to have the "Desktop Experience" installed.
Alternative approaches would be to see if the WPF Media Element can play it, or using the Windows Media Player ActiveX control (on an OS that can play MP4s).