Changeset 1291
- Timestamp:
- 09/19/10 20:01:24 (3 years ago)
- Location:
- trunk/html5
- Files:
-
- 2 edited
-
bin-debug/jwplayer.html5.js (modified) (15 diffs)
-
src/html5/jwplayer.html5.display.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/html5/bin-debug/jwplayer.html5.js
r1288 r1291 102 102 try { 103 103 if (typeof styles[style] == "number" && !(style == "zIndex" || style == "opacity")) { 104 styles[style] = styles[style] + "px"; 104 if (style.match(/color/i)) { 105 styles[style] = "#" + _pad(styles[style].toString(16), 6); 106 } else { 107 styles[style] = styles[style] + "px"; 108 } 105 109 } 106 110 domelement.style[style] = styles[style]; … … 110 114 } 111 115 }; 116 117 function _pad(string, length) { 118 while (string.length < length) { 119 string = "0" + string; 120 } 121 return string; 122 } 123 112 124 })(jwplayer); 113 125 /** … … 142 154 margin: "auto", 143 155 padding: 0, 144 background : _api.skin.getComponentSettings("display").backgroundcolor === undefined ? "#000" : _api.skin.getComponentSettings("display").backgroundcolor.replace("0x", "#"),156 backgroundColor: _api.skin.getComponentSettings("display").backgroundcolor === undefined ? parseInt("000000", 16) : _api.skin.getComponentSettings("display").backgroundcolor, 145 157 zIndex: 0 146 158 }); … … 430 442 /** Map with config for the jwplayerControlbar plugin. **/ 431 443 var _defaults = { 432 backgroundcolor: "000000",444 backgroundcolor: parseInt("000000", 16), 433 445 margin: 10, 434 446 //font: "_sans", 435 447 font: "Arial,sans-serif", 436 448 fontsize: 10, 437 fontcolor: "000000",449 fontcolor: parseInt("000000", 16), 438 450 fontstyle: "normal", 439 451 //fontweight: "normal", 440 452 fontweight: "bold", 441 buttoncolor: "ffffff",453 buttoncolor: parseInt("ffffff", 16), 442 454 position: jwplayer.html5.view.positions.BOTTOM, 443 455 idlehide: false, … … 542 554 var wrappercss = { 543 555 height: _api.skin.getSkinElement("controlbar", "background").height, 544 backgroundColor: "#" +_settings.backgroundcolor556 backgroundColor: _settings.backgroundcolor 545 557 }; 546 558 … … 567 579 if (!_ready && _wrapper.parentElement !== undefined) { 568 580 _ready = true; 569 if (_settings.position == jwplayer.html5.view.positions.OVER.toLowerCase()) {581 if (_settings.position == jwplayer.html5.view.positions.OVER.toLowerCase()) { 570 582 document.getElementById(_api.id).onmousemove = _fadeOut; 571 583 } … … 598 610 } 599 611 600 function _fadeIn() {612 function _fadeIn() { 601 613 _wrapper.style.opacity = 1; 602 614 } … … 740 752 css.cursor = "default"; 741 753 wid = 14 + 3 * _settings.fontsize; 742 css.color = "#" + _settings.fontcolor.substr(-6);743 754 } else if (element.indexOf("divider") === 0) { 744 755 css.background = "url(" + _api.skin.getSkinElement("controlbar", "divider").src + ") repeat-x center left"; … … 950 961 // Show / hide progress bar 951 962 if (event.newstate == jwplayer.api.events.state.IDLE) { 952 if (!_settings.idlehide && _settings.position == jwplayer.html5.view.positions.OVER) {963 if (!_settings.idlehide && _settings.position == jwplayer.html5.view.positions.OVER) { 953 964 _fadeIn(); 954 965 } … … 1398 1409 border: 0, 1399 1410 margin: 0, 1400 padding: 0 1411 padding: 0, 1412 zIndex: 3 1401 1413 } 1402 1414 }, … … 1412 1424 height: _api.skin.getSkinElement("display", "background").height, 1413 1425 margin: 0, 1414 padding: 0 1426 padding: 0, 1427 zIndex: 2 1415 1428 } 1416 1429 }, … … 1426 1439 margin: 0, 1427 1440 padding: 0, 1428 textDecoration: "none" 1441 textDecoration: "none", 1442 zIndex: 1 1429 1443 } 1430 1444 }, 1431 1445 display_text: { 1432 1446 style: { 1447 zIndex: 4, 1433 1448 position: "relative", 1434 top: "50%",1435 1449 opacity: 0.8, 1436 backgroundColor: "black", 1437 color: "white", 1438 display: "none", 1450 backgroundColor: parseInt("000000", 16), 1451 color: parseInt("ffffff", 16), 1439 1452 textAlign: "center", 1440 1453 fontFamily: "Arial,sans-serif", … … 1474 1487 width: width, 1475 1488 height: height 1489 }); 1490 _css(_display.display_text, { 1491 width: width 1476 1492 }); 1477 1493 _css(_display.display_image, { … … 1549 1565 function _errorHandler(evt){ 1550 1566 _hideDisplayIcon(); 1551 _display.display_text.innerHTML = "<p>"+evt.error+"</p>";1567 _display.display_text.innerHTML = evt.error; 1552 1568 _show(_display.display_text); 1553 1569 _display.display_text.style.top = ((_height - _display.display_text.getBoundingClientRect().height) / 2) + "px"; … … 2566 2582 var _loading = true; 2567 2583 var _completeInterval; 2568 var _skinPath = jwplayer.html5.utils.getAbsolutePath(skinPath);2584 var _skinPath = skinPath; 2569 2585 2570 2586 /** Load the skin **/ 2571 2587 function _load() { 2572 if (_skinPath === undefined ) {2588 if (_skinPath === undefined || _skinPath == "") { 2573 2589 _loadSkin(jwplayer.html5.defaultSkin().xml); 2574 2590 } else { 2575 jwplayer.utils.ajax( _skinPath, function(xmlrequest) {2591 jwplayer.utils.ajax(jwplayer.html5.utils.getAbsolutePath(_skinPath), function(xmlrequest) { 2576 2592 _loadSkin(xmlrequest.responseXML); 2577 2593 }, function(path) { -
trunk/html5/src/html5/jwplayer.html5.display.js
r1289 r1291 44 44 border: 0, 45 45 margin: 0, 46 padding: 0 46 padding: 0, 47 zIndex: 3 47 48 } 48 49 }, … … 58 59 height: _api.skin.getSkinElement("display", "background").height, 59 60 margin: 0, 60 padding: 0 61 padding: 0, 62 zIndex: 2 61 63 } 62 64 }, … … 72 74 margin: 0, 73 75 padding: 0, 74 textDecoration: "none" 76 textDecoration: "none", 77 zIndex: 1 75 78 } 76 79 }, 77 80 display_text: { 78 81 style: { 82 zIndex: 4, 79 83 position: "relative", 80 top: "50%",81 84 opacity: 0.8, 82 85 backgroundColor: parseInt("000000", 16), 83 86 color: parseInt("ffffff", 16), 84 display: "none",85 87 textAlign: "center", 86 88 fontFamily: "Arial,sans-serif", … … 120 122 width: width, 121 123 height: height 124 }); 125 _css(_display.display_text, { 126 width: width 122 127 }); 123 128 _css(_display.display_image, { … … 195 200 function _errorHandler(evt){ 196 201 _hideDisplayIcon(); 197 _display.display_text.innerHTML = "<p>"+evt.error+"</p>";202 _display.display_text.innerHTML = evt.error; 198 203 _show(_display.display_text); 199 204 _display.display_text.style.top = ((_height - _display.display_text.getBoundingClientRect().height) / 2) + "px";
Note: See TracChangeset
for help on using the changeset viewer.
