mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 18:29:39 +02:00
Moving to node_modules folder to make easier to upgrade
trying to move from Bootstrap 3 to Bootstrap 5
This commit is contained in:
parent
047e363a16
commit
d4d042e041
8460 changed files with 1355889 additions and 547977 deletions
BIN
node_modules/videojs-contrib-ads/docs/developer/ad-states.png
generated
vendored
Normal file
BIN
node_modules/videojs-contrib-ads/docs/developer/ad-states.png
generated
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
42
node_modules/videojs-contrib-ads/docs/developer/getting-started.md
generated
vendored
Normal file
42
node_modules/videojs-contrib-ads/docs/developer/getting-started.md
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Getting started developing videojs-contrib-ads
|
||||
|
||||
## Building
|
||||
|
||||
videojs-contrib-ads is designed to be built with `npm`.
|
||||
|
||||
If you don't already have `npm`, you will need to install [Node.js](http://nodejs.org/) (which comes with npm). We recommend using [NVM](https://github.com/creationix/nvm) to manage your installed Node versions. Either way, the supported Node version is listed in the project's [.nvmrc file](https://github.com/videojs/videojs-contrib-ads/blob/master/.nvmrc).
|
||||
|
||||
With NPM ready, you can download the ads plugin's build-time dependencies and then build the ads plugin. Open a terminal to the directory where you've cloned this repository, then:
|
||||
|
||||
```sh
|
||||
$ npm install
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
We will run a suite of unit tests and code formatting checks, then create a `dist/` directory. Inside you'll find the minified ads plugin file `videojs.ads.min.js`, the unminified `videojs.ads.js`, and the CSS `videojs.ads.css`.
|
||||
|
||||
## Linting
|
||||
|
||||
Checks for errors or style issues.
|
||||
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Runs QUnit tests.
|
||||
|
||||
### Using command line
|
||||
|
||||
```sh
|
||||
npm run test
|
||||
```
|
||||
|
||||
### In browser
|
||||
|
||||
Run `npm start` and a Chrome instance will launch with Karma's debug interface at `localhost:9876`, allowing you to debug tests. Also, a static server will run and allow you to look at examples at `localhost:9999`.
|
||||
|
||||
## What's Next
|
||||
|
||||
Check out the [architecture overview](overview.md) to learn your way around the code.
|
8
node_modules/videojs-contrib-ads/docs/developer/index.md
generated
vendored
Normal file
8
node_modules/videojs-contrib-ads/docs/developer/index.md
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Developer Documentation
|
||||
|
||||
If you are interested in contributing bug fixes or features to videojs-contrib-ads this documentation is for you.
|
||||
|
||||
* [Getting Started](getting-started.md)
|
||||
* [Overview](overview.md)
|
||||
* [States](states.md)
|
||||
* [Roadmap](roadmap.md)
|
41
node_modules/videojs-contrib-ads/docs/developer/lib/railroad-diagrams.css
generated
vendored
Normal file
41
node_modules/videojs-contrib-ads/docs/developer/lib/railroad-diagrams.css
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
svg.railroad-diagram {
|
||||
background-color: hsl(30,20%,95%);
|
||||
}
|
||||
svg.railroad-diagram path {
|
||||
stroke-width: 3;
|
||||
stroke: black;
|
||||
fill: rgba(0,0,0,0);
|
||||
}
|
||||
svg.railroad-diagram text {
|
||||
font: bold 14px monospace;
|
||||
text-anchor: middle;
|
||||
}
|
||||
svg.railroad-diagram text.diagram-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
svg.railroad-diagram text.diagram-arrow {
|
||||
font-size: 16px;
|
||||
}
|
||||
svg.railroad-diagram text.label {
|
||||
text-anchor: start;
|
||||
}
|
||||
svg.railroad-diagram text.comment {
|
||||
font: italic 12px monospace;
|
||||
}
|
||||
svg.railroad-diagram g.non-terminal text {
|
||||
/*font-style: italic;*/
|
||||
}
|
||||
svg.railroad-diagram rect {
|
||||
stroke-width: 3;
|
||||
stroke: black;
|
||||
fill: hsl(120,100%,90%);
|
||||
}
|
||||
svg.railroad-diagram path.diagram-text {
|
||||
stroke-width: 3;
|
||||
stroke: black;
|
||||
fill: white;
|
||||
cursor: help;
|
||||
}
|
||||
svg.railroad-diagram g.diagram-text:hover path.diagram-text {
|
||||
fill: #eee;
|
||||
}
|
1059
node_modules/videojs-contrib-ads/docs/developer/lib/railroad-diagrams.js
generated
vendored
Normal file
1059
node_modules/videojs-contrib-ads/docs/developer/lib/railroad-diagrams.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
57
node_modules/videojs-contrib-ads/docs/developer/overview.md
generated
vendored
Normal file
57
node_modules/videojs-contrib-ads/docs/developer/overview.md
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
# Architecture Overview
|
||||
|
||||
videojs-contrib-ads is separated into files by module.
|
||||
|
||||
## Modules
|
||||
|
||||
### plugin.js
|
||||
|
||||
The entry point of the application. Registers the plugin with video.js and initializes other feature modules.
|
||||
|
||||
### ads.js
|
||||
|
||||
Implements the [public API](../integrator/api.md).
|
||||
|
||||
### adBreak.js
|
||||
|
||||
Common code that is invoked when ad breaks start and end. Used by Preroll.js, Midroll.js, and Postroll.js.
|
||||
|
||||
### cancelContentPlay.js
|
||||
|
||||
Feature that prevents content playback while prerolls are handled. cancelContentPlay is used when video.js middleware is *not* available.
|
||||
|
||||
### playMiddleware.js
|
||||
|
||||
Feature that prevents content playback while prerolls are handled. playMiddleware is used when video.js middleware is available.
|
||||
|
||||
### contentupdate
|
||||
|
||||
Implements the `contentchanged` event.
|
||||
|
||||
### plugin.scss
|
||||
|
||||
Styles for the ad player.
|
||||
|
||||
### redispatch.js
|
||||
|
||||
Feature that makes the presense of ads transparent to event listeners.
|
||||
|
||||
### snapshot.js
|
||||
|
||||
Feature that captures the player state before ads and restores it after ads.
|
||||
|
||||
### states.js
|
||||
|
||||
Used to import modules from the `states` folder. This works around an issue with bundler where importing the files directly may not load them in the correct order.
|
||||
|
||||
### states
|
||||
|
||||
The states folder contains the various states that videojs-contrib-ads can be in.
|
||||
|
||||
### states/abstract
|
||||
|
||||
States in the `abstract` subfolder are subclassed by the main states in the `states` folder itself. They implement common functionality used by similar states.
|
||||
|
||||
## What's Next
|
||||
|
||||
Learn more about [states](states.md).
|
7
node_modules/videojs-contrib-ads/docs/developer/roadmap.md
generated
vendored
Normal file
7
node_modules/videojs-contrib-ads/docs/developer/roadmap.md
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Roadmap
|
||||
|
||||
## Version 7
|
||||
|
||||
* Pause content video if there is a programmatic call to play (prefixed as adplay) while an ad is playing in an ad container (rather than content video element). Prefixing doesn't prevent the videojs behavior, so this would prevent the content from playing behind the ad. Right now, ad plugins I am aware of are doing this on their own, so this would require a migration to move the behavior into this project.
|
||||
* `contentended` will change from its current deprecated purpose to being a normal prefixed event during content restoration.
|
||||
* The default value for `liveCuePoints` will change to `false` because we believe this is a more common and intuitive default.
|
3
node_modules/videojs-contrib-ads/docs/developer/states.css
generated
vendored
Normal file
3
node_modules/videojs-contrib-ads/docs/developer/states.css
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
svg.railroad-diagram {
|
||||
background-color: transparent;
|
||||
}
|
134
node_modules/videojs-contrib-ads/docs/developer/states.md
generated
vendored
Normal file
134
node_modules/videojs-contrib-ads/docs/developer/states.md
generated
vendored
Normal file
|
@ -0,0 +1,134 @@
|
|||
<script src="./lib/railroad-diagrams.js"></script>
|
||||
<link rel="stylesheet" href="./lib/railroad-diagrams.css"/>
|
||||
<link rel="stylesheet" href="states.css"/>
|
||||
|
||||
# States
|
||||
|
||||
videojs.contrib-ads moves through various states as a content video plays. Here's a state diagram which shows the states of the ads plugin and how it transitions between them:
|
||||
|
||||

|
||||
|
||||
Ad states are yellow and content states are blue. If the current state is an ad state, the plugin is in ad mode.
|
||||
|
||||
Many methods in the public API are implemented by inspecting the current state. The current state instance should not be inspected directly by ad plugins.
|
||||
|
||||
States are implemented as classes with a 3-tiered inheritance hierarchy. All states extend either `AdState` or `ContentState`. In turn, `AdState` and `ContentState` extend `State`.
|
||||
|
||||
## BeforePreroll (extends ContentState)
|
||||
|
||||
The initial state. On source change, contrib-ads returns to this state for the new source. This state is not an ad state because content playback has not been requested yet, therefor playback has not been blocked by the ad plugin yet.
|
||||
|
||||
<script>
|
||||
Diagram(
|
||||
NonTerminal('init'),
|
||||
Optional(
|
||||
NonTerminal('onAdsReady')
|
||||
),
|
||||
Choice(
|
||||
0,
|
||||
NonTerminal('onPlay'),
|
||||
NonTerminal('onNoPreroll'),
|
||||
NonTerminal('skipLinearAdMode'),
|
||||
)
|
||||
)
|
||||
.addTo(document.querySelector('#diagram-1'));
|
||||
</script>
|
||||
<div id="diagram-1"></div>
|
||||
|
||||
## Preroll (extends AdState)
|
||||
|
||||
We move into this state when content playback is requested, as indicated by the `play` event. At this point, playback is officially blocked by the ad plugin. Ads may or may not play during this time. For example, we we learn that there are no preroll ads and move on. We leave this state when content playback begins, resulting in a `playing` event.
|
||||
|
||||
<script>
|
||||
Diagram(
|
||||
NonTerminal('init'),
|
||||
Optional(
|
||||
NonTerminal('onAdsReady')
|
||||
),
|
||||
Choice(
|
||||
0,
|
||||
Sequence(
|
||||
NonTerminal('startLinearAdMode'),
|
||||
Optional(
|
||||
NonTerminal('onAdStarted')
|
||||
),
|
||||
NonTerminal('endLinearAdMode'),
|
||||
),
|
||||
NonTerminal('onAdTimeout'),
|
||||
NonTerminal('onNoPreroll'),
|
||||
NonTerminal('skipLinearAdMode')
|
||||
),
|
||||
NonTerminal('cleanup')
|
||||
)
|
||||
.addTo(document.querySelector('#diagram-2'));
|
||||
</script>
|
||||
<div id="diagram-2"></div>
|
||||
|
||||
## ContentPlayback (extends ContentState)
|
||||
|
||||
This state represents normal content playback, even if the player is paused.
|
||||
|
||||
<script>
|
||||
Diagram(
|
||||
NonTerminal('init'),
|
||||
Optional('onAdsReady'),
|
||||
Choice(
|
||||
0,
|
||||
NonTerminal('onReadyForPostroll'),
|
||||
NonTerminal('startLinearAdMode')
|
||||
)
|
||||
)
|
||||
.addTo(document.querySelector('#diagram-3'));
|
||||
</script>
|
||||
<div id="diagram-3"></div>
|
||||
|
||||
## Midroll (extends AdState)
|
||||
|
||||
This state encapsulates preparing for midroll ads, playing midroll ads, and restoring content after midroll ads. It begins when the ad plugin invokes `startLinearAdMode` and it ends when content resumes, resulting in a `playing` event.
|
||||
|
||||
<script>
|
||||
Diagram(
|
||||
NonTerminal('init'),
|
||||
Optional('onAdStarted'),
|
||||
NonTerminal('endLinearAdMode'),
|
||||
NonTerminal('cleanup')
|
||||
)
|
||||
.addTo(document.querySelector('#diagram-4'));
|
||||
</script>
|
||||
<div id="diagram-4"></div>
|
||||
|
||||
## Postroll (extends AdState)
|
||||
|
||||
This state begins when content ends for the first time, resulting in a `readyforpostroll` event. A preroll may play during this state. This state leads to the AdsDone state; the ad plugin will not return to ContentPlayback for this source.
|
||||
|
||||
<script>
|
||||
Diagram(
|
||||
NonTerminal('init'),
|
||||
Choice(
|
||||
0,
|
||||
Sequence(
|
||||
NonTerminal('startLinearAdMode'),
|
||||
Optional('onAdStarted'),
|
||||
NonTerminal('endLinearAdMode')
|
||||
),
|
||||
NonTerminal('skipLinearAdMode'),
|
||||
NonTerminal('onAdTimeout'),
|
||||
NonTerminal('onNoPostroll'),
|
||||
),
|
||||
NonTerminal('cleanup')
|
||||
)
|
||||
.addTo(document.querySelector('#diagram-5'));
|
||||
</script>
|
||||
<div id="diagram-5"></div>
|
||||
|
||||
## AdsDone (extends ContentState)
|
||||
|
||||
No more ads will play. The user can seek and re-watch content as they please. The only way to leave this state is by changing the content source.
|
||||
|
||||
<script>
|
||||
Diagram(
|
||||
NonTerminal('init')
|
||||
)
|
||||
.addTo(document.querySelector('#diagram-6'));
|
||||
</script>
|
||||
<div id="diagram-6"></div>
|
Loading…
Add table
Add a link
Reference in a new issue