Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <audio> tag streaming support for mp3 files #245

Merged
merged 1 commit into from Jan 16, 2015

Conversation

@mathiasvr
Copy link
Contributor

mathiasvr commented Jan 16, 2015

Quick fix for issue #201

@@ -99,12 +99,15 @@ FileStream.prototype.pipe = function (dst) {
var self = this
var pipe = stream.Readable.prototype.pipe

if (dst && dst.nodeName === 'VIDEO') { // <video> tag
if (dst && dst.nodeName === 'VIDEO' || dst.nodeName === 'AUDIO') { // <video> and <audio> tag

This comment has been minimized.

Copy link
@feross

feross Jan 16, 2015

Member

The if statement should be dst && (dst.nodeName === 'VIDEO' || dst.nodeName === 'AUDIO') because of order of operations and dst could be undefined. I'll fix.

This comment has been minimized.

Copy link
@mathiasvr

mathiasvr Jan 16, 2015

Author Contributor

Yes you are right! 👍

@feross

This comment has been minimized.

Copy link
Member

feross commented Jan 16, 2015

Awesome, thanks!

feross added a commit that referenced this pull request Jan 16, 2015
Add <audio> tag streaming support for mp3 files
@feross feross merged commit ac3bdfa into webtorrent:master Jan 16, 2015
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@feross

This comment has been minimized.

Copy link
Member

feross commented Jan 16, 2015

Thanks! This was a simple change with awesome results! Released as webtorrent@0.26.0 and deployed to https://instant.io 👍

@lock lock bot locked as resolved and limited conversation to collaborators May 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.