Skip to content

Commit

Permalink
Merge pull request #320 from wet-boew/feature-multimedia-player
Browse files Browse the repository at this point in the history
Feature multimedia player - Time labels
  • Loading branch information
LaurentGoderre committed Aug 28, 2012
2 parents f9a7db6 + 6cf44bc commit 4b8dc74
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build/js/css/pe-ap-ie-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/css/pe-ap-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions src/js/sass/multimedia.scss
Expand Up @@ -78,10 +78,15 @@ $progress-color: #000;
margin-right:55px;
height:18px;
padding: 2px 4px;
}

p{
margin:0;
}

.wb-mm-timeline-inner {
margin:0 70px;
}

.wb-mm-timeline-inner {
margin:0 70px;
}

progress {
Expand Down
6 changes: 3 additions & 3 deletions src/js/workers/multimedia.js
Expand Up @@ -239,8 +239,8 @@
timeline = $w.find('.wb-mm-timeline progress');
timeline.attr('value', p);

$w.find('.wb-mm-timeline-current').text(_pe.fn.multimedia._format_time(this.getCurrentTime()));
$w.find('.wb-mm-timeline-total').text(_pe.fn.multimedia._format_time(this.getDuration()));
$w.find('.wb-mm-timeline-current span:not(.wb-invisible)').text(_pe.fn.multimedia._format_time(this.getCurrentTime()));
$w.find('.wb-mm-timeline-total span:not(.wb-invisible)').text(_pe.fn.multimedia._format_time(this.getDuration()));

//Update captions
if ($.data(e.target, 'captions') !== undefined) {
Expand Down Expand Up @@ -269,7 +269,7 @@
_get_ui : function (id) {
var ui = $('<div class="wb-mm-controls">'),
ui_start = $('<div class="wb-mm-controls-start">'),
ui_timeline = $('<div class="wb-mm-timeline" tabindex="0"><div class="wb-mm-timeline-current">00:00:00</div><div class="wb-mm-timeline-total">--:--:--</div><div class="wb-mm-timeline-inner"><progress value="0" max="100" /></div>'),
ui_timeline = $('<div class="wb-mm-timeline" tabindex="0"><p class="wb-mm-timeline-current"><span class="wb-invisible">' +_pe.dic.get('%position') + '</span><span>00:00:00</span></p><p class="wb-mm-timeline-total"><span class="wb-invisible">' +_pe.dic.get('%duration') + '</span><span>--:--:--</span></p><p class="wb-mm-timeline-inner"><span class="wb-invisible">%: </span><progress value="0" max="100" /></p>'),
ui_end = $('<div class="wb-mm-controls-end">');

ui_start.append(
Expand Down
161 changes: 161 additions & 0 deletions test/captions-eng.xml
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<tt xml:lang="en" xmlns="http://www.w3.org/2006/10/ttaf1" xmlns:tts="http://www.w3.org/2006/10/ttaf1#style">
<head>
<styling>
<style id="defaultSpeaker" tts:fontSize="12" tts:fontFamily="Arial" tts:fontWeight="normal" tts:fontStyle="normal" tts:textDecoration="none" tts:color="white" tts:backgroundColor="black" tts:textAlign="center"/>
<style id="defaultCaption" tts:fontSize="12" tts:fontFamily="Arial" tts:fontWeight="normal" tts:fontStyle="normal" tts:textDecoration="none" tts:color="white" tts:backgroundColor="black" tts:textAlign="center"/>
</styling>
</head>
<body style="defaultCaption" id="thebody" xml:id="b1">


<div begin="10.00s" end="11.75s">When2 most people think of airports</div>
<div begin="11.75s" dur="1.75s">they think of big, busy terminals</div>
<div begin="13.50s" dur="2.25s">that see thousands of passengers each day.</div>
<div begin="15.75s" dur="1.75s">But that's not the only way to fly.</div>
<div begin="18.00s" dur="2.00s">Smaller aircraft such as light twins,</div>
<div begin="20.00s" dur="1.50s">business jets,</div>
<div begin="21.50s" dur="2.00s">floatplanes and helicopters</div>
<div begin="23.50s" dur="2.25s">all take off from airstrips like this one</div>
<div begin="26.00s" dur="1.50s">Or this one.</div>

<div begin="28.25s" dur="1.75s">Like any other airport,</div>
<div begin="30.00s" dur="1.00s">you'll find crew, </div>
<div begin="31.00s" dur="1.00s">baggage handlers, </div>
<div begin="32.00s" dur="1.00s">fuel trucks</div>
<div begin="33.00s" dur="2.00s">and aircraft moving about.</div>
<div begin="35.00s" dur="2.75s">What you may not find are flight attendants</div>
<div begin="37.75s" dur="1.75s">and that means when it comes to safety,</div>
<div begin="39.50s" dur="1.75s">you need to take the lead.</div>

<div begin="41.25s" dur="2.00s">First you need to get from Point A</div>
<div begin="43.25s" dur="1.25s">the terminal</div>
<div begin="44.50s" dur="1.00s">to Point B</div>
<div begin="45.50s" dur="1.25s">the aircraft. </div>

<div begin="46.75s" dur="2.25s">Without an enclosed walkway to shelter you,</div>
<div begin="49.00s" dur="2.00s">there are a few things to keep in mind.</div>

<div begin="51.25s" dur="3.00s">First, the most direct route isn't always the safest.</div>
<div begin="54.50s" dur="2.50s">Always follow the directions given to you by the crew</div>
<div begin="57.00s" dur="1.25s">and, if there is one, </div>
<div begin="58.25s" dur="1.75s">follow the painted walkway</div>
<div begin="60.00s" dur="2.25s">that way, you can be seen by any moving aircraft </div>
<div begin="62.25s" dur="1.75s">and you'll stay clear of hazards</div>
<div begin="64.00s" dur="2.00s">like propellers or wings.</div>

<div begin="66.00s" dur="2.00s">And make sure you have a firm grip on your belongings </div>
<div begin="68.00s" dur="1.25s">at all times</div>
<div begin="69.25s" dur="1.75s">even something as small as a hat </div>
<div begin="71.00s" dur="1.50s">could cause significant damage </div>
<div begin="72.50s" dur="1.75s">if it's blown into a propeller. </div>

<div begin="74.25s" dur="2.50s">It's also important to never smoke near any aircraft</div>
<div begin="76.75s" dur="1.75s">or refuelling station</div>
<div begin="78.50s" dur="1.50s">the fuel is extremely flammable</div>
<div begin="80.00s" dur="1.75s">and can ignite instantly. </div>

<div begin="82.50s" dur="3.00s">Above all, be aware of your surroundings at all times.</div>
<div begin="86.00s" dur="1.50s">This means not listening to music</div>
<div begin="87.50s" dur="1.00s">or using your phone</div>
<div begin="88.50s" dur="1.50s">while walking across the airstrip</div>
<div begin="90.00s" dur="1.25s">or boarding the plane. </div>
<div begin="91.25s" dur="2.00s">It also means watching out for propellers,</div>
<div begin="93.25s" dur="2.50s">rotor blades, exhausts and intakes</div>
<div begin="95.75s" dur="3.00s">all of which could cause serious injury.</div>

<div begin="99.25s" dur="1.25s">Different types of aircraft</div>
<div begin="100.50s" dur="1.50s">have different boarding procedures.</div>
<div begin="102.75s" dur="1.25s">Make sure you know in advance</div>
<div begin="104.00s" dur="2.25s">how to approach and leave your aircraft.</div>
<div begin="106.25s" dur="3.25s">This is particularly important for helicopters and floatplanes.</div>
<div begin="109.50s" dur="1.75s">With a helicopter, for example,</div>
<div begin="111.25s" dur="3.00s">you should always approach from the front.</div>

<div begin="114.00s" dur="3.00s">Of course, safety doesn't end once you're inside the plane.</div>
<div begin="117.00s" dur="1.50s">Without any flight attendants, </div>
<div begin="118.50s" dur="1.50s">it's up to you to understand</div>
<div begin="120.00s" dur="2.25s">the ins and outs of the aircraft you're flying on.</div>

<div begin="122.25s" dur="1.25s">Part of that understanding</div>
<div begin="123.50s" dur="2.00s">will come from the pilot's briefing.</div>
<div begin="126.00s" dur="2.50s">Your pilot is experienced and well trained</div>
<div begin="128.50s" dur="3.00s">so be sure to not only listen closely to what they have to say,</div>
<div begin="131.50s" dur="3.00s">but to carefully follow all of their instructions. </div>
<div begin="134.50s" dur="1.25s">If at any point</div>
<div begin="135.75s" dur="2.75s">you feel something has been left unsaid</div>
<div begin="137.50s" dur="1.25s">or is unclear,</div>
<div begin="138.75s" dur="2.00s">don't be afraid to ask questions.</div>

<div begin="141.00s" dur="3.25s">This briefing will change
depending on the type of plane you're on,</div>
<div begin="144.25s" dur="1.25s">but it should cover:</div>

<div begin="145.75s" dur="2.25s">how to safely store your carry-on luggage</div>
<div begin="148.00s" dur="2.00s">if there is room for it in the cabin;</div>
<div begin="150.00s" dur="2.00s">how to use your seat belt; </div>
<div begin="152.00s" dur="3.00s">how to operate the door in case of an emergency landing;</div>
<div begin="155.00s" dur="2.00s">and where to find fire extinguishers,</div>
<div begin="157.00s" dur="1.00s">first aid kits, </div>
<div begin="158.00s" dur="1.00s">oxygen masks </div>
<div begin="159.00s" dur="2.00s">and life preservers.</div>

<div begin="161.00s" dur="3.25s">The briefing should also include the emergency locator transmitter,</div>
<div begin="164.25s" dur="1.50s">or ELT.</div>
<div begin="165.75s" dur="3.25s">It transmits a radio signal that allows rescue workers to find you</div>
<div begin="169.00s" dur="2.25s">in the event of an emergency landing. </div>

<div begin="171.50s" dur="2.75s">Now, don't let all this emergency talk scare you.</div>
<div begin="174.25s" dur="2.50s">Canada has a strong aviation safety record.</div>
<div begin="176.75s" dur="2.75s">But the best protection is good preparation.</div>

<div begin="180.00s" dur="3.00s">Thats why every aircraft carries a passenger safety card,</div>
<div begin="183.00s" dur="1.25s">like this. </div>
<div begin="184.25s" dur="3.00s">It should include all of the information from the pilot's briefing</div>
<div begin="187.00s" dur="3.50s">as well as additional details about the plane's safety procedures</div>
<div begin="190.50s" dur="2.50s">so make sure to look it over before you take off. </div>

<div begin="194.00s" dur="1.25s">Once you're in the air,</div>
<div begin="195.25s" dur="2.00s">you still have a big role to play.</div>

<div begin="197.50s" dur="2.75s">First, make sure you know how to quickly fasten your seat belt</div>
<div begin="200.25s" dur="1.75s">at any time during the flight</div>
<div begin="202.00s" dur="1.50s">this includes during take-off,</div>
<div begin="203.50s" dur="2.00s">if the pilot turns on the safety belt sign</div>
<div begin="205.50s" dur="2.25s">or instructs you verbally mid-flight, </div>
<div begin="207.75s" dur="2.00s">and prior to landing. </div>

<div begin="209.75s" dur="2.75s">Second, ensure that all carry-on bags are stowed away,</div>
<div begin="212.50s" dur="1.75s">loose items are secure </div>
<div begin="214.25s" dur="2.25s">and that the cabin is free from obstruction.</div>
<div begin="216.50s" dur="2.50s">This will help make an emergency evacuation easier,</div>
<div begin="219.00s" dur="1.25s">if needed.</div>

<div begin="220.25s" dur="2.00s">Third, don't distract the pilot. </div>
<div begin="222.25s" dur="2.75s">This doesn't mean you can't ever talk to the pilot</div>
<div begin="225.00s" dur="2.00s">in fact, if you notice something out of the ordinary,</div>
<div begin="227.00s" dur="2.00s">by all means, tell them.</div>

<div begin="229.00s" dur="3.25s">Finally, don't interfere with the operation of the aircraft.</div>
<div begin="232.25s" dur="1.75s">This means not touching any controls,</div>
<div begin="234.00s" dur="1.25s">knobs or gauges,</div>
<div begin="235.25s" dur="1.75s">and waiting for the pilot's permission</div>
<div begin="237.00s" dur="2.25s">to open any windows or doors.</div>

<div begin="240.00s" dur="3.25s">Also, because some items can interfere with the planes systems,</div>
<div begin="243.25s" dur="1.25s">always ask the pilot</div>
<div begin="244.50s" dur="2.00s">which electronic equipment you can use </div>
<div begin="246.50s" dur="1.50s">before you take off.</div>
<div begin="248.00s" dur="2.25s">If in doubt, don't use it. </div>

<div begin="251.50s" dur="2.00s">Remember, comfort and safety in the air</div>
<div begin="253.50s" dur="2.25s">is a partnership between you and the pilot. </div>
<div begin="255.75s" dur="1.50s">Keep these tips in mind </div>
<div begin="257.25s" dur="3.00s">and you'll be sure to have a safe and memorable trip.</div>
<div begin="261.00s" dur="1.25s">Be informed.</div>
<div begin="262.25s" dur="1.00s">Be prepared.</div>
<div begin="263.25s" dur="1.00s">And be safe.</div>


</body>
</tt>

0 comments on commit 4b8dc74

Please sign in to comment.