videoplayer-extension 0.0.1 → 0.0.2
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 +25 -1
- package/index.js +8 -0
- package/package.json +23 -3
package/README.md
CHANGED
|
@@ -2,7 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
A helper library for VideoPlayer Browser Extension
|
|
4
4
|
|
|
5
|
+
https://sharkiller.dev/videoplayer/
|
|
6
|
+
|
|
7
|
+
https://github.com/sharkiller/Reproductor-MPD-M3U8
|
|
8
|
+
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
7
11
|
```bash
|
|
8
|
-
npm install videoplayer-extension
|
|
12
|
+
npm install videoplayer-extension
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Direct Usage
|
|
16
|
+
```html
|
|
17
|
+
<script type="module">
|
|
18
|
+
import VideoPlayer from 'https://cdn.jsdelivr.net/npm/videoplayer-extension/+esm';
|
|
19
|
+
VideoPlayer.isInstalled(
|
|
20
|
+
// Installed
|
|
21
|
+
() => {
|
|
22
|
+
// Your code when detected extension is installed
|
|
23
|
+
alert('installed');
|
|
24
|
+
},
|
|
25
|
+
// Uninstalled
|
|
26
|
+
() => {
|
|
27
|
+
// Your code when detected extension is uninstalled
|
|
28
|
+
alert('uninstalled');
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
```
|
package/index.js
CHANGED
|
@@ -11,10 +11,18 @@ module.exports = {
|
|
|
11
11
|
img.onload = installed;
|
|
12
12
|
img.src = 'chrome-extension://opmeopcambhfimffbomjgemehjkbbmji/play-on.png'
|
|
13
13
|
},
|
|
14
|
+
/**
|
|
15
|
+
* Get Direct Player extension URL
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
14
18
|
getDirectPlayer: () => {
|
|
15
19
|
console.log('getDirectPlayer');
|
|
16
20
|
return 'chrome-extension://opmeopcambhfimffbomjgemehjkbbmji/pages/player.html';
|
|
17
21
|
},
|
|
22
|
+
/**
|
|
23
|
+
* Get IPTV Player extension URL
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
18
26
|
getIPTVPlayer: () => {
|
|
19
27
|
console.log('getIPTVPlayer');
|
|
20
28
|
return 'chrome-extension://opmeopcambhfimffbomjgemehjkbbmji/iptv/player.html';
|
package/package.json
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videoplayer-extension",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A helper library for VideoPlayer Browser Extension",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"
|
|
6
|
+
"module": "index.js",
|
|
7
|
+
"unpkg": "index.js",
|
|
8
|
+
"browser": "index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./index.js",
|
|
12
|
+
"require": "./index.js",
|
|
13
|
+
"default": "./index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"video",
|
|
18
|
+
"player",
|
|
19
|
+
"extension",
|
|
20
|
+
"chrome",
|
|
21
|
+
"firefox",
|
|
22
|
+
"iptv",
|
|
23
|
+
"m3u",
|
|
24
|
+
"mpd",
|
|
25
|
+
"m3u8"
|
|
26
|
+
],
|
|
7
27
|
"author": "Sharkiller <support@sharkiller.dev>",
|
|
8
28
|
"license": "MIT",
|
|
9
29
|
"repository": {
|
|
@@ -14,4 +34,4 @@
|
|
|
14
34
|
"url": "https://github.com/sharkiller/videoplayer-extension/issues"
|
|
15
35
|
},
|
|
16
36
|
"homepage": "https://github.com/sharkiller/videoplayer-extension#readme"
|
|
17
|
-
}
|
|
37
|
+
}
|