Skip to content

Commit ce47b8d

Browse files
author
Steven Vancoillie
committed
chore: export types necessary to use protocols
1 parent 0dbc78d commit ce47b8d

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

lib/components/canvas/index.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Sink } from '../component'
2-
import Clock from '../../utils/clock'
3-
import Scheduler from '../../utils/scheduler'
2+
import { Clock } from '../../utils/clock'
3+
import { Scheduler } from '../../utils/scheduler'
44
import { Message, MessageType } from '../message'
55
import { Writable, Readable } from 'stream'
66
import { VideoMedia } from '../../utils/protocols/sdp'
@@ -12,13 +12,6 @@ interface BlobMessage {
1212

1313
type BlobMessageHandler = (msg: BlobMessage) => void
1414

15-
// const { Readable, Writable } = require('stream')
16-
17-
// const Component = require('../component')
18-
// const { SDP, JPEG } = require('../message')
19-
// const Clock = require('../../utils/clock')
20-
// const Scheduler = require('../../utils/scheduler')
21-
2215
interface RateInfo {
2316
bitrate: number
2417
framerate: number

lib/utils/clock.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* point), also as a convenienve to closely match
1616
* the behaviour of a video element.
1717
*/
18-
export default class Clock {
18+
export class Clock {
1919
private started: number
2020
private stopped: boolean
2121
private elapsed: number

lib/utils/index.browser.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
import Scheduler from './scheduler'
2-
3-
export { Scheduler }
1+
export { Scheduler } from './scheduler'
2+
export * from './protocols'

lib/utils/index.node.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
export {}
1+
export { Scheduler } from './scheduler'
2+
export { Clock } from './clock'
3+
export * from './protocols'

lib/utils/protocols/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './sdp'
2+
export * from './rtp'
3+
export * from './rtsp'
4+
export * from './ntp'

lib/utils/scheduler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const DEFAULT_TOLERANCE = 10
3434
* @class Scheduler
3535
*/
3636

37-
export default class Scheduler<T extends { readonly ntpTimestamp?: number }> {
37+
export class Scheduler<T extends { readonly ntpTimestamp?: number }> {
3838
private _clock: Clock
3939
private _handler: (msg: T) => void
4040
private _tolerance: number

0 commit comments

Comments
 (0)