@byomakase/omakase-player 0.3.3 → 0.8.0

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.
Files changed (70) hide show
  1. package/README.md +29 -10
  2. package/dist/audio/audio-controller.d.ts +0 -4
  3. package/dist/common/component.d.ts +0 -3
  4. package/dist/common/style-adapter.d.ts +0 -3
  5. package/dist/common/styles-provider.d.ts +0 -3
  6. package/dist/constants.d.ts +15 -0
  7. package/dist/dom/dom-controller.d.ts +0 -3
  8. package/dist/events.d.ts +15 -0
  9. package/dist/http.d.ts +15 -0
  10. package/dist/index.d.ts +15 -0
  11. package/dist/omakase-player.cjs.js +37 -37
  12. package/dist/omakase-player.cjs.js.map +1 -1
  13. package/dist/omakase-player.d.ts +15 -0
  14. package/dist/omakase-player.es.js +4792 -4798
  15. package/dist/omakase-player.es.js.map +1 -1
  16. package/dist/omakase-player.umd.js +36 -36
  17. package/dist/omakase-player.umd.js.map +1 -1
  18. package/dist/subtitles/subtitles-controller.d.ts +0 -3
  19. package/dist/timeline/audio-track/audio-track-lane-item.d.ts +15 -0
  20. package/dist/timeline/audio-track/audio-track-lane.d.ts +15 -0
  21. package/dist/timeline/audio-track/index.d.ts +15 -0
  22. package/dist/timeline/index.d.ts +15 -0
  23. package/dist/timeline/marker/index.d.ts +15 -0
  24. package/dist/timeline/marker/marker-handle.d.ts +15 -0
  25. package/dist/timeline/marker/marker-lane.d.ts +15 -0
  26. package/dist/timeline/marker/marker.d.ts +15 -0
  27. package/dist/timeline/marker/moment-marker.d.ts +16 -0
  28. package/dist/timeline/marker/period-marker.d.ts +15 -0
  29. package/dist/timeline/playhead-hover.d.ts +15 -0
  30. package/dist/timeline/playhead.d.ts +15 -0
  31. package/dist/timeline/scrollbar.d.ts +15 -0
  32. package/dist/timeline/scrubber-lane.d.ts +15 -0
  33. package/dist/timeline/subtitles/index.d.ts +15 -0
  34. package/dist/timeline/subtitles/subtitles-lane-item.d.ts +15 -0
  35. package/dist/timeline/subtitles/subtitles-lane.d.ts +15 -0
  36. package/dist/timeline/thumbnail/index.d.ts +15 -0
  37. package/dist/timeline/thumbnail/thumbnail-lane.d.ts +15 -0
  38. package/dist/timeline/thumbnail/thumbnail.d.ts +15 -0
  39. package/dist/timeline/timecode-display.d.ts +15 -0
  40. package/dist/timeline/timeline-lane.d.ts +15 -0
  41. package/dist/timeline/timeline.d.ts +15 -0
  42. package/dist/track/audio-vtt-file.d.ts +15 -0
  43. package/dist/track/subtitles-vtt-file.d.ts +15 -0
  44. package/dist/track/subtitles-vtt-track.d.ts +15 -0
  45. package/dist/track/thumbnail-vtt-file.d.ts +15 -0
  46. package/dist/track/track.d.ts +15 -0
  47. package/dist/track/vtt-file.d.ts +15 -0
  48. package/dist/types/common.d.ts +15 -0
  49. package/dist/types/events.d.ts +15 -0
  50. package/dist/types/index.d.ts +15 -0
  51. package/dist/types/model.d.ts +15 -0
  52. package/dist/types/track.d.ts +15 -0
  53. package/dist/types/types.d.ts +15 -0
  54. package/dist/types/vtt.d.ts +15 -0
  55. package/dist/util/animation-util.d.ts +15 -0
  56. package/dist/util/color-util.d.ts +15 -0
  57. package/dist/util/error-util.d.ts +15 -0
  58. package/dist/util/frame-util.d.ts +15 -0
  59. package/dist/util/image-util.d.ts +15 -0
  60. package/dist/util/object-util.d.ts +15 -0
  61. package/dist/util/observable-util.d.ts +15 -0
  62. package/dist/util/shape-util.d.ts +15 -0
  63. package/dist/util/time-util.d.ts +15 -0
  64. package/dist/util/window-util.d.ts +15 -0
  65. package/dist/validators.d.ts +15 -0
  66. package/dist/video/playback-state.d.ts +15 -0
  67. package/dist/video/video-controller.d.ts +15 -0
  68. package/dist/video/video-hls-controller.d.ts +15 -0
  69. package/dist/video/video.d.ts +19 -2
  70. package/package.json +1 -1
package/README.md CHANGED
@@ -4,14 +4,24 @@
4
4
 
5
5
  ### Player initialization
6
6
 
7
- Omakase player requires hls.js library. Include hls.js library with Omakase player
7
+ Omakase player requires hls.js library. Include hls.js library with Omakase Player
8
8
 
9
9
  ```
10
10
  <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
11
- <script src="js/omakase-player.umd.js"></script>
12
11
  ```
13
12
 
14
- Create div with id=omakase-player as placeholder for the player
13
+ Include Omakase Player js library
14
+ ```
15
+ <script src="dist/omakase-player.umd.js"></script>
16
+ ```
17
+
18
+ Alternatively, you can include Omakase Player by getting it from npm:
19
+
20
+ ```
21
+ npm i @byomakase/omakase-player
22
+ ```
23
+
24
+ Create a div with id=omakase-player as placeholder for the player
15
25
 
