MobileChromeApps / mobile-chrome-apps

Chrome apps on Android and iOS
BSD 3-Clause "New" or "Revised" License
2.5k stars 347 forks source link

getUserMedia video not displaying #188

Closed FreakTheMighty closed 10 years ago

FreakTheMighty commented 10 years ago

Based on an update to your API Implementation Status it appeared that getUserMedia was now supported for Android. I was able to get audio capture to work, but not video capture. The video element is simply black. I haven't been able to get developer tools working, so I can't tell whether there are errors, however it runs fine on the desktop.

The plnkr bellow contains files I am using.

http://plnkr.co/edit/xiDjcSB7DlhHRyod2LTd?p=catalogue

drkemp commented 10 years ago

Thanks for letting us know. WebRTC is on on the roadmap using the newest webview. We should have full support in an upcoming version.

FreakTheMighty commented 10 years ago

@drkemp sounds great. I just wanted to provide a small, and probably obvious update. I was able to get the debugger working and can confirm that the media stream returns with an audio track but no video tracks. Also, it is my understanding that the project is now using crosswalk. I have tested getUserMedia on a crosswalk project and everything worked well..

I'm very much looking forward to this feature! Thanks.

g105b commented 10 years ago

Sounds very interesting indeed. Any idea of release date for the new webview?

mmocny commented 10 years ago

The crosswalk webview has landed as of 0.1.1 (see our Release Notes)!

We've tested it previously, and its exciting to see this (and other new platform features) working. Please upgrade cca and upgrade your application, then let us know how it went!

(Btw, latest cca supports cca upgrade in-place so you don't need to re-create your project any more.)

g105b commented 10 years ago

This is amazing progress, but am I right in saying that you can't use any of the crosswalk niceties in ios? On 19 Jul 2014 13:43, "Michal Mocny" notifications@github.com wrote:

The crosswalk webview has landed as of 0.1.1 (see our Release Notes https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/RELEASENOTES.md )!

We've tested it previously, and its exciting to see this (and other new platform features) working. Please upgrade cca and upgrade your application, then let us know how it went!

(Btw, latest cca supports cca upgrade in-place so you don't need to re-create your project any more.)

— Reply to this email directly or view it on GitHub https://github.com/MobileChromeApps/mobile-chrome-apps/issues/188#issuecomment-49508540 .

clelland commented 10 years ago

That's correct -- there is no equivalent of Crosswalk for iOS. This is mostly due to Apple's App Store review guidelines, which say

2.17 Apps that browse the web must use the iOS WebKit framework and WebKit Javascript

Because of that, there's very little incentive for the browser vendors to produce an alternate WebView for iOS, even for apps which don't technically browse the web.

We're waiting to see what capabilities the new WKWebView component brings to iOS 8, and hoping that it will provide a lot of the benefits that Crosswalk does to Android.

beaufortfrancois commented 10 years ago

I can't get the camera with cca 0.2.1-rc1. Even though I've defined 'videoCapture' and 'audioCapture' permission in my manifest, I'm still a stream that contains only one AudioTrack and no VideoTrack.

Am I missing something obvious there?

drkemp commented 10 years ago

Unfortunately the changes to support those permissions has not yet landed in 0.2.1. It is on the short list though...

On Mon, Jul 21, 2014 at 11:12 AM, François Beaufort < notifications@github.com> wrote:

I can't get the camera with cca 0.2.1-rc1. Even though I've defined 'videoCapture' and 'audioCapture' permission in my manifest, I'm still a stream that contains only one AudioTrack and no VideoTrack.

Am I missing something obvious there?

— Reply to this email directly or view it on GitHub https://github.com/MobileChromeApps/mobile-chrome-apps/issues/188#issuecomment-49618361 .

beaufortfrancois commented 10 years ago

Thanks. Will wait then ;)

mmocny commented 10 years ago

I've gotten getUserMedia working using a regular html5 workflow.. is this due to differences in chrome apps vs web apps?

beaufortfrancois commented 10 years ago

I'm not sure but web-apps getUserMedia prompts user first whereas in the chrome-apps world, there is no prompt, only permissions granted in the manifest.

drkemp commented 10 years ago

The problem is simply permissions. cca needs to handle the manifest permissions and add Android permissions in the config.xml. You can manually fix it and move on, but it may be overwritten

On Mon, Jul 21, 2014 at 11:35 AM, Michal Mocny notifications@github.com wrote:

I've gotten getUserMedia working using a regular html5 workflow.. is this due to differences in chrome apps vs web apps?

— Reply to this email directly or view it on GitHub https://github.com/MobileChromeApps/mobile-chrome-apps/issues/188#issuecomment-49621739 .

mmocny commented 10 years ago

Ah got it. I was testing with an app that had a bunch of plugins that coincidentally added those permissions.

Thanks David.

mmocny commented 10 years ago

Reopening until we actually add the permissions to native. @beaufortfrancois has volunteered to submit a PR!

drkemp commented 10 years ago

Awesome! I was just going to look at this - but I will wait.

On Tue, Jul 22, 2014 at 9:03 AM, Michal Mocny notifications@github.com wrote:

Reopening until we actually add the permissions to native. @beaufortfrancois https://github.com/beaufortfrancois has volunteered to submit a PR!

— Reply to this email directly or view it on GitHub https://github.com/MobileChromeApps/mobile-chrome-apps/issues/188#issuecomment-49735349 .

beaufortfrancois commented 10 years ago

For info, the WIP can be found at https://github.com/MobileChromeApps/mobile-chrome-apps/pull/218