video-react-player 0.1.0
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/CHANGELOG.md +27 -0
- package/LICENSE +23 -0
- package/README.md +584 -0
- package/dist/Manager.d.ts +36 -0
- package/dist/actions/player.d.ts +124 -0
- package/dist/actions/video.d.ts +161 -0
- package/dist/components/Bezel.d.ts +22 -0
- package/dist/components/BigPlayButton.d.ts +20 -0
- package/dist/components/ClickableComponent.d.ts +24 -0
- package/dist/components/LoadingSpinner.d.ts +11 -0
- package/dist/components/Player.d.ts +82 -0
- package/dist/components/PosterImage.d.ts +12 -0
- package/dist/components/Shortcut.d.ts +48 -0
- package/dist/components/Slider.d.ts +49 -0
- package/dist/components/Source.d.ts +25 -0
- package/dist/components/Video.d.ts +48 -0
- package/dist/components/control-bar/ClosedCaptionButton.d.ts +19 -0
- package/dist/components/control-bar/ControlBar.d.ts +17 -0
- package/dist/components/control-bar/DownloadButton.d.ts +17 -0
- package/dist/components/control-bar/ForwardControl.d.ts +13 -0
- package/dist/components/control-bar/ForwardReplayControl.d.ts +17 -0
- package/dist/components/control-bar/FullscreenToggle.d.ts +5 -0
- package/dist/components/control-bar/LoadProgressBar.d.ts +18 -0
- package/dist/components/control-bar/LoopToggle.d.ts +5 -0
- package/dist/components/control-bar/MouseTimeDisplay.d.ts +22 -0
- package/dist/components/control-bar/PictureInPictureToggle.d.ts +15 -0
- package/dist/components/control-bar/PlayProgressBar.d.ts +12 -0
- package/dist/components/control-bar/PlayToggle.d.ts +13 -0
- package/dist/components/control-bar/PlaybackRate.d.ts +14 -0
- package/dist/components/control-bar/PlaybackRateMenuButton.d.ts +17 -0
- package/dist/components/control-bar/ProgressControl.d.ts +16 -0
- package/dist/components/control-bar/QualityMenuButton.d.ts +17 -0
- package/dist/components/control-bar/ReplayControl.d.ts +13 -0
- package/dist/components/control-bar/ScreenshotButton.d.ts +14 -0
- package/dist/components/control-bar/SeekBar.d.ts +18 -0
- package/dist/components/control-bar/TheaterModeToggle.d.ts +14 -0
- package/dist/components/control-bar/VolumeMenuButton.d.ts +17 -0
- package/dist/components/menu/Menu.d.ts +15 -0
- package/dist/components/menu/MenuButton.d.ts +46 -0
- package/dist/components/menu/MenuItem.d.ts +22 -0
- package/dist/components/popup/Popup.d.ts +15 -0
- package/dist/components/popup/PopupButton.d.ts +19 -0
- package/dist/components/time-controls/CurrentTimeDisplay.d.ts +18 -0
- package/dist/components/time-controls/DurationDisplay.d.ts +12 -0
- package/dist/components/time-controls/RemainingTimeDisplay.d.ts +13 -0
- package/dist/components/time-controls/TimeDivider.d.ts +10 -0
- package/dist/components/volume-control/VolumeBar.d.ts +33 -0
- package/dist/components/volume-control/VolumeControl.d.ts +16 -0
- package/dist/components/volume-control/VolumeLevel.d.ts +9 -0
- package/dist/index.d.ts +46 -0
- package/dist/reducers/index.d.ts +11 -0
- package/dist/reducers/operation.d.ts +10 -0
- package/dist/reducers/player.d.ts +33 -0
- package/dist/types/component.d.ts +13 -0
- package/dist/types/player.d.ts +31 -0
- package/dist/utils/browser.d.ts +5 -0
- package/dist/utils/dom.d.ts +31 -0
- package/dist/utils/fullscreen.d.ts +16 -0
- package/dist/utils/index.d.ts +24 -0
- package/dist/video-react-new.cjs.js +3904 -0
- package/dist/video-react-new.css +1155 -0
- package/dist/video-react-new.d.ts +11 -0
- package/dist/video-react-new.es.js +3861 -0
- package/dist/video-react-new.full.js +4578 -0
- package/dist/video-react-new.full.min.js +2 -0
- package/dist/video-react-new.js +4283 -0
- package/dist/video-react-new.min.js +2 -0
- package/dist/video-react-player.cjs.js +3904 -0
- package/dist/video-react-player.css +1155 -0
- package/dist/video-react-player.d.ts +11 -0
- package/dist/video-react-player.es.js +3861 -0
- package/dist/video-react-player.full.js +4578 -0
- package/dist/video-react-player.full.min.js +2 -0
- package/dist/video-react-player.js +4283 -0
- package/dist/video-react-player.min.js +2 -0
- package/package.json +145 -0
- package/styles/fonts/video-react.eot +0 -0
- package/styles/fonts/video-react.svg +43 -0
- package/styles/fonts/video-react.ttf +0 -0
- package/styles/fonts/video-react.woff +0 -0
- package/styles/icons.json +584 -0
- package/styles/scss/components/bezel.scss +119 -0
- package/styles/scss/components/big-play-button.scss +45 -0
- package/styles/scss/components/button.scss +18 -0
- package/styles/scss/components/closed-caption.scss +13 -0
- package/styles/scss/components/control-bar.scss +51 -0
- package/styles/scss/components/control.scss +42 -0
- package/styles/scss/components/fullscreen.scss +13 -0
- package/styles/scss/components/loading-spinner.scss +105 -0
- package/styles/scss/components/menu/menu-inline.scss +67 -0
- package/styles/scss/components/menu/menu-popup.scss +27 -0
- package/styles/scss/components/menu/menu.scss +59 -0
- package/styles/scss/components/new-controls.scss +42 -0
- package/styles/scss/components/play-pause.scss +11 -0
- package/styles/scss/components/playback-rate.scss +13 -0
- package/styles/scss/components/poster.scss +27 -0
- package/styles/scss/components/progress.scss +157 -0
- package/styles/scss/components/slider.scss +13 -0
- package/styles/scss/components/time.scss +18 -0
- package/styles/scss/components/volume.scss +147 -0
- package/styles/scss/icons.scss +278 -0
- package/styles/scss/layout.scss +115 -0
- package/styles/scss/mixins.scss +117 -0
- package/styles/scss/variables.scss +16 -0
- package/styles/scss/video-react-player.scss +34 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
|
|
3
|
+
* Copyright (c) 2016 Video-React contributors
|
|
4
|
+
* Copyright (c) 2025 ZingMe.Vn
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
.video-react-player {
|
|
10
|
+
display: block;
|
|
11
|
+
vertical-align: top;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
color: $video-react-player-primary-foreground-color;
|
|
14
|
+
background-color: #000;
|
|
15
|
+
position: relative;
|
|
16
|
+
font-size: 10px;
|
|
17
|
+
line-height: 1;
|
|
18
|
+
font-family: $video-react-player-text-font-family;
|
|
19
|
+
|
|
20
|
+
@include user-select(none);
|
|
21
|
+
|
|
22
|
+
&:-moz-full-screen {
|
|
23
|
+
position: absolute;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:-webkit-full-screen {
|
|
27
|
+
width: 100% !important;
|
|
28
|
+
height: 100% !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// All elements inherit border-box sizing
|
|
33
|
+
*,
|
|
34
|
+
*:before,
|
|
35
|
+
*:after {
|
|
36
|
+
box-sizing: inherit;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
ul {
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
font-size: inherit;
|
|
42
|
+
line-height: inherit;
|
|
43
|
+
list-style-position: outside;
|
|
44
|
+
|
|
45
|
+
// Important to specify each
|
|
46
|
+
margin-left: 0;
|
|
47
|
+
margin-right: 0;
|
|
48
|
+
margin-top: 0;
|
|
49
|
+
margin-bottom: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.video-react-player-fluid,
|
|
53
|
+
&.video-react-player-16-9,
|
|
54
|
+
&.video-react-player-4-3 {
|
|
55
|
+
width: 100%;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
height: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
&.video-react-player-16-9 {
|
|
62
|
+
@include apply-aspect-ratio(16, 9);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.video-react-player-4-3 {
|
|
66
|
+
@include apply-aspect-ratio(4, 3);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.video-react-player-fill {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
// Playback technology elements expand to the width/height of the containing div
|
|
76
|
+
// <video> or <object>
|
|
77
|
+
.video-react-player-video {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 0;
|
|
80
|
+
left: 0;
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.video-react-player-fullscreen {
|
|
86
|
+
width: 100% !important;
|
|
87
|
+
height: 100% !important;
|
|
88
|
+
// Undo any aspect ratio padding for fluid layouts
|
|
89
|
+
padding-top: 0 !important;
|
|
90
|
+
|
|
91
|
+
&.video-react-player-user-inactive {
|
|
92
|
+
cursor: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
body.video-react-player-full-window {
|
|
99
|
+
padding: 0;
|
|
100
|
+
margin: 0;
|
|
101
|
+
height: 100%;
|
|
102
|
+
// Fix for IE6 full-window. http://www.cssplay.co.uk/layouts/fixed.html
|
|
103
|
+
overflow-y: auto;
|
|
104
|
+
|
|
105
|
+
.video-react-player-fullscreen {
|
|
106
|
+
position: fixed;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
z-index: 1000;
|
|
109
|
+
left: 0;
|
|
110
|
+
top: 0;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
right: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
|
|
2
|
+
@mixin hide-visually {
|
|
3
|
+
border: 0;
|
|
4
|
+
clip: rect(0 0 0 0);
|
|
5
|
+
height: 1px;
|
|
6
|
+
margin: -1px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
padding: 0;
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: 1px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin animation($string: spin 1s infinite linear) {
|
|
14
|
+
-webkit-animation: $string;
|
|
15
|
+
-moz-animation: $string;
|
|
16
|
+
-o-animation: $string;
|
|
17
|
+
animation: $string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
|
|
21
|
+
@mixin user-select($string: none) {
|
|
22
|
+
-webkit-user-select: $string;
|
|
23
|
+
-moz-user-select: $string;
|
|
24
|
+
-ms-user-select: $string;
|
|
25
|
+
user-select: $string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@mixin border-radius($radius) {
|
|
30
|
+
-webkit-border-radius: $radius;
|
|
31
|
+
-moz-border-radius: $radius;
|
|
32
|
+
border-radius: $radius;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin background-color-with-alpha($color, $alpha) {
|
|
36
|
+
background-color: $color;
|
|
37
|
+
background-color: rgba($color, $alpha);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@mixin transform($transform) {
|
|
42
|
+
-moz-transform: $transform;
|
|
43
|
+
-ms-transform: $transform;
|
|
44
|
+
-o-transform: $transform;
|
|
45
|
+
-webkit-transform: $transform;
|
|
46
|
+
transform: $transform;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@mixin transition($string: $transition--default) {
|
|
50
|
+
-webkit-transition: $string;
|
|
51
|
+
-moz-transition: $string;
|
|
52
|
+
-o-transition: $string;
|
|
53
|
+
transition: $string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin display-flex($alignment: '', $justification: '') {
|
|
57
|
+
display: -webkit-box;
|
|
58
|
+
display: -webkit-flex;
|
|
59
|
+
display: -ms-flexbox;
|
|
60
|
+
display: flex;
|
|
61
|
+
|
|
62
|
+
@if $alignment != '' {
|
|
63
|
+
-webkit-box-align: $alignment;
|
|
64
|
+
-webkit-align-items: $alignment;
|
|
65
|
+
-ms-flex-align: $alignment;
|
|
66
|
+
align-items: $alignment;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if $justification != '' {
|
|
70
|
+
-webkit-box-pack: $justification;
|
|
71
|
+
-webkit-justify-content: $justification;
|
|
72
|
+
-ms-flex-pack: $justification;
|
|
73
|
+
justify-content: $justification;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@mixin flex($value) {
|
|
78
|
+
-webkit-box-flex: $value;
|
|
79
|
+
-moz-box-flex: $value;
|
|
80
|
+
-webkit-flex: $value;
|
|
81
|
+
-ms-flex: $value;
|
|
82
|
+
flex: $value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
|
|
86
|
+
@mixin box-shadow ($string: 0 0 1em rgba(0, 0, 0, 0.25)) {
|
|
87
|
+
-webkit-box-shadow: $string;
|
|
88
|
+
-moz-box-shadow: $string;
|
|
89
|
+
box-shadow: $string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@mixin order($value) {
|
|
93
|
+
-webkit-box-ordinal-group: $value;
|
|
94
|
+
-moz-box-ordinal-group: $value;
|
|
95
|
+
-ms-flex-order: $value;
|
|
96
|
+
-webkit-order: $value;
|
|
97
|
+
order: $value;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Fill the width of the containing element and use padding to create the
|
|
101
|
+
// desired aspect ratio. Default to 16x9 unless another ratio is given.
|
|
102
|
+
@mixin apply-aspect-ratio($width, $height) {
|
|
103
|
+
padding-top: 100% * ($height/$width);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
%video-react-player-fill-parent {
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: 0;
|
|
109
|
+
left: 0;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
%video-react-player-icon-default {
|
|
115
|
+
@extend %video-react-player-fill-parent;
|
|
116
|
+
text-align: center;
|
|
117
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Text, icons, hover states
|
|
2
|
+
$video-react-player-primary-foreground-color: #fff !default;
|
|
3
|
+
|
|
4
|
+
// Control backgrounds (control bar, big play, menus)
|
|
5
|
+
$video-react-player-primary-background-color: #2B333F !default;
|
|
6
|
+
$video-react-player-primary-background-transparency: 0.7 !default;
|
|
7
|
+
|
|
8
|
+
// Hover states, slider backgrounds
|
|
9
|
+
$video-react-player-secondary-background-color: lighten($video-react-player-primary-background-color, 33%) !default;
|
|
10
|
+
$video-react-player-secondary-background-transparency: 0.5 !default;
|
|
11
|
+
|
|
12
|
+
$video-react-player-text-font-family: serif, Times, "Times New Roman" !default;
|
|
13
|
+
|
|
14
|
+
$video-react-player-big-play-button-width: 3em !default;
|
|
15
|
+
$video-react-player-big-play-button-height: 1.5em !default;
|
|
16
|
+
$video-react-player-big-play-button-transparency: 0.8 !default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// most of the css styles came from
|
|
2
|
+
// https://github.com/videojs/video.js/tree/master/src/css
|
|
3
|
+
/**
|
|
4
|
+
|
|
5
|
+
* Copyright (c) 2016 Video-React contributors
|
|
6
|
+
* Copyright (c) 2025 ZingMe.Vn
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@import "variables";
|
|
13
|
+
@import "mixins";
|
|
14
|
+
@import "icons";
|
|
15
|
+
@import "layout";
|
|
16
|
+
@import "components/button";
|
|
17
|
+
@import "components/loading-spinner";
|
|
18
|
+
@import "components/big-play-button";
|
|
19
|
+
@import "components/menu/menu";
|
|
20
|
+
@import "components/menu/menu-popup";
|
|
21
|
+
@import "components/menu/menu-inline";
|
|
22
|
+
@import "components/poster";
|
|
23
|
+
@import "components/slider";
|
|
24
|
+
@import "components/control";
|
|
25
|
+
@import "components/control-bar";
|
|
26
|
+
@import "components/progress";
|
|
27
|
+
@import "components/play-pause";
|
|
28
|
+
@import "components/fullscreen";
|
|
29
|
+
@import "components/time";
|
|
30
|
+
@import "components/volume";
|
|
31
|
+
@import "components/playback-rate";
|
|
32
|
+
@import "components/bezel";
|
|
33
|
+
@import "components/closed-caption";
|
|
34
|
+
@import "components/new-controls";
|