Playing Flash video using cefsharp or Geckofx - winforms

I'm putting together a simple winforms app for playing videos from the web for my kids. I've explored two options so far but I'm having problems with both of them:
cefsharp: Playing videos wasn't a problem, but it would not persist cookies (even with the CachePath set), so I would have to log into the web sites each time. This would not be very user-friendly.
GeckoFX: No matter what site I go to (youtube for example), flash videos will not play. I get a bank section on the page where the video goes. Based on other questions, I tried adding the line "Gecko.GeckoPreferences.Default["extensions.blocklist.enabled"] = false;" right after the initialize statement, but that did not work. I'm running xulrunner-33.0.2 and GeckoFx-Windows-33.0-0.2.
Any ideas on how to get either solution working would be appreciated.
UPDATE:
I found this site https://bitbucket.org/geckofx/geckofx-29.0/issue/14/plugin-flash-not-working-since-xulrunner which stated to turn off the "Visual Studio hosting process" for the project and now YouTube video play with GeckoFX, but no videos play off xfinitytv's site (http://xfinitytv.comcast.net/watch-live-tv/).

A bug has recently been fixed in CefSharp to make this possible. See this issue: https://github.com/cefsharp/CefSharp/issues/843
What should work is:
setting CachePath
set the persist_session_cookies command line argument
after OnContextInitialized, call Cef.SetCookiePath
You'll need to use the latest version 39.0.1 to get access to the OnContextInitialized delegate.

Related

Screen sharing and screen control on android and iOS using WebRTC

I've to share a mobile screen and display it on a browser using WebRTC. I then have to take control of the mobile screen.
I've researched this and know I can share a screen browser to browser using chrome(with extension) or firefox(after certain flags are set). Some information I've read suggests that screen sharing on mobile is not possible and then another article said it was but I think they meant be sharing through the chrome browser on a mobile.
Some of the the information and posts I read are dating back to 2013/2015/2016 and I wondered if there is any new information on this?
Is screen sharing on mobile devices(android or iOS) possible using webrtc now?
is screen control on mobile devices possible?
Thanks Andrea
I also investigated this topic a few days ago and it seems to me we are on the verge of the next step and the technology hasn't totally settled yet. Screencapture is mostly working with (very) up-to-date browsers and (still) an extension or some kind of white-listing. I could not find any kind of hint that a "remote control" mechanisms are part of webrtc and the getUserMedia implementations. Unfortunately.
ICE seems to work fine for most scenarios (if you don't mind waiting a minute) and Tickled ICE adresses the problem in an interesting way.
Mobile is very confusing indeed as the market is even more heterogeneous.
Maybe we should open a wiki or a chat channel or whatnot they habe nowadays on stackoverflow :-) I think I will have to read about this "community wiki" checkbox down there...
The most promising thing I could find was
https://inthelocus.com/
Still trying it out in different scenarios.
[This might not be an answer...] I was on the same topic and then I noticed there's an existing tool (SDK) to serve the similar purpose: https://cobrowse.io. It works good in both the demo video and the simulator web page. Yet I'm not sure if it utilises WebRTC...

Controlling SilverLight application using selenium does not work

I am trying to automate an web application where in I am trying to control the silver light application.
I need to play pause and stop the player embedded in HTML.
There is an object tag which has an id for player.
I am trying to execute the JavaScript as follows
return document.getElementById('wptv_services_common_widgets_player_silverlight_PlayerObject_0').CurrentState
How ever I am not getting anything in return. What I get is just None as a result.
Similarly I also try to pause the player but I get different errors:
document.getElementById('wptv_services_common_widgets_player_silverlight_PlayerObject_0').Pause()
but i get
error: 'document.getElementById(...).Pause is not a function'
If I edit the code to use with ' () ' then there is no error but nothing happens on the video ie. it does not pause.
Note: I got the link How do I pause/play/seek a silverlight video using javascript and this is exactly what i want to achieve but the solution mentioned is not working for me.
I worked for youtube player and reference their API and similar functions were working just fine.
I am not familiar with silver-light application myself so a bit detailed information will be helpful.
Any help will be highly appreciated.
Silverlight doesn't expose a DOM that is accessible to Selenium. If you have the sourcecode to the Silverlight application, you can expose specific functions to javascript host.
If you don't have source, you can use TestStack.White with Silverlight. Although it may be a bit clunky (because it works with standard accessibility that's built into Silverlight), it works.
For more information see https://github.com/TestStack/White

Using VB based Visual Studio project with AngularJS/HTML5

