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

Renamed video to media #246

Merged
merged 2 commits into from Jan 17, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Use a map instead of multiple ternary statements

  • Loading branch information
ArtskydJ committed Jan 16, 2015
commit 81427cd808d3fdc9af0e8161c7df3f40ba57e837
@@ -101,13 +101,11 @@ FileStream.prototype.pipe = function (dst) {

// <video> or <audio> tag
if (dst && (dst.nodeName === 'VIDEO' || dst.nodeName === 'AUDIO')) {
var type = self._extname === '.webm'
? 'video/webm; codecs="vorbis,vp8"'
: self._extname === '.mp4'
? 'video/mp4; codecs="avc1.42c01e,mp4a.40.2"'
: self._extname === '.mp3'
? 'audio/mpeg'
: undefined
var type = {
'.webm': 'video/webm; codecs="vorbis,vp8"',
'.mp4': 'video/mp4; codecs="avc1.42c01e,mp4a.40.2"',
'.mp3': 'audio/mpeg'
}[self._extname]

This comment has been minimized.

Copy link
@feross

feross Jan 17, 2015

Member

elegant!

return pipe.call(self, new MediaStream(dst, { type: type }))
} else
return pipe.call(self, dst)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.