cafe-video-player 1.1.8 → 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.
Files changed (2) hide show
  1. package/README.md +21 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,17 +14,20 @@ $ yarn add cafe-video-player
14
14
  ✔ To use the player to play the vod, you need to give the following props to the VideoPlayerLibrary component. for example:
15
15
 
16
16
  ```jsx
17
- import VideoPlayerLibrary from "../videoPlayerLibrary";
17
+ import dynamic from "next/dynamic";
18
+ const VideoPlayerLibrary = dynamic(() => import("cafe-video-player"), { ssr: false })
18
19
 
19
- export default function Home() {
20
+ export default function HomePage() {
20
21
 
21
22
  const params = {
22
23
  id: "6623",
23
- type: "vod",
24
+ type: "vod"
24
25
  }
25
26
 
26
27
  return (
27
- <div><VideoPlayerLibrary params={params} /></div>
28
+ <div>
29
+ <VideoPlayerLibrary params={params} />
30
+ </div>
28
31
  );
29
32
  }
30
33
 
@@ -35,9 +38,10 @@ export default function Home() {
35
38
  ✔ To use the player to play the static videos, you need to give the following props to the VideoPlayerLibrary component. for example::
36
39
 
37
40
  ```jsx
38
- import VideoPlayerLibrary from "../videoPlayerLibrary";
41
+ import dynamic from "next/dynamic";
42
+ const VideoPlayerLibrary = dynamic(() => import("cafe-video-player"), { ssr: false })
39
43
 
40
- export default function Home() {
44
+ export default function HomePage() {
41
45
 
42
46
  const params = {
43
47
  type: "mp4",
@@ -46,7 +50,9 @@ export default function Home() {
46
50
  }
47
51
 
48
52
  return (
49
- <div><VideoPlayerLibrary params={params} /></div>
53
+ <div>
54
+ <VideoPlayerLibrary params={params} />
55
+ </div>
50
56
  );
51
57
  }
52
58
 
@@ -58,9 +64,11 @@ export default function Home() {
58
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.
59
65
 
60
66
  ```jsx
61
- import VideoPlayerLibrary from "../videoPlayerLibrary";
62
67
 
63
- export default function Home() {
68
+ import dynamic from "next/dynamic";
69
+ const VideoPlayerLibrary = dynamic(() => import("cafe-video-player"), { ssr: false })
70
+
71
+ export default function HomePage() {
64
72
 
65
73
  const params = {
66
74
  type: "mp4",
@@ -70,10 +78,13 @@ export default function Home() {
70
78
  }
71
79
 
72
80
  return (
73
- <div><VideoPlayerLibrary params={params} /></div>
81
+ <div>
82
+ <VideoPlayerLibrary params={params} />
83
+ </div>
74
84
  );
75
85
  }
76
86
 
87
+
77
88
  ```
78
89
 
79
90
  To open the modals, you must put the following element at the end of the body in the _document component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-video-player",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.cjs",