My goal is to write a desktop application created through Visual Studio which uses HTML5 and AngularJS to display a well put together front end to the user but which also allows for me to use VBscript so I can do read/write items, send things to the printer, and compose/send emails from their outlook automatically.
Can this be done and which options should I select when starting my project? I can not have this run through a traditional web browser since I am doing the above mentioned items which browsers won't let me do.
p.s. I just download VS 2015 community today. I have spent the day researching and finding lots of helpful information but nothing which answers this.
You don't need VBScript
You should check out Electron, with which you can develop desktop applications in Javascript / HTML5, and maybe, an AngularJS - Electron seed project to speed things up.
Now if you consider Electron, you can check out this answer about printing with Electron.
If you want to persist in this (which seems to be the best course of action in my opinion), you can find any informations about how to do this and that with electron by reading the docs, tutorials and basic google searches.
Don't hesitate to come back to SO if you have precise questions regarding code you already have.

Twilio WebRTC Video freezing on Mobile Web

I've implemented the Twilio Video quickstart code in my project using ReactJS and after a few tweaks, it all seems to work fine on chrome and firefox from my computer, but when I try to use either the preview or make a call with another client from my mobile web browser, the video does not move. It is stuck, but the video streams will work fine if I am moving the screen with my finger or if my finger is just on the screen, but will freeze on it's current frame the moment I stop moving the screen. I am not sure if this is an issue with the way Twilio attaches the video or if there is just something about mobile browsers that I don't understand when attaching video streams.
Thanks for the help
So there are a few things that could be going on here. Currently and also for the foreseeable future, Twilio Video will require the A6 system on chip, so older devices like an iPod Touch (5th gen) for example, would not supported.
https://www.twilio.com/docs/api/video/system-requirements
You might try to modify the bitrate indirectly through modifying the resolution. There is some sample code (in Swift) demonstrating this API:
https://github.com/twilio/video-sample-ios-capture-render/blob/master/VideoSampleCaptureRender/ViewController.swift#L205
Lastly, reporting of connection information through the conversation delegate does receive statistics:
https://media.twiliocdn.com/sdk/ios/conversations/releases/0.22.0/docs/Protocols/TWCConversationDelegate.html#//api/name/conversation:didReceiveTrackStatistics:
however there is not an automatic way to adjust the resolution based on these statistics.
Hope this helps to point you in the right direction. Please let me know in the comments what you find out.

Possibilities for full blown silverlight applications

Since the launch of Silverlight 2 I was expecting a lot of full blown Silverlight applications popping up but still there seem to be little evidence of this. Does anybody know of such applications out there in the wild. And also what would be the obvious applications you would develop in Silverlight. I would say mail clients are bad examples as they just as well could be written as a web/ajax app. As Silverlight is far more powerful than web+ajax possible candidates should be impossible/akward implementing as a web/ajax app.
The ones that comes to my mind is
Photo and imaging editing apps
Reporting applications
Office applications, Word/Excel...
Edit:
Added from posts
Games
The point isn't that the app need to fill the whole screen just that it isn't just a small part of a webpage, or you could call it a full blown application running inside the webbrowser, only using the webbrowser as a host.
I think the Medical app that Microsoft itself developed shows pretty well what could be achieved with silverlight http://www.mscui.net/PatientJourneyDemonstrator/
As for image editing then as I understand its a bit difficult as Silverlight lacks a Bitmap API to be able to do per pixel image editing...
Edit:
I noticed you added Word/Excel to your question and there comes the problem that Silverlight doesn't have a rich text editor built in and there hasn't been real good examples of custom implementations. There is one http://www.codeplex.com/richtextedit but I haven't seen any applications that actually use it.
I'm working on one in the medical domain.
This started as an update of a Mac classic application but due to the amount of work involved, broadened to considering other toolkits. I convinced them to go for an initial WPF desktop port to be followed by a Silverlight version.
I don't know one so far, but I could imagine that it could be used in a kind like the fullscreen video playback on youtube.
How many fullscreen desktop apps are there? Most application don't need the entire screen. If you don't want to be distracted by menus and taskbars and so you go fullscreen. Another type of applications that can use fullscreen are games.
You are limited in fullscreen to certain key presses such as arrow keys, tab, enter, and space so this rules out some of those types of apps. They have done this for security reasons so an app can't hijack the screen and record the keypresses, but I wish they could come up with a scheme to sufficiently warn the user then allow it if they consent.
An application Microsoft seem to like to show case is the AOL mail client written entirely in silverlight.
Personally I follow the rule is if you would not write it in flash you would not write it in silverlight preferring AJAX in most cases. In the past most large flash application have failed such as the flash word processor (cant remember the name) while AJAX enabled applications such as google documents have taken off.
Finally I believe until moonlight (linux and mac support) has been released and more general users have silverlight downloaded developers will be reluctant to use it widely even for smaller apps and gadgets.

Resources