16
26
  ```
17
27
  <div id="omakase-player"></div>
@@ -21,7 +31,7 @@ Initialize the player with following code. Use appropriate font family to match
21
31
 
22
32
  ```
23
33
  let omakasePlayer = new omakase.OmakasePlayer({
24
- videoHTMLElementId: 'omakase-player'
34
+ videoHTMLElementId: 'omakase-player',
25
35
  fontFamily: 'Arial'
26
36
  })
27
37
  ```
@@ -34,7 +44,7 @@ Once player is initialized we can load hls video stream with following code
34
44
  omakasePlayer.loadVideo('https://my-server.com/myvideo.m3u8', 25).subscribe()
35
45
  ```
36
46
 
37
- Within observable we can initialize dependant logic, as a subscription to various events, load caption tracks etc.
47
+ Within observable, we can initialize dependant logic, as a subscription to various events, load caption tracks etc.
38
48
 
39
49
  ```
40
50
  omakasePlayer.loadVideo('https://my-server.com/myvideo.m3u8', 25).subscribe(
@@ -95,15 +105,23 @@ hlsInstance.on(Hls.Events.MANIFEST_PARSED, (event, data) => {
95
105
  })
96
106
  ```
97
107
 
108
+ Player CSS styling should be placed in following class
109
+
110
+ ```
111
+ .omakase-player-wrapper .omakase-video {
112
+ width: 500px;
113
+ }
114
+ ```
115
+
98
116
  ### Timeline initialization
99
117
 
100
- Timeline will be inserted in follwing div
118
+ Timeline will be inserted in following div
101
119
 
102
120
  ```
103
121
  <div id="omakase-timeline"></div>
104
122
  ```
105
123
 
106
- Omakase will initialize timeline with createTimeline method. Next sample is loading video thumbnails sequence and adding custom styling to timeline
124
+ Omakase Player will initialize timeline with createTimeline method. Next sample is loading video thumbnails sequence and adding custom styling to timeline
107
125
 
108
126
  ```
109
127
  omakasePlayer.createTimeline({
@@ -130,7 +148,7 @@ omakasePlayer.createTimeline({
130
148
  rightPanelRightGutterWidth: 30,
131
149
  timecodedContainerClipPadding: 20
132
150
  }
133
- })
151
+ }).subscribe()
134
152
  ```
135
153
 
136
154
  Timeline is supporting various timeline rows as:
@@ -221,8 +239,6 @@ npm install ci
221
239
  ./dev.sh
222
240
  ```
223
241
 
224
- NOTE: All static (VTT) files should be inside `/public` folder before starting (some files may not be commited to repo)
225
-
226
242
  ## Production build
227
243
 
228
244
  ```
@@ -231,3 +247,6 @@ npm run prod
231
247
  ```
232
248
 
233
249
  Production artefacts that need to be published to NPM are created in `/dist` folder
250
+
251
+ ## Known limitations
252
+ - Firefox browser is not supported as it doesn't support ```requestVideoFrameCallback``` function
@@ -13,10 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  *
16
- * Includes rxjs <https://github.com/ReactiveX/rxjs>
17
- * Available under Apache License Version 2.0
18
- * <https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt>
19
- *
20
16
  */
21
17
  import { AudioApi } from "../api/audio-api";
22
18
  import { VideoController } from "../video/video-controller";
@@ -13,9 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  *
16
- * Includes rxjs <https://github.com/ReactiveX/rxjs>
17
- * Available under Apache License Version 2.0
18
- * <https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt>
19
16
  */
20
17
  import Konva from "konva";
21
18
  import { Observable, Subject } from "rxjs";
@@ -13,9 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  *
16
- * Includes rxjs <https://github.com/ReactiveX/rxjs>
17
- * Available under Apache License Version 2.0
18
- * <https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt>
19
16
  */
20
17
  import { Subject } from "rxjs";
21
18
  export declare class StyleAdapter<T> {
@@ -13,9 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  *
16
- * Includes rxjs <https://github.com/ReactiveX/rxjs>
17
- * Available under Apache License Version 2.0
18
- * <https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt>
19
16
  */
20
17
  import { Subject } from "rxjs";
21
18
  import { OmakasePlayerStyle } from "../omakase-player";
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023 ByOmakase, LLC (https://byomakase.org)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import { Dimension, Position } from "./common/measurement";
2
17
  export declare class Constants {
3
18
  static POSITION_TOP_LEFT: Position;
@@ -13,9 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  *
16
- * Includes rxjs <https://github.com/ReactiveX/rxjs>
17
- * Available under Apache License Version 2.0
18
- * <https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt>
19
16
  */
20
17
  import { VideoController } from "../video/video-controller";
21
18
  import { Timeline } from "../timeline/timeline";
package/dist/events.d.ts CHANGED
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023 ByOmakase, LLC (https://byomakase.org)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export type OmakaseEventMap<T> = {
2
17
  [K in keyof T]: T[K];
3
18
  };
package/dist/http.d.ts CHANGED
@@ -1,2 +1,17 @@
1
+ /**
2
+ * Copyright 2023 ByOmakase, LLC (https://byomakase.org)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import { AxiosRequestConfig, AxiosResponse } from "axios";
2
17
  export declare function httpGet<T, D>(url: string, config?: AxiosRequestConfig<D>): Promise<AxiosResponse<T, any>>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023 ByOmakase, LLC (https://byomakase.org)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export * from "./timeline/marker";
2
17
  export * from "./timeline";
3
18
  export * from "./omakase-player";