forked from PearInc/PearPlayer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<h1 align="center"> | ||
<img src="fig/pear.png" height="220"></img> | ||
<img src="fig/pear.png" height="110"></img> | ||
<br> | ||
<a href="https://demo.webrtc.win/pearplayer">PearPlayer.js</a> | ||
<br> | ||
|
@@ -42,9 +42,7 @@ PearPlayer(梨享播放器)**[[Demo](https://demo.webrtc.win/pearplayer)]** | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<video id="video" controls></video> | ||
<script> | ||
var player = new PearPlayer('#video', { | ||
src: 'https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4' | ||
}); | ||
var player = new PearPlayer('#video', { src: 'https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4' }); | ||
</script> | ||
``` | ||
|
||
|
@@ -66,13 +64,13 @@ PearPlayer(梨享播放器)**[[Demo](https://demo.webrtc.win/pearplayer)]** | |
只需要如下几行代码,即可将PearPlayer绑定到video标签: | ||
```html | ||
<script> | ||
/** | ||
* 第一个参数为video标签的id或class | ||
* opts是可选的参数配置 | ||
*/ | ||
if (PearPlayer.isMSESupported()) { | ||
var player = new PearPlayer('#pearvideo', opts); | ||
} | ||
/** | ||
* 第一个参数为video标签的id或class | ||
* opts是可选的参数配置 | ||
*/ | ||
if (PearPlayer.isMSESupported()) { | ||
var player = new PearPlayer('#pearvideo', opts); | ||
} | ||
</script> | ||
``` | ||
恭喜您,您的播放器已经具备P2P能力了,而且无须任何插件! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters