You are here

src_minplayer.templates.base.js.html in HTML5 Media 7

  1 /** The minplayer namespace. */
  2 var minplayer = minplayer || {};
  3 
  4 /** All of the template implementations */
  5 minplayer.templates = minplayer.templates || {};
  6 
  7 /**
  8  * @constructor
  9  * @extends minplayer.display
 10  * @class The base template class which all templates should derive.
 11  *
 12  * @param {object} context The jQuery context.
 13  * @param {object} options This components options.
 14  */
 15 minplayer.templates.base = function(context, options) {
 16 
 17   // Derive from display
 18   minplayer.display.call(this, 'template', context, options);
 19 };
 20 
 21 /** Derive from minplayer.display. */
 22 minplayer.templates.base.prototype = new minplayer.display();
 23 
 24 /** Reset the constructor. */
 25 minplayer.templates.base.prototype.constructor = minplayer.templates.base;
 26 
 27 /**
 28  * @see minplayer.plugin#construct
 29  */
 30 minplayer.templates.base.prototype.construct = function() {
 31 
 32   // Call the minplayer display constructor.
 33   minplayer.display.prototype.construct.call(this);
 34 
 35   // We are now ready.
 36   this.ready();
 37 };
 38 
 39 /**
 40  * @see minplayer.display#getElements
 41  * @return {object} The display elemnents for this component.
 42  */
 43 minplayer.templates.base.prototype.getElements = function() {
 44   var elements = minplayer.display.prototype.getElements.call(this);
 45   return jQuery.extend(elements, {
 46     player: null,
 47     display: null,
 48     media: null
 49   });
 50 };
 51 
 52 /**
 53  * Called when the media player goes into full screen mode.
 54  *
 55  * @param {boolean} full TRUE - The player is in fullscreen, FALSE otherwise.
 56  */
 57 minplayer.templates.base.prototype.onFullScreen = function(full) {
 58 };
 59 

File

player/doc/symbols/src/src_minplayer.templates.base.js.html
View source
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/** The minplayer namespace. */</span><span class="WHIT">
<span class='line'>  2</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minplayer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minplayer</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  3</span> 
<span class='line'>  4</span> </span><span class="COMM">/** All of the template implementations */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">minplayer.templates</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minplayer.templates</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> 
<span class='line'>  7</span> </span><span class="COMM">/**
<span class='line'>  8</span>  * @constructor
<span class='line'>  9</span>  * @extends minplayer.display
<span class='line'> 10</span>  * @class The base template class which all templates should derive.
<span class='line'> 11</span>  *
<span class='line'> 12</span>  * @param {object} context The jQuery context.
<span class='line'> 13</span>  * @param {object} options This components options.
<span class='line'> 14</span>  */</span><span class="WHIT">
<span class='line'> 15</span> </span><span class="NAME">minplayer.templates.base</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">context</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">options</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 16</span> 
<span class='line'> 17</span> </span><span class="WHIT">  </span><span class="COMM">// Derive from display</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">  </span><span class="NAME">minplayer.display.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'template'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 20</span> 
<span class='line'> 21</span> </span><span class="COMM">/** Derive from minplayer.display. */</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="NAME">minplayer.templates.base.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">minplayer.display</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 23</span> 
<span class='line'> 24</span> </span><span class="COMM">/** Reset the constructor. */</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="NAME">minplayer.templates.base.prototype.constructor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minplayer.templates.base</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span> 
<span class='line'> 27</span> </span><span class="COMM">/**
<span class='line'> 28</span>  * @see minplayer.plugin#construct
<span class='line'> 29</span>  */</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="NAME">minplayer.templates.base.prototype.construct</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 31</span> 
<span class='line'> 32</span> </span><span class="WHIT">  </span><span class="COMM">// Call the minplayer display constructor.</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">  </span><span class="NAME">minplayer.display.prototype.construct.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span> 
<span class='line'> 35</span> </span><span class="WHIT">  </span><span class="COMM">// We are now ready.</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT">  </span><span class="NAME">this.ready</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 38</span> 
<span class='line'> 39</span> </span><span class="COMM">/**
<span class='line'> 40</span>  * @see minplayer.display#getElements
<span class='line'> 41</span>  * @return {object} The display elemnents for this component.
<span class='line'> 42</span>  */</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="NAME">minplayer.templates.base.prototype.getElements</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">  </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elements</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minplayer.display.prototype.getElements.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">  </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jQuery.extend</span><span class="PUNC">(</span><span class="NAME">elements</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">    </span><span class="NAME">player</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">    </span><span class="NAME">display</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">    </span><span class="NAME">media</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 51</span> 
<span class='line'> 52</span> </span><span class="COMM">/**
<span class='line'> 53</span>  * Called when the media player goes into full screen mode.
<span class='line'> 54</span>  *
<span class='line'> 55</span>  * @param {boolean} full TRUE - The player is in fullscreen, FALSE otherwise.
<span class='line'> 56</span>  */</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="NAME">minplayer.templates.base.prototype.onFullScreen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">full</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 59</span> </span></pre></body></html>