Skip to content

Commit 8b52353

Browse files
author
Steven Vancoillie
committed
fix: replace deprecated component in overlay examples
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.
1 parent aea397e commit 8b52353

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/browser/test/h264-overlay-player.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const play = (host) => {
5353
// a peek component, which will call the run method of the
5454
// scheduler every time a message passes on the pipeline.
5555
const scheduler = new utils.Scheduler(pipeline, draw)
56-
const runScheduler = components.Component.peek((msg) => scheduler.run(msg))
56+
const runScheduler = components.Tube.fromHandlers((msg) => scheduler.run(msg))
5757
pipeline.insertBefore(pipeline.lastComponent, runScheduler)
5858

5959
// When we now the UNIX time of the start of the presentation,

examples/browser/test/mjpeg-overlay-player.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const play = (host) => {
4949
// a peek component, which will call the run method of the
5050
// scheduler every time a message passes on the pipeline.
5151
const scheduler = new utils.Scheduler(pipeline, draw)
52-
const runScheduler = components.Component.peek((msg) => scheduler.run(msg))
52+
const runScheduler = components.Tube.fromHandlers((msg) => scheduler.run(msg))
5353
pipeline.insertBefore(pipeline.lastComponent, runScheduler)
5454

5555
// When we now the UNIX time of the start of the presentation,

0 commit comments

Comments
 (0)