mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-09 00:48:54 -05:00
Added a separate mobileFontSize to PlayerConfig and updated AutoplayToggleButton, NextVideoButton, and VideoJSPlayer to use a smaller font size for control bar icons and text on touch devices. This improves UI consistency and usability across device types.
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
/**
|
|
* Video Player Configuration
|
|
* Centralized configuration for video player customizations
|
|
*/
|
|
|
|
const PlayerConfig = {
|
|
nativeControlsForTouch: false,
|
|
|
|
// Progress bar configuration
|
|
progressBar: {
|
|
// Position for non-touch devices: 'default', 'top', or 'bottom'
|
|
// 'default' - use Video.js default positioning (inside control bar)
|
|
// 'top' - progress bar above control bar
|
|
// 'bottom' - progress bar below control bar
|
|
nonTouchPosition: 'top',
|
|
|
|
// Position for touch devices: 'top' or 'bottom' (no 'default' option)
|
|
// 'top' - progress bar above control bar
|
|
// 'bottom' - progress bar below control bar (native touch style)
|
|
touchPosition: 'bottom',
|
|
|
|
// Progress bar color (hex, rgb, or CSS color name)
|
|
color: '#019932',
|
|
|
|
// Background color of the progress track
|
|
trackColor: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
// Loaded buffer color
|
|
bufferColor: 'rgba(255, 255, 255, 0.5)',
|
|
},
|
|
|
|
// Control bar configuration
|
|
controlBar: {
|
|
// Background color
|
|
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
|
|
|
// Height in em units
|
|
height: 3,
|
|
|
|
// Font size in em units
|
|
fontSize: 16,
|
|
|
|
mobileFontSize: 12,
|
|
},
|
|
};
|
|
|
|
export default PlayerConfig;
|