diff --git a/google-youtube-upload.html b/google-youtube-upload.html
index 5a85d31..6d80dbf 100755
--- a/google-youtube-upload.html
+++ b/google-youtube-upload.html
@@ -11,7 +11,7 @@
@@ -301,10 +334,6 @@
* is enabled for your API project, and ensure that the JavaScript Origin
* is set to the domain hosting the page on which
* you'll be using this element.
- *
- * @attribute clientId
- * @type string
- * @default ''
*/
clientId: {
type: String,
@@ -363,7 +392,7 @@
* The [privacy setting](https://support.google.com/youtube/answer/157177?hl=en)
* for the new video.
*
- * Valid values are 'public', 'private', and 'unlisted'.
+ * Valid values are `public`, `private`, and `unlisted`.
*/
privacyStatus: {
type: String,
@@ -393,6 +422,30 @@
value: Boolean('MediaRecorder' in window &&
'mediaDevices' in navigator &&
'getUserMedia' in navigator.mediaDevices)
+ },
+
+ /**
+ * The [MediaStream audio constraints](https://developer.mozilla.org/docs/Web/API/MediaStreamConstraints/audio).
+ */
+ audio: {
+ type: Object,
+ value: true
+ },
+
+ /**
+ * The [MediaStream video constraints](https://developer.mozilla.org/docs/Web/API/MediaStreamConstraints/video).
+ */
+ video: {
+ type: Object,
+ value: true
+ },
+
+ /**
+ * The media type.
+ */
+ mimeType: {
+ type: String,
+ value: 'video/webm;codecs=vp9,vp8'
}
},
@@ -496,12 +549,12 @@
}
return navigator.mediaDevices.getUserMedia({
- audio: true, video: true
+ audio: this.audio, video: this.video
}).then(function(stream) {
this.$$('#get-user-media').src = URL.createObjectURL(stream);
this._recordedBlobs = [];
this._mediaRecorder = new MediaRecorder(stream, {
- mimeType: 'video/webm;codecs=vp9,vp8'
+ mimeType: this.mimeType
});
this._mediaRecorder.addEventListener('dataavailable', function(event) {