peertube-plugin-vast-loop-ads 1.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.

Potentially problematic release.


This version of peertube-plugin-vast-loop-ads might be problematic. Click here for more details.

package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # PeerTube plugin VAST ads
2
+
3
+ ## Build plugin source
4
+ ```npm run build```
5
+
6
+ ## Connect to a Peertube instance
7
+ ```peertube-cli auth add -u 'PEERTUBE_URL' -U 'PEERTUBE_USER' --password 'PEERTUBE_PASSWORD'```
8
+
9
+ Local example:
10
+
11
+ ```peertube-cli auth add -u 'http://localhost:3000/' -U 'root' --password 'test'```
12
+
13
+ ## Install the plugin in the Peertube instance (should be done only once)
14
+ ```peertube-cli plugins install --path /absolute/path/to/peertube-plugin-vast-ads```
15
+
16
+
17
+ ## Update Plugin en Peertube after each new build
18
+ ```peertube-cli plugins update --path /absolute/path/to/peertube-plugin-vast-ads```
@@ -0,0 +1,115 @@
1
+ /* VAST PLUGIN STYLES */
2
+ .vjs-ad-playing.vjs-ad-playing .vjs-progress-control {
3
+ pointer-events:none
4
+ }
5
+ .vjs-ad-playing.vjs-ad-playing .vjs-play-progress {
6
+ background-color:#ffe400
7
+ }
8
+ .vjs-ad-loading .vjs-loading-spinner {
9
+ display:block;
10
+ visibility:visible
11
+ }
12
+ .vjs-ad-playing .vjs-captions-button {
13
+ display:none
14
+ }
15
+ .vjs-ad-playing .vjs-audio-button {
16
+ display:none
17
+ }
18
+ .vjs-ad-loading .vjs-loading-spinner:before {
19
+ border-top-color:#fff
20
+ }
21
+ .vjs-ad-loading .vjs-loading-spinner:after {
22
+ border-top-color:#fff;
23
+ -webkit-animation-delay:0.44s;
24
+ animation-delay:0.44s
25
+ }
26
+ .vjs-ad-loading .vjs-big-play-button,
27
+ .vjs-ad-loading .vjs-poster,
28
+ .vjs-ad-content-resuming .vjs-big-play-button,
29
+ .vjs-ad-content-resuming .vjs-poster {
30
+ display:none
31
+ }
32
+
33
+ /*
34
+ Original @ https://github.com/theonion/videojs-vast-plugin (commit bf6ce85fa763299739f6a7c801b5be4b90b3b363)
35
+ */
36
+
37
+ .vast-skip-button {
38
+ display: block;
39
+ position: absolute;
40
+ top: 5px;
41
+ right: 0;
42
+ width: auto;
43
+ background-color: #000;
44
+ color: #AAA;
45
+ font-size: 12px;
46
+ font-style: italic;
47
+ line-height: 12px;
48
+ padding: 10px;
49
+ z-index: 2;
50
+ }
51
+
52
+ .vast-skip-button.enabled {
53
+ cursor: pointer;
54
+ color: #fff;
55
+ }
56
+
57
+ .vast-skip-button.enabled:hover {
58
+ cursor: pointer;
59
+ background: #333;
60
+ }
61
+
62
+ .vast-remaining-time {
63
+ display: block;
64
+ position: absolute;
65
+ bottom: 35px;
66
+ left: 75px;
67
+ width: auto;
68
+ color: #aaa;
69
+ font-size: 12px;
70
+ font-style: italic;
71
+ line-height: 12px;
72
+ z-index: 2;
73
+ }
74
+
75
+ .vast-remaining-time-icon {
76
+ position: absolute;
77
+ bottom: 30px;
78
+ color: #aaa !important;
79
+ font-size: 20px !important;
80
+ z-index: 2;
81
+ }
82
+
83
+ .vast-remaining-time-icon:focus {
84
+ text-shadow: 0 0 1em #fff;
85
+ }
86
+
87
+ .vast-remaining-time-icon-play {
88
+ left: 15px;
89
+ }
90
+
91
+ .vast-remaining-time-icon-mute {
92
+ left: 40px;
93
+ }
94
+
95
+ .vjs-controls-enabled .vast-remaining-time {
96
+ bottom: 55px;
97
+ }
98
+
99
+ .vjs-controls-enabled .vast-remaining-time-icon {
100
+ bottom: 50px;
101
+ }
102
+
103
+ .vast-blocker {
104
+ display: block;
105
+ position: absolute;
106
+ z-index: 2;
107
+ margin: 0;
108
+ padding: 0;
109
+ height: 100%;
110
+ width: 100%;
111
+ top: 0;
112
+ left: 0;
113
+ right: 0;
114
+ bottom: 0;
115
+ }