Skip to content

Commit

Permalink
fix: replace deprecated component in overlay examples
Browse files Browse the repository at this point in the history
The overlay examples use a simple pass-through component
that gives a message to the scheduler. This is now provided
by a `fromHandlers` static method on the `Tube` component
instead of a separate component.
  • Loading branch information
Steven Vancoillie committed May 5, 2020
1 parent aea397e commit 8b52353
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/browser/test/h264-overlay-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const play = (host) => {
// a peek component, which will call the run method of the
// scheduler every time a message passes on the pipeline.
const scheduler = new utils.Scheduler(pipeline, draw)
const runScheduler = components.Component.peek((msg) => scheduler.run(msg))
const runScheduler = components.Tube.fromHandlers((msg) => scheduler.run(msg))
pipeline.insertBefore(pipeline.lastComponent, runScheduler)

// When we now the UNIX time of the start of the presentation,
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/test/mjpeg-overlay-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const play = (host) => {
// a peek component, which will call the run method of the
// scheduler every time a message passes on the pipeline.
const scheduler = new utils.Scheduler(pipeline, draw)
const runScheduler = components.Component.peek((msg) => scheduler.run(msg))
const runScheduler = components.Tube.fromHandlers((msg) => scheduler.run(msg))
pipeline.insertBefore(pipeline.lastComponent, runScheduler)

// When we now the UNIX time of the start of the presentation,
Expand Down

0 comments on commit 8b52353

Please sign in to comment.