Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-04-24 08:04:43 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-04-24 08:06:23 +0300
commit7dc28e1c5d9f99d7f3e65d0bdf38bd63d4f7c66f (patch)
tree5db69b96594c106ca5f496286bb2c89c0b0d8ff1
parent418e7f7d5cf9265ec17271d376f83ed0b7136979 (diff)
media-stream: don't autoplay media
autoplay can be triggered by setting autoplay property on the `video` or `audio` tag. ```html <video autoplay> ```
-rw-r--r--lib/media-stream.js5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/media-stream.js b/lib/media-stream.js
index 004135d..7ca9ecf 100644
--- a/lib/media-stream.js
+++ b/lib/media-stream.js
@@ -23,7 +23,6 @@ function MediaStream (media, opts) {
debug('new mediastream %s %s', media, JSON.stringify(opts))
self._mediaSource = new MediaSource()
- self._playing = false
self._sourceBuffer = null
self._cb = null
@@ -61,10 +60,6 @@ MediaStream.prototype._write = function (chunk, encoding, cb) {
self._sourceBuffer.appendBuffer(chunk)
debug('appendBuffer %s', chunk.length)
self._cb = cb
- if (!self._playing) {
- self.media.play()
- self._playing = true
- }
}
MediaStream.prototype._flow = function () {