How does Chrome get device orientation information? - google-chrome

I was reading about Chrome being able to get device orientation information (Engadget article, WebKit Bugzilla archive). Some questions:
Is there a demo HTML5 page that shows off the use of this device orientation info? What platforms does it work on?
Is this device orientation info available on other WebKit browsers like Safari?
How does Chrome get this information on different platforms? Does it make system calls? Where in the code branch is this done? If I want to help provide this device orientation on a new device/OS/platform, how can I contribute?

Here's Google's HTML5 SlideOrientation demo
Also, MacBooks do have a type of accelerometer, called a Sudden Motion Sensor. It's purpose is to prevent hard drive damage by protecting the hard drive in the event of sudden acceleration.

http://web.me.com/avidrissman/deviceorientation.html, it's only available on OS X.
It's available on iOS, but not in desktop Safari
It reads the accelerometer. It's done in this file. See the how to contribute to chromium guide on how to contribute patches in general.

Related

more insights on how PWA works

might be very basic question but just wanted to clear out my doubt, since I'm seeing PWA is like alternative for native application.
What if browser fail to read/understand manifest file?
what if user is having other/older browser? (most of the time I see e.g of chrome)
after installation what are the browser dependencies for PWA?
Please guide me with the above.
Thanks
One of the more important concepts in a PWA is that it is built following the principle of progressive enhancement, this means that the website would function ordinarily on older browsers (including Safari) and then gain PWA abilities if the user's browser supports them.
Therefore in answer to your three questions:
Website would function as normal without the option to "Add to HomeScreen"
Same.
The PWA runs using the browser, therefore any functionality supported by the browser will be included in your PWA.

Custom Firefox / Chromium install with Pre-installed extension (non enterprise)

i wanted to build a custom browser install that would fit the following specs, i found ways to do it using enterprise deployement, but my intent is to distribute it to friends and family without having to go through the enterprise distribution.
Can be sourced from Firefox or Chromium (or even other as webkit)
Should be easy to customize (ideally no C++ coding)
Should be able to embed extension or hard code the extension within the browser. (i've coded a custom adblock that is lighter and faster than the ones on FF or Chrome store and would also like to embed TOR connection extension)
Remove the ability to install other extensions (i want to ensure this browser cannot be victim of bloatware extensions installs)
Customize UI
Protect the browser against Search engine / HP / New tab settings change.
If you could point me to the right direction it would be awesome and i'll make sure to share this browser's link here once done.
I just saw this in the corner of my eye and figured I'd share this question/answer to possibly help you:
Standard way to build a Chrome extension into Chromium

Casting without dongle and multi device "screen sharing"

Since the Chromecast dongle is using a lightweight version of chrome and able to display (cast;-) content from the cloud, would it not make sense that the fuller version of chrome (on windows, Android, and other platforms) would also be able to be a display device?
In other words, it would allow to cast from a smart phone to a tablet, laptop, or anything that runs Chrome. Simply have these devices added to the list of castable mediums...
Additionally, it looks like a simple and great way to make the technology also support multiple screen sharing...
I suspect you are confusing chrome the web browser (https://en.wikipedia.org/wiki/Google_Chrome) with chrome the operating system (http://en.wikipedia.org/wiki/Chrome_OS).
Chromecast as currently available is only good for accepting comands from compatible software (chrome the browser, the youtube app on android or ios etc) at which point it then streams the requested data from the internet, not from your phone/tablet/computer.
Your idea is not supported, which is stunning as Android has had built in support for screen mirroring via miracast since v4.2.
There's also no mention of direct content streaming, for instance via DLNA, an open protocol designed for EXACTLY THAT.
In fact, a better approach here would have been to make the chromecast dongle a DLNA device and then implement support for it on the google play music and youtube ends.
https://developers.google.com/cast/devprev - don't notice that ability off-hand... it mentions having to email mac addresses and websites and things to 'whitelist' for development, if you could just use your browser I wouldn't guess the dev proccess would be so convoluted.

can a google chrome extension flash an OS style alert?

for example, growl flashes a message in the upper right corner regardless of which application is running. Skype makes the icon in the dock have a little red dot with a number of new messages. Is there anyway to write a chrome extension to have this type of functionality? that is, I want to write a chat system that works in the browser but also notifies users when they have closed my site's tab, or even when chrome is not running.
I could write a native client in addition to my browser based client, but that's double the work. (Tripple the work if you bother with a native window's client vs. just OSX but who would do that?)
Chrome can create "Desktop Notifications" See the Documentation
It's also possible to have the notifications visible when chrome is closed providing you create a "background process". this question/answer might point you in the right direction.
Chrome supports the text-only version of the W3C desktop notification standard. Chrome deprecated the HTML version about a year ago and will stop supporting it very soon. Any webpage viewed in Chrome and any Chrome extension can use this API.
The Rich Notifications API is available to Chrome extensions and packaged apps. As of today, it's dev-channel only and is iterating rapidly. It has implementations on ChromeOS and Windows, with Mac on the way. Linux currently delegates to the W3C implementation. The API is not a 1:1 replacement of W3C HTML desktop notifications, but it does provide many layout options for common use cases.

Are there any web standards for voice over IP?

Web browser plug-ins such as Flash already provide VoIP functionality in a web browser, but is it possible to have browser VoIP without any plug-ins?
Ericsson Labs has posted information using the device element to allow for microphone input. This, in addition with WebSockets could be used to implement VoIP. However, the device element is not implemented in any web browser yet.
No there isn't but the device element will likely be the way in the future, as you mentioned. I don't think it will take too long for browsers to look into it however. There are also the WAC APIs, but they are only on mobile, and not shipping quite yet.
Update: There is now a standard in development called WebRTC. Drafts of this spec are supported by Chrome and Firefox. Microsoft have made an alternative proposal called CU-RTC-Web