|
1 /* ui.js - ui related functions */ |
|
2 |
|
3 /* FIXME: get rid of the chrome here |
|
4 * INTERFACE : SLIDER ( CONTROL BAR ) | BUTTON () */ |
|
5 IriSP.createInterface = function( width, height, duration ) { |
|
6 |
|
7 IriSP.jQuery( "#Ldt-controler" ).show(); |
|
8 //__IriSP.jQuery("#Ldt-Root").css('display','visible'); |
|
9 IriSP.trace( "__IriSP.createInterface" , width+","+height+","+duration+"," ); |
|
10 |
|
11 IriSP.jQuery( "#Ldt-ShowAnnotation").click( function () { |
|
12 //__IriSP.jQuery(this).slideUp(); |
|
13 } ); |
|
14 |
|
15 var LdtpPlayerY = IriSP.jQuery("#Ldt-PlaceHolder").attr("top"); |
|
16 var LdtpPlayerX = IriSP.jQuery("#Ldt-PlaceHolder").attr("left"); |
|
17 |
|
18 IriSP.jQuery( "#slider-range-min" ).slider( { //range: "min", |
|
19 value: 0, |
|
20 min: 1, |
|
21 max: duration/1000,//1:54:52.66 = 3600+3240+ |
|
22 step: 0.1, |
|
23 slide: function(event, ui) { |
|
24 |
|
25 //__IriSP.jQuery("#amount").val(ui.value+" s"); |
|
26 //player.sendEvent('SEEK', ui.value) |
|
27 IriSP.MyApiPlayer.seek(ui.value); |
|
28 //changePageUrlOffset(ui.value); |
|
29 //player.sendEvent('PAUSE') |
|
30 } |
|
31 } ); |
|
32 |
|
33 IriSP.trace("__IriSP.createInterface","ICI"); |
|
34 IriSP.jQuery("#amount").val(IriSP.jQuery("#slider-range-min").slider("value")+" s"); |
|
35 IriSP.jQuery(".Ldt-Control1 button:first").button({ |
|
36 icons: { |
|
37 primary: 'ui-icon-play' |
|
38 }, |
|
39 text: false |
|
40 }).next().button({ |
|
41 icons: { |
|
42 primary: 'ui-icon-seek-next' |
|
43 }, |
|
44 text: false |
|
45 }); |
|
46 IriSP.jQuery(".Ldt-Control2 button:first").button({ |
|
47 icons: { |
|
48 primary: 'ui-icon-search'//, |
|
49 //secondary: 'ui-icon-volume-off' |
|
50 }, |
|
51 text: false |
|
52 }).next().button({ |
|
53 icons: { |
|
54 primary: 'ui-icon-volume-on' |
|
55 }, |
|
56 text: false |
|
57 }); |
|
58 |
|
59 // /!\ PB A MODIFIER |
|
60 //__IriSP.MyTags.draw(); |
|
61 IriSP.trace("__IriSP.createInterface","ICI2"); |
|
62 IriSP.jQuery( "#ldt-CtrlPlay" ).attr( "style", "background-color:#CD21C24;" ); |
|
63 |
|
64 IriSP.jQuery( "#Ldt-load-container" ).hide(); |
|
65 |
|
66 if( IriSP.config.gui.mode=="radio" & IriSP.jQuery.browser.msie != true ) { |
|
67 IriSP.jQuery( "#Ldtplayer1" ).attr( "height", "0" ); |
|
68 } |
|
69 IriSP.trace( "__IriSP.createInterface" , "3" ); |
|
70 |
|
71 IriSP.trace( "__IriSP.createInterface", "END" ); |
|
72 |
|
73 }; |