{"id":260803,"date":"2015-07-06T18:20:02","date_gmt":"2015-07-06T14:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=260803"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=260803","title":{"rendered":"\u0421\u0432\u043e\u044f JS \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u0434\u043b\u044f Uppod \u043f\u043b\u0435\u0435\u0440\u0430"},"content":{"rendered":"<br \/>\n<h4>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h4>\n<p>  \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043b\u0435\u0435\u0440 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 <a href=\"http:\/\/uppod.ru\/\">\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 Uppod<\/a>, \u0432\u0435\u0434\u044c \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0438 HTML5 \u0438 Flash \u0432\u0435\u0440\u0441\u0438\u0438, \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u0442\u0438\u043b\u0435\u0439 \u0438 \u0442.\u043f., \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0432\u044b\u0434\u0430\u0447\u0438 HTML5 \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 Flash. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f \u043e\u0441\u043e\u0431\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u0435\u043b, \u043a\u0440\u043e\u043c\u0435 \u043a\u0443\u0441\u043e\u0447\u043a\u0430 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 flash \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0441\u043b\u0430\u0432\u0430 <s>\u043a\u043e\u0441\u0442\u044b\u043b\u044f\u043c<\/s>, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 JS \u0438 Uppod API \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0435\u044e \u0441 \u0432\u0430\u043c\u0438, \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430<\/h4>\n<p>  1. \u0412\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434\u0435\u043e \u043f\u043b\u0435\u0435\u0440 \u043d\u0430 \u0441\u0430\u0439\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432, \u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u0438\u0437 Youtube, Rutube \u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0435\u0434\u0438\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430;<br \/>  2. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043f\u043b\u0435\u0435\u0440 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440;<br \/>  3. \u0412 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 flash) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0435 \u043f\u043b\u0435\u0435\u0440, \u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443;<br \/>  4. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043f\u0438\u043d\u0446\u0438\u043f\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043b\u0435\u0435\u0440\u043e\u0432 Uppod \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044f \u043a\u043e\u0434 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0441\u0430\u0439\u0442\u0443, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0430\u043c \u043f\u043b\u0435\u0435\u0440, \u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<br \/>  5. \u0423\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435, \u0438\u0431\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0443\u0447\u0443 \u043a\u043e\u0434\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043e\u0445\u043e\u0442\u0430.<\/p>\n<h4>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f?<\/h4>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <a href=\"http:\/\/uppod.ru\/help\/html5\/\">html5<\/a> \u0438 <a href=\"http:\/\/uppod.ru\/help\/q=swfobject\">flash<\/a> \u043f\u043b\u0435\u0435\u0440\u0430. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432\u0441\u0435 \u043f\u043e <a href=\"http:\/\/uppod.ru\/help\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> Uppod.<\/p>\n<h4>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b player.js \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0441\u0430\u0439\u0442\u043e\u043c.<\/p>\n<p>  <i>\u041a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 player.js<\/i><\/p>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Flash (\u0441\u043c. <a href=\"http:\/\/uppod.ru\/talk_4169\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>):<\/p>\n<pre><code class=\"javascript\">var ua = navigator.userAgent.toLowerCase(); var flashInstalled = 0;  if (typeof(navigator.plugins) != &quot;undefined&quot; && typeof(navigator.plugins[&quot;Shockwave Flash&quot;]) == &quot;object&quot;) {      flashInstalled = 1; } else if (typeof window.ActiveXObject != &quot;undefined&quot;) {      try {           if (new ActiveXObject(&quot;ShockwaveFlash.ShockwaveFlash&quot;)) {                flashInstalled = 1;           }      } catch(e) {}; }; <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0436\u0435 Uppod JavaScript API (\u0441\u043c. <a href=\"http:\/\/uppod.ru\/help\/js\/\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>):<\/p>\n<pre><code class=\"javascript\">function uppodEvent(playerID, event) {  \tswitch(event){ \t\tcase 'init':  \t\t\tbreak; \t\tcase 'start':  \t\t\tbreak; \t\tcase 'play':  \t\t\tbreak; \t\tcase 'pause':  \t\t\tbreak; \t\tcase 'stop':  \t\t\tbreak; \t\tcase 'seek':  \t\t\tbreak; \t\tcase 'loaded': \t\t\tbreak; \t\tcase 'end': \t\t\tbreak; \t\tcase 'download': \t\t\tbreak; \t\tcase 'quality': \t\t\tbreak; \t\tcase 'error': \t\t\tbreak; \t\tcase 'ad_end': \t\t\tbreak; \t\tcase 'pl': \t\t\tbreak; \t\tcase 'volume': \t\t\tbreak; \t} }  function uppodSend(playerID, com, callback) { \t  document.getElementById(playerID).sendToUppod(com); }  function uppodGet(playerID, com, callback) { \t  return document.getElementById(playerID).getUppod(com); } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u043b\u0435\u0435\u0440\u0430:<\/p>\n<pre><code class=\"javascript\">function Player(e, callback) {     vars = {         m: e.type,          id: e.id,         uid: e.id,         finder: e.finder,         detect: e.detect,     };          if (e.file) { vars.file = e.file; }     if (e.pl) { vars.pl = e.pl; }     if (e.st) { vars.st = e.st; }     if (e.st5) { vars.st5 = e.st5; }     if (e.screen) { vars.poster = e.screen; }     if (!e.style) { e.style = {w: '480px', h: '360px'}; }          if ((e.finder === 'flash' && !flashInstalled) || (e.finder === 'html5' && flashInstalled)) {         callback();     }          else if ((ua.indexOf(&quot;iphone&quot;) != -1 || ua.indexOf(&quot;ipad&quot;) != -1 || ua.indexOf(&quot;android&quot;) != -1 || ua.indexOf(&quot;windows phone&quot;) != -1 || ua.indexOf(&quot;blackberry&quot;) != -1 || e.detect == 'html5') && e.detect != 'flash') {          htm5Player(e);     }           else {         if(!flashInstalled && e.detect != 'flash') {             htm5Player(e);         }                   else {             params = {                 &quot;id&quot;: e.id,                 &quot;allowFullScreen&quot;: &quot;true&quot;,                  &quot;allowScriptAccess&quot;: &quot;always&quot;,             }                          new swfobject.embedSWF(e.swf, vars.id, e.style.w, e.style.h, &quot;10.0.0&quot;, false, vars, params);         }     } } <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 HTML5 \u043f\u043b\u0435\u0435\u0440\u0430:<\/p>\n<pre><code class=\"javascript\">function htm5Player(e) {     vars = {         m: e.type,          uid: e.id,     };          if (e.screen) { vars.poster = e.screen; }     if (e.file) { vars.file = e.file; }     if (e.pl) { vars.pl = e.pl; }     if (e.st5) { vars.st = e.st5; }        \tplayer = new Uppod(vars);     uppodDetect(e.id, 'html5');          var doc = document.getElementById(e.id);     doc.style.width = e.style.w;     doc.style.height = e.style.h;\t     } <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0443 \u043f\u043b\u0435\u0435\u0440\u0430:<\/p>\n<pre><code class=\"javascript\">function uppodDetect(id, type) {     doc = document.getElementById(id);     if (type) {          doc.setAttribute('data-uppod-detect', type);      }     detect = doc.getAttribute('data-uppod-detect');     if (detect == 'html5') {          return 'html5';      }     return 'flash'; } <\/code><\/pre>\n<p>  \u041f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 API \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043f\u043b\u0435\u0435\u0440\u0443 Uppod \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u0440\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439:<\/p>\n<pre><code class=\"javascript\">function sendPlayer(id, com, callback) {     if (uppodDetect(id) == 'flash') {         document.getElementById(id).sendToUppod(com);     }           else {       \tif (com == 'play') {            player.Play()         } else if (com == 'pause') {            player.Pause()         } else if (com == 'toggle') {            player.Toggle()         } else if (com == 'stop') {            player.Stop()         } else if (com.match(\/file:\/i)) {            com = com.replace(\/file:\/g, '');            player.Play(com);         } else if (com.match(\/v\/i)) {            com = com.replace(\/v\/g, '');            player.Volume(com \/ 100);         } else if (com == 'download') {            player.Download();         }     } } <\/code><\/pre>\n<p>  \u041d\u0443, \u0432\u043e\u0442 \u0438 \u0432\u0441\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043d\u0430\u0448 player.js \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0432 head \u0441\u0430\u0439\u0442\u0430, \u043a\u0430\u043a \u0438 \u0432\u0441\u0435 js \u0444\u0430\u0439\u043b\u044b \u043f\u043b\u0435\u0435\u0440\u0430.<\/p>\n<pre><code class=\"html\">&lt;script src=&quot;http:\/\/site.ru\/player.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u0435\u0435\u0440\u0430 \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h4>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043d\u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b \u043a\u0430\u043a \u0438 \u0432 <a href=\"http:\/\/uppod.ru\/help\/q=flashvars\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> Uppod \u043f\u043b\u0435\u0435\u0440\u0430:<\/p>\n<p>  <b>id<\/b> \u2014 \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u043b\u0435\u0435\u0440\u0430<br \/>  <b>st<\/b> \u2014 C\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0442\u0438\u043b\u0438<br \/>  <b>pl<\/b> \u2014 \u041f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0435\u0433\u043e<br \/>  <b>file<\/b> \u2014 \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u0435\u0434\u0438\u0430 \u0444\u0430\u0439\u043b (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d pl)<br \/>  <b>type<\/b> \u2014 \u0422\u0438\u043f \u043f\u043b\u0435\u0435\u0440\u0430 audio\/video<br \/>  <b>screen<\/b> \u2014 \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u043a\u0443 \u0432\u0438\u0434\u0435\u043e<br \/>  <b>swf<\/b> \u2014 \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043b\u0435\u0435\u0440<br \/>  <b>st5<\/b> \u2014 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0438\u043b\u0435\u0439 \u0434\u043b\u044f HTML5 \u043f\u043b\u0435\u0435\u0440\u0430, \u0438\u043b\u0438 \u043a\u043e\u0434 \u0441\u0442\u0438\u043b\u044f<br \/>  <b>finder<\/b> \u2014 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 flash\/html5, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u043b\u0435\u0435\u0440, \u0432\u0435\u0440\u043d\u0435\u0442 callback \u0444\u0443\u043d\u043a\u0446\u0438\u044e<br \/>  <b>detect<\/b> \u2014 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 flash\/html5, \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0435\u0435\u0440\u0430<br \/>  <u>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 (\u0434\u043b\u044f html5 \u0438 flash \u0432\u0435\u0440\u0441\u0438\u0438)<\/u><\/p>\n<pre><code class=\"html\">&lt;div id=&quot;player&quot;&gt;&lt;\/div&gt; &lt;script type=&quot;text\/javascript&quot;&gt;  vars = {      id: 'player', \/\/ id \u043f\u043b\u0435\u0435\u0440\u0430      type: 'video', \/\/ \u0442\u0438\u043f \u043f\u043b\u0435\u0435\u0440\u0430      file: 'video.mp4', \/\/ \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b      swf: 'uppod.swf', \/\/ \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043b\u0435\u0435\u0440  };  new Player(vars);  &lt;\/script&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043b\u0435\u0435\u0440\u0430 \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0430 callback \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<pre><code class=\"html\">&lt;div id=&quot;player&quot;&gt;&lt;\/div&gt; &lt;script type=&quot;text\/javascript&quot;&gt; vars = {     id: 'player',     type: 'video',      file: 'http:\/\/rutube.ru\/video\/bde119ee2ce067e7fc6124398d7043d3\/',  \/\/ \u0412\u0438\u0434\u0435\u043e \u0441 Rutube \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f flash \u0432\u0435\u0440\u0441\u0438\u0438     swf: 'player\/uppod-rutube.swf',     finder: 'flash', };\t\t new Player(vars, function () {     document.getElementById('player').innerHTML = '&lt;iframe src=&quot;http:\/\/rutube.ru\/play\/embed\/7821719&quot; width=&quot;100%&quot; height=&quot;360&quot; frameborder=&quot;0&quot;&gt;&lt;\/iframe&gt;'; \/\/ \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 flash, \u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434. }); &lt;\/script&gt; <\/code><\/pre>\n<p>  <u>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 API \u043a\u043d\u043e\u043f\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (\u0438\u0445 \u043c\u0430\u043b\u043e, \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0438\u0445) \u043e\u0431\u043e\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 Uppod \u043f\u043b\u0435\u0435\u0440\u0430:<\/u><\/p>\n<p>  <b>play<\/b> \u2014 \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u043b\u0435\u0435\u0440\u0430<br \/>  <b>pause<\/b> \u2014 \u041f\u0430\u0443\u0437\u0430<br \/>  <b>stop<\/b> \u2014 \u0421\u0442\u043e\u043f<br \/>  <b>toggle<\/b> \u2014 \u041f\u0443\u0441\u043a \/ \u041f\u0430\u0443\u0437\u0430<br \/>  <b>v50<\/b> \u2014 \u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c \u043d\u0430 50%<br \/>  <b>file<\/b> \u2014 \u0417\u0430\u043f\u0443\u0441\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (file:url)<br \/>  \u042d\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 sendPlayer (&#8216;\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440_\u043f\u043b\u0435\u0435\u0440\u0430&#8217;, &#8216;\u043a\u043e\u043c\u0430\u043d\u0434\u0430&#8217;).<\/p>\n<p>  <u>\u041f\u0440\u0438\u043c\u0435\u0440:<\/u>  <\/p>\n<pre><code class=\"html\">&lt;a onclick=&quot;sendPlayer('player', 'play');&quot; title=&quot;\u041f\u0443\u0441\u043a&quot;&gt;Play&lt;\/a&gt; &lt;a onclick=&quot;sendPlayer('player', 'pause');&quot; title=&quot;\u041f\u0430\u0443\u0437\u0430&quot;&gt;Pause&lt;\/a&gt; &lt;a onclick=&quot;sendPlayer('player', 'toggle');&quot; title=&quot;\u041f\u0443\u0441\u043a \/ \u041f\u0430\u0443\u0437\u0430&quot;&gt;Toggle&lt;\/a&gt; &lt;a onclick=&quot;sendPlayer('player', 'stop');&quot; title=&quot;\u0421\u0442\u043e\u043f&quot;&gt;Stop&lt;\/a&gt; &lt;a onclick=&quot;sendPlayer('player', 'v50');&quot; title=&quot;\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c=50&quot;&gt;\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c 50%&lt;\/a&gt; &lt;a onclick=&quot;sendPlayer('player', 'file:http:\/\/uppod.net\/sample.flv');&quot; title=&quot;\u0417\u0430\u043f\u0443\u0441\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430&quot;&gt;File:Url&lt;\/a&gt; <\/code><\/pre>\n<p>  \u041d\u0443, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c. \u041a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c <a href=\"http:\/\/alex-borisi.ru\/demo\/uppod\/player1.html\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 player.js \u043c\u043e\u0436\u043d\u043e \u043f\u043e <a href=\"http:\/\/alex-borisi.ru\/demo\/uppod\/player.zip\">\u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.             <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/261911\/\"> http:\/\/habrahabr.ru\/post\/261911\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h4>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h4>\n<p>  \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043b\u0435\u0435\u0440 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 <a href=\"http:\/\/uppod.ru\/\">\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 Uppod<\/a>, \u0432\u0435\u0434\u044c \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0438 HTML5 \u0438 Flash \u0432\u0435\u0440\u0441\u0438\u0438, \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u0442\u0438\u043b\u0435\u0439 \u0438 \u0442.\u043f., \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0432\u044b\u0434\u0430\u0447\u0438 HTML5 \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 Flash. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f \u043e\u0441\u043e\u0431\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u0435\u043b, \u043a\u0440\u043e\u043c\u0435 \u043a\u0443\u0441\u043e\u0447\u043a\u0430 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 flash \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0441\u043b\u0430\u0432\u0430 <s>\u043a\u043e\u0441\u0442\u044b\u043b\u044f\u043c<\/s>, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 JS \u0438 Uppod API \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0435\u044e \u0441 \u0432\u0430\u043c\u0438, \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-260803","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/260803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260803"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/260803\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}