offset_window.html 1.71 KB
Newer Older
Elminster2031's avatar
Elminster2031 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
<script language="javascript" type="text/javascript">
	$(function(){
		$('#window_offset').dialog({
			autoOpen: false,
			minWidth: 400,
			position: ['left','top'],
			buttons:{
				"Close":function(){
					$(this).dialog("close");
				}
			}
		});
		$( "#rateSlider" ).slider({
			range: "min",
			value: 1,
			min: 1,
			max: 10,
			step: 0.25,
			stop: function( event, ui ) {
				sendCommand({
					'command':'rate',
					'val':(ui.value)
				})
			},
			slide: function(event,ui){
				$('#currentRate').empty();
				$('#currentRate').append(ui.value+'x');
			}
		});
		$( "#audioSlider" ).slider({
			range: "min",
			value: 0,
			min: -10,
			max: 10,
			step: 0.25,
			stop: function( event, ui ) {
				sendCommand({
					'command':'audiodelay',
					'val':(ui.value)
				})
			},
			slide: function(event,ui){
				$('#currentAudioDelay').empty();
				$('#currentAudioDelay').append(ui.value+'s');
			}
		});
		$( "#subtitleSlider" ).slider({
			range: "min",
			value: 0,
			min: -10,
			max: 10,
			step: 0.25,
			stop: function( event, ui ) {
				sendCommand({
					'command':'subdelay',
					'val':(ui.value)
				})
			},
			slide: function(event,ui){
				$('#currentSubtitleDelay').empty();
				$('#currentSubtitleDelay').append(ui.value+'s');
			}
		});
	});
</script>
<div id="window_offset" title="Offset Configuration">
	<div>Playback Rate</div>
	<div id="rateSlider" title="Playback Rate"></div>
	<div id="currentRate" class="dynamic">1x</div>
	<br/>
	<div>Audio Delay</div>
	<div id="audioSlider" title="Audio Delay"></div>
	<div id="currentAudioDelay" class="dynamic">0s</div>
	<br/>
	<div>Subtitle Delay</div>
	<div id="subtitleSlider" title="Subtitle Delay"></div>
	<div id="currentSubtitleDelay" class="dynamic">0s</div>
</div>