Skip to content

Commit

Permalink
fix(media-creation): Creates new instances every time the audio or vi…
Browse files Browse the repository at this point in the history
…deo function is called
  • Loading branch information
alexander-heimbuch committed Jun 23, 2018
1 parent 576d1f4 commit 8733a5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@podlove/html5-audio-driver",
"version": "1.2.3",
"version": "1.2.4",
"description": "Pure html5 audio driver",
"author": "Alexander Heimbuch <github@heimbu.ch>",
"license": "MIT",
Expand Down
4 changes: 1 addition & 3 deletions src/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ import { compose } from 'ramda'
import { createSourceNodes, mediaNode } from './media'
import { mountNode, toArray } from './utils'

const audioNode = mediaNode('audio')

export const audio = compose(mountNode, createSourceNodes(audioNode), toArray)
export const video = sources => compose(mountNode, createSourceNodes(mediaNode('audio')), toArray)(sources)
6 changes: 2 additions & 4 deletions src/video.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { compose } from 'ramda'

import { createSourceNodes, mediaNode } from './media'
import { toArray } from './utils'
import { mountNode, toArray } from './utils'

const videoNode = mediaNode('video')

export const video = compose(createSourceNodes(videoNode), toArray)
export const video = sources => compose(mountNode, createSourceNodes(mediaNode('video')), toArray)(sources)

0 comments on commit 8733a5b

Please # to comment.