Skip to content

Instantly share code, notes, and snippets.

@donpark
Created February 7, 2012 20:28
Show Gist options
  • Save donpark/1761752 to your computer and use it in GitHub Desktop.
Save donpark/1761752 to your computer and use it in GitHub Desktop.
Notes on Chrome Canary implementation of WebRTC

Version: 19.0.1032.0 canary

getUserMedia

According to current getUserMedia spec, getUserMedia function is:

navigator.getUserMedia({audio: true, video: true}, gotStream, gotError);

which didn't work. What worked was:

navigator.webkitGetUserMedia('video', gotStream, gotError);
navigator.webkitGetUserMedia('video, audio', gotStream, gotError);

LocalMediaStream

LocalMediaStream object in success callback had following fields and methods:

`audioTracks[]` - MediaStreamTrackList (length = 1)
`label` - string identifier of sort
`onended` - likely end of stream callback
`readyState` - 1
`videoTracks[]` - MediaStreamTrackList (length = 1)
`stop()`
`ENDED` - 2 (readyState value)
`LIVE` - 1 (readyState value)

audioTracks[0] had following fields:

`enabled` - true
`kind` - 'audio'
`label` - 'Default`

videoTracks[0] had following fields:

`enabled` - true
`kind` - 'video'
`label` - 'Build-in iSight`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment