cafe-video-player 1.1.7 → 1.1.9

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/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # cafe-video-player
2
+
3
+ ✔ Playing static and vod videos
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ $ npm install --save cafe-video-player
9
+ $ yarn add cafe-video-player
10
+
11
+ ```
12
+ ## Example
13
+
14
+ ✔ To use the player to play the vod, you need to give the following props to the VideoPlayerLibrary component. for example:
15
+
16
+ ```jsx
17
+ import dynamic from "next/dynamic";
18
+ const VideoPlayerLibrary = dynamic(() => import("cafe-video-player"), { ssr: false })
19
+
20
+ export default function HomePage() {
21
+
22
+ const params = {
23
+ id: "6623",
24
+ type: "vod"
25
+ }
26
+
27
+ return (
28
+ <div>
29
+ <VideoPlayerLibrary params={params} />
30
+ </div>
31
+ );
32
+ }
33
+
34
+ ```
35
+
36
+ ## Example
37
+
38
+ ✔ To use the player to play the static videos, you need to give the following props to the VideoPlayerLibrary component. for example::
39
+
40
+ ```jsx
41
+ import dynamic from "next/dynamic";
42
+ const VideoPlayerLibrary = dynamic(() => import("cafe-video-player"), { ssr: false })
43
+
44
+ export default function HomePage() {
45
+
46
+ const params = {
47
+ type: "mp4",
48
+ "e-url": "aHR0cHM6Ly9hYnJlaGFtcmFoaS5pci9vL3RXMHFONUQwWFB2R04wdGhJQUM1UUEv",
49
+ "e-cover": "aHR0cHM6Ly9hYnJlaGFtcmFoaS5pci9vL3RXMHFONUQwWFB2R04wdGhJQUM1UUEvP3RodW1iPXRydWU="
50
+ }
51
+
52
+ return (
53
+ <div>
54
+ <VideoPlayerLibrary params={params} />
55
+ </div>
56
+ );
57
+ }
58
+
59
+
60
+ ```
61
+
62
+ ## Example
63
+
64
+ ✔ To use the mini player feature, it is necessary to assign an id to the element on which the scroll happens and then give that id to the player as props.
65
+
66
+ ```jsx
67
+
68
+ import dynamic from "next/dynamic";
69
+ const VideoPlayerLibrary = dynamic(() => import("cafe-video-player"), { ssr: false })
70
+
71
+ export default function HomePage() {
72
+
73
+ const params = {
74
+ type: "mp4",
75
+ "e-url": "aHR0cHM6Ly9hYnJlaGFtcmFoaS5pci9vL3RXMHFONUQwWFB2R04wdGhJQUM1UUEv",
76
+ "e-cover": "aHR0cHM6Ly9hYnJlaGFtcmFoaS5pci9vL3RXMHFONUQwWFB2R04wdGhJQUM1UUEvP3RodW1iPXRydWU=",
77
+ scrollElementId: "element-scroll-id"
78
+ }
79
+
80
+ return (
81
+ <div>
82
+ <VideoPlayerLibrary params={params} />
83
+ </div>
84
+ );
85
+ }
86
+
87
+
88
+ ```
89
+
90
+ To open the modals, you must put the following element at the end of the body in the _document component.
91
+
92
+ ```jsx
93
+
94
+ <div id="dialog-react-root-videoPlayer" />
95
+
96
+ ```
97
+
98
+ In order for the styles to be displayed correctly, you must import the videoPlayerStyles.css file from the node_module into the _app component
99
+
100
+ ```jsx
101
+
102
+ import "../node_modules/cafe-video-player/videoPlayerStyles.css"
103
+
104
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-video-player",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.cjs",
@@ -11,7 +11,7 @@
11
11
  "start": "next start",
12
12
  "lint": "next lint",
13
13
  "tailwind-build": "npx tailwindcss -i ./src/app/globals.css -o ./dist/videoPlayerStyles.css",
14
- "tsup-publish": "tsup && @powershell copy package.json ./dist && copy README.md ./dist && npm run tailwind-build"
14
+ "tsup-publish": "tsup && @powershell copy package.json ./dist && @powershell copy README.md ./dist && npm run tailwind-build"
15
15
  },
16
16
  "dependencies": {
17
17
  "@reduxjs/toolkit": "^2.2.3",