@grizzshutsdown/simpleplayer 0.1.4 → 0.1.5

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": "@grizzshutsdown/simpleplayer",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "A simple default video player created from Grizz's portfolio for others to use.",
5
5
  "type": "module",
6
6
  "homepage": "https://grizz.fyi",
@@ -17,22 +17,29 @@ import '@grizzshutsdown/simpleplayer';
17
17
 
18
18
  ## Main Options
19
19
 
20
+ Attributes:
21
+
20
22
  - `src`: video URL.
21
23
  - `aspect-ratio`: CSS aspect ratio. Default: `16 / 9`.
22
24
  - `preload-margin`: lazy-load margin. Default: `360px 0px`.
23
- - `show-time`: shows a pinned timestamp tray when `controls` are enabled, or a hover tooltip over the scrubber when `controls` are disabled.
25
+ - `controls`: add a controls tray with volume, Picture-in-Picture, and fullscreen buttons.
26
+ - `disable-autoplay`: turns off muted autoplay.
27
+ - `show-time`: dual-mode timestamp. With `controls`, shows a pinned glass timestamp tray in the bottom-left. Without `controls`, shows a hover tooltip above the scrubber while dragging or hovering. Clicking toggles between elapsed and remaining time.
24
28
  - `disable-volume`: removes the volume control.
25
29
  - `disable-picture-in-picture`: removes Picture-in-Picture.
26
30
  - `disable-fullscreen`: removes fullscreen.
27
31
 
28
- JavaScript properties:
32
+ JavaScript properties mirror each attribute:
29
33
 
30
34
  ```js
31
35
  player.src = '/video.mp4';
32
36
  player.aspectRatio = '1 / 1';
33
37
  player.preloadMargin = '240px 0px';
38
+ player.autoplayEnabled = false;
39
+ player.controlsEnabled = true;
34
40
  player.timeVisible = true;
35
- player.volumeEnabled = false;
41
+ player.volumeEnabled = true;
42
+ player.volumeSliderEnabled = false;
36
43
  player.pictureInPictureEnabled = false;
37
44
  player.fullscreenEnabled = false;
38
45
  ```