@omnimedia/omnitool 1.1.0-51 → 1.1.0-53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnimedia/omnitool",
3
- "version": "1.1.0-51",
3
+ "version": "1.1.0-53",
4
4
  "description": "open source video processing tools",
5
5
  "license": "MIT",
6
6
  "author": "Przemysław Gałęzki",
@@ -18,7 +18,6 @@ export class Playback {
18
18
 
19
19
  #controller = realtime()
20
20
  onTick = this.#controller.onTick
21
- onSeek = pub()
22
21
 
23
22
  audioContext = new AudioContext({sampleRate: 48000})
24
23
  audioGain = this.audioContext.createGain()
@@ -44,7 +43,6 @@ export class Playback {
44
43
  async seek(time: Ms) {
45
44
  this.pause()
46
45
  this.#playbackStart = time
47
- this.onSeek.publish()
48
46
  return await this.visualSampler.sample(this.timeline, time)
49
47
  }
50
48
 
@@ -20,7 +20,7 @@ export class O {
20
20
  return this.state.timeline
21
21
  }
22
22
 
23
- #getId() {
23
+ getId() {
24
24
  return hex.toInteger(hex.random())
25
25
  }
26
26
 
@@ -37,7 +37,7 @@ export class O {
37
37
 
38
38
  textStyle = (style: TextStyleOptions): Item.TextStyle => {
39
39
  const item = {
40
- id: this.#getId(),
40
+ id: this.getId(),
41
41
  kind: Kind.TextStyle,
42
42
  style
43
43
  } as Item.TextStyle
@@ -47,7 +47,7 @@ export class O {
47
47
 
48
48
  spatial = (transform: Transform): Item.Spatial => {
49
49
  const item: Item.Spatial = {
50
- id: this.#getId(),
50
+ id: this.getId(),
51
51
  kind: Kind.Spatial,
52
52
  transform,
53
53
  enabled: true
@@ -58,7 +58,7 @@ export class O {
58
58
 
59
59
  sequence = (...items: Item.Any[]): Item.Sequence => {
60
60
  const item = {
61
- id: this.#getId(),
61
+ id: this.getId(),
62
62
  kind: Kind.Sequence,
63
63
  childrenIds: items.map(item => item.id)
64
64
  } as Item.Sequence
@@ -69,7 +69,7 @@ export class O {
69
69
  stack = (...items: Item.Any[]): Item.Stack => {
70
70
  const item = {
71
71
  kind: Kind.Stack,
72
- id: this.#getId(),
72
+ id: this.getId(),
73
73
  childrenIds: items.map(item => item.id)
74
74
  } as Item.Stack
75
75
  this.register(item)
@@ -88,7 +88,7 @@ export class O {
88
88
 
89
89
  const item: Item.Video = {
90
90
  kind: Kind.Video,
91
- id: this.#getId(),
91
+ id: this.getId(),
92
92
  mediaHash: media.datafile.checksum.hash,
93
93
  start: options?.start ?? 0,
94
94
  duration: options?.duration ?? media.duration
@@ -110,7 +110,7 @@ export class O {
110
110
 
111
111
  const item: Item.Audio = {
112
112
  kind: Kind.Audio,
113
- id: this.#getId(),
113
+ id: this.getId(),
114
114
  mediaHash: media.datafile.checksum.hash,
115
115
  start: options?.start ?? 0,
116
116
  duration: options?.duration ?? media.duration,
@@ -126,7 +126,7 @@ export class O {
126
126
  }): Item.Text => {
127
127
 
128
128
  const item = {
129
- id: this.#getId(),
129
+ id: this.getId(),
130
130
  content,
131
131
  kind: Kind.Text,
132
132
  duration: options?.duration ?? 2000
@@ -141,7 +141,7 @@ export class O {
141
141
 
142
142
  gap = (duration: number): Item.Gap => {
143
143
  const item = {
144
- id: this.#getId(),
144
+ id: this.getId(),
145
145
  kind: Kind.Gap,
146
146
  duration
147
147
  } as Item.Gap
@@ -152,7 +152,7 @@ export class O {
152
152
  transition = {
153
153
  crossfade: (duration: number): Item.Transition => {
154
154
  const item = {
155
- id: this.#getId(),
155
+ id: this.getId(),
156
156
  kind: Kind.Transition,
157
157
  effect: Effect.Crossfade,
158
158
  duration,