Skip to content

Commit

Permalink
demo: update [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
freeshineit committed Dec 17, 2024
1 parent 28a7490 commit 3c93a04
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 12 deletions.
3 changes: 2 additions & 1 deletion demos/react-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"ezuikit-js": "^8.1.1",
"ezuikit-js": "^8.1.2",
"react": "^17",
"react-dom": "^17",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.0"
},
"scripts": {
"start": "react-scripts start",
"dev": "react-scripts start",
"build": "react-scripts build",
"eject": "react-scripts eject"
},
Expand Down
150 changes: 146 additions & 4 deletions demos/react-demo/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions demos/react-demo/src/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const Player = () => {
// https://open.ys7.com/help/1772?h=domain
// domain默认是 https://open.ys7.com, 如果是私有化部署或海外的环境,请配置对应的domain
// The default domain is https://open.ys7.com If it is a private deployment or overseas (outside of China) environment, please configure the corresponding domain
domain: "https://open.ys7.com"
}
domain: "https://open.ys7.com",
},
});
}
}, []);
Expand Down Expand Up @@ -132,7 +132,9 @@ const Player = () => {
return (
<div>
<h2>视频模式使用示例:</h2>
<div id="player-container"></div>
<div>
<div id="player-container"></div>
</div>
<div>
url: <input type="text" ref={urlRef} style={{ width: 500 }} />
</div>
Expand Down
10 changes: 6 additions & 4 deletions demos/react-demo/src/PlayerClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class App extends React.Component {
// https://open.ys7.com/help/1772?h=domain
// domain默认是 https://open.ys7.com, 如果是私有化部署或海外的环境,请配置对应的domain
// The default domain is https://open.ys7.com If it is a private deployment or overseas (outside of China) environment, please configure the corresponding domain
domain: "https://open.ys7.com"
}
domain: "https://open.ys7.com",
},
});
}
// });
Expand Down Expand Up @@ -77,7 +77,7 @@ class App extends React.Component {

capturePicture = () => {
var capturePicturePromise = player.capturePicture(
`${new Date().getTime()}`
`${new Date().getTime()}`,
);
capturePicturePromise.then((data) => {
console.log("promise 获取 数据", data);
Expand Down Expand Up @@ -135,7 +135,9 @@ class App extends React.Component {
return (
<div className="demo">
<h2>视频模式使用示例:</h2>
<div id="player-container" style={{ width: 600, height: 600 }}></div>
<div>
<div id="player-container" style={{ width: 600, height: 600 }}></div>
</div>
<div>
<button onClick={this.init}>init</button>
<button onClick={this.stop}>stop</button>
Expand Down

0 comments on commit 3c93a04

Please sign in to comment.