There's no perfect way to change the user agent string for the UWP WebView (x-ms-webview in HTML, Windows.UI.Xaml.Controls.WebView in XAML, and Windows.Web.UI.Interop.WebViewControl in Win32) but there are two imperfect methods folks end up using.
The first is to call UrlMkSetSessionOption. This is an old public API that allows you to configure various arcane options including one that is the default user agent string for requests running through urlmon. This API is allowed by the Microsoft Store for UWP apps. The change it applies is process wide which has two potential drawbacks. If you want to be able to have different UA strings set for different requests from a WebView that's not really possible with this solution. The other drawback is if you're using out of process WebView, you need to ensure you're calling into UrlMkSetSessionOption in the WebView's process. You'll need to write third party WinRT that calls UrlMkSetSessionOption, create the out of proc WebView, navigate it to some trusted local page, use AddWebAllowedObject or provide that URI WinRT access, and call into your third party WinRT. You'll need to do that for any new WebView process you create.
The second less generally applicable solution is to use NavigateWithHttpRequestMessage and set the User-Agent HTTP header. In this case you get to control the scope of the user agent string changes but has the limitations that not all sub resource downloads will use this user agent string and for navigations you don't initiate you have to manually intercept and re-request being careful to transfer over all POST body state and HTTP headers correctly. That last part is not actually possible for iframes.
WinRT (JS and
C++)
|
JS Only
|
C++ Only
|
.NET Only
|
|
Parse
|
|
|||
Build
|
||||
Normalize
|
||||
Equality
|
|
|
||
Relative
resolution
|
||||
Encode data for
including in URI property
|
||||
Decode data extracted
from URI property
|
||||
Build Query
|
||||
Parse Query
|
One persons quest to watch the Olympics online.
The location requirements (guessed at via IP address) are irritating. The requirement that you have a particular cable subscription to view video online seems like not network neutrality.
Also this related article:
http://techcrunch.com/2012/07/27/nbc-olympic-opening-ceremony/
The conversation surrounding how to liberate HBO from its cable partners and create the entertainment utopia viewers have long desired has been fascinating.
The resulting analyses of the numbers has pretty much shown that the amount people are willing to pay is not nearly enough to…
“The syntax for allowed Top-Level Domain (TLD) labels in the Domain Name System (DNS) is not clearly applicable to the encoding of Internationalised Domain Names (IDNs) as TLDs. This document provides a concise specification of TLD label syntax based on existing syntax documentation, extended minimally to accommodate IDNs.” Still irritated about arbitrary TLDs.
|
TV | PC |
---|---|---|
Comcast TV | Xbox 360 + Windows Media Center | Windows Media Center |
Comcast OnDemand | Cable box | Fancast |
Hulu | Xbox 360 + PlayOn + Windows Media Center | Hulu |
Netflix Watch Instantly | Xbox 360 + Netflix App | Netflix Watch Instantly |
Netflix DVDs | Xbox 360 | PC |
Irritatingly out of line with what their commercials say, in my area Comcast, under the covers of the national broadcast digital switch, is sneaking in their own switch to digital, moving channels above 30 to their own digital format. Previously, I had Windows 7 Media Center running on a PC with a Hauppauge PVR500 which can decode two television signals at once setup to record shows I like. The XBox 360 works great as a Media Center client letting me easily watch the recorded shows over my home network on my normal TV.
Unfortunately with Comcast's change, now one needs a cable box or a Comcast digital to analog converter in order to view their signal, but Comcast is offering up to two free converters for those who'd like them. The second of my two free converters I hooked up to the Media Center PC and I got the IR Blaster that came with my Hauppauge out of the garage. I plugged in the USB IR Blaster to my PC, connected one of the IR transmitters to the 1st port on the IR Blaster, and sat the IR transmitter next to the converter's IR receiver. I went through the Media Center TV setup again and happily it was able to figure out how to correctly change the channel on the converter. So I can record now, however:
The weekend before the previous, Sarah and I moved our belongings into the new house and spent a lot of time packing and unpacking, and now we're officially living there (interested Facebook friends can find my new address or just ask me). The Saturday of the previous weekend Sarah's family came over for a half house warming and half Sarah's birthday celebration which was fun and served to force us to do more unpacking and forced me to take trips to Home Depot, Bed Bath and Beyond, etc. On Sunday, Sarah and I went out to her favorite restaurant and she opened her gifts that I had to hide to keep her from opening before her birthday. Happy Birthday Sarah!
While at Home Depot I had trouble finding what I was actually looking for, but I did find everything I needed to terminate the Cat5e cables that are wired in the house. Each room has a wall plate with two RJ45 sockets, both sockets wired to Cat5e cable. One of the cables per plate was already hooked up to a standard phone service punchdown board and the other cables per plate were all hanging unterminated next to the punchdown board. So now I've terminated them all with RJ45 connectors and hooked them up to my hub, wireless router, cable modem, etc. I had the same sort of fun setting all that up as I did playing with model train sets as a child. Hopefully no therapy will be required to figure out why that is.
The new name reminds me of the show Friends. Also, I hope they get a new favicon - I don't enjoy the stretched 'b' nor its color scheme.
My GPS was stolen last night or this morning and I'm missing it already. For instance when I drove to Novus glass repair to get my front passenger window replaced I drove down the wrong road for a while.
When I got out of my apartment this morning there was a police car sitting in my parking lot and the officer asked me: "David? ... What'd you leave in your car?". My face must have changed a lot when I had the following sequence of realizations: (a) a police officer is asking for me by name, (b) I'm not in trouble, (c) my car must have been burgled, and (d) my GPS must be stolen.
The officer was waiting outside my complex because someone had reported my car's broken window to the police in the morning. The officer was very courteous and upon taking my date of birth noted that we were born on exactly the same day. The window's safety glass was shattered and lying in tons of tiny pieces all over the passenger seat, my glove box was open and the middle armrest where I keep my CDs was open. Nothing appears to be missing other than the GPS, the GPS power cable, and the GPS dash mount. Adding insult to theft, the their scattered my CDs throughout my car and didn't take any of them, insulting my taste in music.
My car's window should be repaired now and hopefully the rain that came in through the broken window until I covered it with plastic bags (classy!) didn't do any permanent damage.