我正在努力在JW7中构建一个皮肤,并查看了所有可用的支持链接/文章。如果有人能为我查看我的代码,我将非常感激。谢谢!
INDEX.HTML
<!DOCTYPE html>
<html>
<head>
<title>JW Player</title>
<link rel="stylesheet" type="text/css" href="myskin.css"></link>
<script type="text/javascript" src="src/js/jwplayer.js"></script>
<script type="text/javascript">jwplayer.key="...";</script>
</head>
<body>
<div id="myElement"><p>Loading the player...</p></div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "intro_.mp4",
image: "intro.png",
height: 360,
width: 640,
title: 'Basic Video Embed',
description: 'A video with a basic title and description',
skin: {
name: "myskin"
active: "red"
inactive: "white"
background: "black"
}
});
</script>
</div>
</body>
</html>
MYSKIN.CSS
.jwplayer .jw-skin-myskin .jw-display-icon-container {
border-style: solid;
border-width: medium;
border-radius: 50%;
padding:1em;
}
.jw-icon {
font-family: 'jw-icons';
-webkit-font-smoothing: antialiased;
font-style: normal;
font-weight: normal;
text-transform: none;
background-color: transparent;
font-variant: normal;
-webkit-font-feature-settings: "liga";
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
-ms-font-feature-settings: "liga" 1;
-o-font-feature-settings: "liga";
font-feature-settings: "liga";
-moz-osx-font-smoothing: grayscale
}
/* Use this class to set a global background color for all elemnts. */
.jw-skin-myskin .jw-background-color {
background: #000;
}
/* This is the class that houses all controls. Use this to adjust the appearance of the entire controlbar. */
.jw-skin-myskin .jw-controlbar {
border-top: #333 1px solid;
height: 2.5em;
}
/* Vertically aligns the timeslider and icons in the center of the controlbar. */
.jw-skin-myskin .jw-group {
vertical-align: middle;
}
/* Sets the style for the visual playlist. */
.jw-skin-myskin .jw-playlist {
background-color: rgba(0, 0, 0, 0.8);
}
/* Aligns the visual playlist above its icon. */
.jw-skin-myskin .jw-playlist-container {
left: -43%;
background-color: rgba(0, 0, 0, 0.8);
}
/* Sets the style for the visual playlist items. */
.jw-skin-myskin .jw-playlist-container .jw-option {
border-bottom: 1px solid #444;
}
/* Allows you to adjust the color of the playlist item when hovering and has a different active style.*/
.jw-skin-myskin .jw-playlist-container .jw-option:hover,
.jw-skin-myskin .jw-playlist-container .jw-option.jw-active-option {
background-color: black;
}
/* Changes the color of the label when hovering.*/
.jw-skin-myskin .jw-playlist-container .jw-option:hover .jw-label {
color: #ff0046;
}
/* Aligns the playlist header icon with the items in the playlist. */
.jw-skin-myskin .jw-playlist-container .jw-icon-playlist {
margin-left: 0;
}
/* Sets the color of the play icon of the currently playing playlist item.*/
.jw-skin-myskin .jw-playlist-container .jw-label .jw-icon-play {
color: #ff0046;
}
/* Aligns the playlist play icon with the items in the playlist. */
.jw-skin-myskin .jw-playlist-container .jw-label .jw-icon-play:before {
padding-left: 0
}
/* Sets the color of the playlist title */
.jw-skin-myskin .jw-tooltip-title {
background-color: #000;
color: #fff
}
/* Style for playlist item, current time, qualities, and caption text.*/
.jw-skin-myskin .jw-text {
color: #ffffff;
}
/* Color for all buttons when they are inactive. This is over-ridden with the
inactive configuration in the skin block.*/
.jw-skin-myskin .jw-button-color {
color: #ffffff;
}
/* Color for all buttons for when they are hovered on. This is over-ridden with the
active configuration in the skin block.*/
.jw-skin-myskin .jw-button-color:hover {
color: #ff0046;
}
/* Color for when HD/CD icons are toggled on. */
.jw-skin-myskin .jw-toggle {
color: #ff0046;
}
/* Color for when HD/CD icons are toggled off. */
.jw-skin-myskin .jw-toggle.jw-off {
color: #ffffff;
}
/* Sets spacing between controlbar icons and text */
.jw-skin-myskin .jw-controlbar .jw-icon:before,
.jw-skin-myskin .jw-text-elapsed,
.jw-skin-myskin .jw-text-duration {
padding: 0 .7em;
}
/* Removes icon padding to align the playlist header icon with the items in the playlist. */
.jw-skin-myskin .jw-controlbar .jw-icon-prev:before {
padding-right: .25em;
}
/* Removes icon padding to align the playlist header icon with the items in the playlist. */
.jw-skin-myskin .jw-controlbar .jw-icon-playlist:before {
padding: 0 .45em;
}
.jw-skin-myskin .jw-controlbar .jw-icon-next:before {
padding-left: .25em
}
/* Sets the style for the prev and next icons. */
.jw-skin-myskin .jw-icon-prev,
.jw-skin-myskin .jw-icon-next {
font-size: .7em
}
/* Adds the spacer style to between the play icon and the previous icon. */
.jw-skin-myskin .jw-icon-prev:before {
border-left: 1px solid #666;
}
/* Adds the spacer style to between the next item and current time. */
.jw-skin-myskin .jw-icon-next:before {
border-right: 1px solid #666;
}
/* Color of the display icon */
.jw-skin-myskin .jw-icon-display {
color: #fff;
}
/* Centers the display icon in it's container */
.jw-skin-myskin .jw-icon-display:before {
padding-left: 0;
}
/* Turns the display icon container into a circle. */
.jw-skin-myskin .jw-display-icon-container {
border-radius: 50%;
border: 1px solid #333
}
/* Styles the timeslider rail */
.jw-skin-myskin .jw-rail {
background-color: #384154;
box-shadow: none;
}
/* Sets the color for the buffer of the timeslider rail. */
.jw-skin-myskin .jw-buffer {
background-color: #666f82
}
/* Sets the style for the elaspesd progress. */
.jw-skin-myskin .jw-progress {
background: #ff0046
}
/* Sets the width of the knob's container */
.jw-skin-myskin .jw-knob {
width: .6em;
height: .6em;
background-color: #fff;
box-shadow: 0 0 0 1px #000;
border-radius: 1em
}
/* Sets the height for the horizontal slider container. */
.jw-skin-myskin .jw-slider-horizontal .jw-slider-container {
height: .95em
}
/* Sets the height for the horizontal slider elements. */
.jw-skin-myskin .jw-slider-horizontal .jw-rail,
.jw-skin-myskin .jw-slider-horizontal .jw-buffer,
.jw-skin-myskin .jw-slider-horizontal .jw-progress {
height: .2em;
border-radius: 0
}
/* Centers the knob vertically. */
.jw-skin-myskin .jw-slider-horizontal .jw-knob {
top: -0.19999999999999998em
}
/* Cetners the timeslider cuepoints vertically. */
.jw-skin-myskin .jw-slider-horizontal .jw-cue {
top: -0.04999999999999999em;
width: .3em;
height: .3em;
background-color: #fff;
border-radius: 50%
}
/* Sets the width for the vertical slider elements. */
.jw-skin-myskin .jw-slider-vertical .jw-rail,
.jw-skin-myskin .jw-slider-vertical .jw-buffer,
.jw-skin-myskin .jw-slider-vertical .jw-progress {
width: .2em
}
/* Sets the position of the volume slider container. */
.jw-skin-myskin .jw-volume-tip {
width: 100%;
left: -45%;
padding-bottom: .7em
}
/* Sets the color of the duration text in the controlbar. */
.jw-skin-myskin .jw-text-duration {
color: #666f82
}
/* Adds a left border as a spacer between all contorlbar icons. */
.jw-skin-myskin .jw-controlbar-right-group .jw-icon-tooltip:before,
.jw-skin-myskin .jw-controlbar-right-group .jw-icon-inline:before {
border-left: 1px solid #666
}
/* Removes the border from the first icon after the time duration text. */
.jw-skin-myskin .jw-controlbar-right-group .jw-icon-inline:first-child:before {
border: 0
}
/* This styles the dock icons into a circle. */
.jw-skin-myskin .jw-dock .jw-dock-button {
border-radius: 50%;
border: 1px solid #333
}
/* This styles tooltip for dock text background. */
.jw-skin-myskin .jw-dock .jw-overlay {
border-radius: 2.5em
}
/*This sets the font color and background color for the active item in HD and CC menus. */
.jw-skin-myskin .jw-icon-tooltip .jw-active-option {
background-color: #ff0046;
color: #fff
}
/* Sets a min width for the volume container so that when it changes between mute and volume, the controlbar does not shift. */
.jw-skin-myskin .jw-icon-volume {
min-width: 2.6em
}
/* Sets the style for the time tooltip, menu, volume. */
.jw-skin-myskin .jw-time-tip,
.jw-skin-myskin .jw-menu,
.jw-skin-myskin .jw-volume-tip,
.jw-skin-myskin .jw-skip {
border: 1px solid #333
}
/* Sets the position for the time tooltip. */
.jw-skin-myskin .jw-time-tip {
padding: .2em;
bottom: 1.3em
}
/* Sets the position for the vertical volume slider. */
.jw-skin-myskin .jw-menu,
.jw-skin-myskin .jw-volume-tip {
bottom: .24em
}
/* Sets the shape of the skip icon. */
.jw-skin-myskin .jw-skip {
padding: .4em;
border-radius: 1.75em
}
/* Sets the style for the skip text. */
.jw-skin-myskin .jw-skip .jw-text,
.jw-skin-myskin .jw-skip .jw-icon-inline {
color: #fff;
line-height: 1.75em
}
.jw-skin-myskin .jw-skip.jw-skippable:hover .jw-text,
.jw-skin-myskin .jw-skip.jw-skippable:hover .jw-icon-inline {
color: #ff0046
}
附加的jwplayer.js是7.1。我真的不知道我应该做什么,如果有人可以向我解释,这意味着很多。非常感谢!
-Vanessa