How videos run on this site

I bought the Flow­player in 2009 to run flash videos on this site. While updat­ing, I thought that the jwplayer would be a bet­ter choice, so I bought that ones as well. I espe­cially liked the ease of mak­ing fall-backs (fail-overs) and com­bin­ing with HTML5 to han­dle iPhones and iPads. The prob­lem was that the embed­ded code would not work in Microsoft Inter­net Explorer 7, 6 and 5.5 — even if flash were installed. Try­ing SWFOb­ject instead, it worked for all Inter­net Explor­ers, but I did not under­stand how to make a fall­back for MP4 (iPhone) or OGV (native Fire­Fox). And when using pure HTML5 with fall-back, the pri­or­ity was turned away away from flash.

Stuck!

With help from the super-pro ETHAN at long­tail, I got an idea how to get it the way I wanted. Solution:

Priority, assumptions and philosophy

1. Flash shall be tried first to get bells and plug-ins run­ning, assum­ing that the per­son who has flash installed actu­ally wants to use flash even if it could be played with­out flash in his/her browser (Safari can play MP4 files, Fire­fox can play OGV files with­out any flash player). If flash player is less than “9”, then upgrad­ing will be suggested.

2. If there is no flash player at all, it can mean that the browser does not accept flash (iPhone) or that some­body does not like flash or H.264, and does not like to have such “impure” things in their com­puter (Respect!). Then, try with an MP4-file (e.g. iPhone, Safari with­out flash), or with an OGV file (Fire­fox with­out flash player). It could also be that there is no flash player because it’s a fresh PC with Inter­net Explorer, but that would be rare. Who would visit this site before any­thing else? Any­way, such users will get advices on how to proceed.

3. If there is no flash player and it can’t be played with­out it, show a mes­sage to to “upgrade browser” or to “install flash”, depend­ing on the sit­u­a­tion. Finally, although rare, it may hap­pen that javascripts are not allowed, and then a mes­sage about this will be announced.

In my opin­ion, this solu­tion is bet­ter than embed­ding using jwplayer.js in one way and worse in another way. It is bet­ter in the way that it can han­dle also IE7. It is worse in the way that I don’t know who to set up with dif­fer­ent files for “lev­els” with dif­fer­ent bit-rates, but that I don’t need it so it’s fine with me. I also like that it tries with flash first, but that is a mat­ter of taste.

This works for close to 100% of all browsers if not all. Inter­net Explorer after 5.5, Fire­fox, Safari, Chome, iPhone have been tested with­out any problems.



<script src=”/jwplayer/swfobject.js” type=“text/javascript”></script>
<div id=“flash­Con­tent”></div>
<script type=“text/javascript”>// <![CDATA[
var MM_contentVersion = 6;
var plu­gin = (navigator.mimeTypes &#038;&#038; navigator.mimeTypes[“appli­ca­tion/x‑shock­wave-flash”]) ? navigator.mimeTypes[“appli­ca­tion/x‑shock­wave-flash”].enabled­Plu­gin : 0;<br />
if ( plu­gin ) {<br />
var words = navigator.plugins[“Shock­wave Flash”].description.split(“ ”);<br />
for (var i = 0; i < words.length; ++i) { if (isNaN(par­seInt(words[i]))) con­tinue; var MM_PluginVersion = words[i]; } var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;<br />
}<br />
else if (navigator.userAgent &#038;&#038; navigator.userAgent.indexOf(“MSIE”)>=0<br />
&#038;&#038; (navigator.appVersion.indexOf(“Win”) != -1)) {<br />
document.write(‘<SCR’ + ‘IPT LANGUAGE=VBScript\> \n’); //FS hide this from IE4.5 Mac by split­ting the tag<br />
document.write(‘on error resume next \n’);<br />
document.write(‘MM_FlashCanPlay = ( IsObject(CreateObject(“ShockwaveFlash.ShockwaveFlash.” &#038; MM_contentVersion)))\n’);<br />
document.write(‘</SCR’ + ‘IPT\> \n’);<br />
}<br />
if ( MM_FlashCanPlay ) {<br />
var so = new SWFOb­ject(‘/jwplayer/player.swf’,‘flash­player’,‘640’,‘480’,‘9’);<br />
so.addParam(‘allow­fullscreen’,‘true’);<br />
so.addParam(‘allowscrip­tac­cess’,‘always’);<br />
so.addParam(‘autostart’,‘true’);<br />
so.addParam(‘bgcolor’,‘#000’);<br />
so.addVariable(‘file’,‘/public/Video/videoFileName.mp4’);<br />
so.addVariable(‘autostart’,‘true’);<br />
so.addVariable(‘con­trol­bar’,‘over’);<br />
so.addVariable(‘plu­g­ins’,‘fbit‑1, tweetit‑1, sharing‑2’);<br />
so.addVariable(‘skin’,’/jwplayer/skins/glow.zip’);<br />
shar­ingLink = encodeURI­Com­po­nent(‘<span class=“mceItemEmbed”  src=“http://www.site4video.com/jwplayer/player.swf” mce_src=“http://www.site4video.com/jwplayer/player.swf” width=“160” height=“240” allowfullscreen=“true” /></span>’);<br />
so.addVariable(‘sharing.code’,shar­ingLink);<br />
so.addVariable(‘sharing.link’,‘http://www.site4video.com/test/index4.html’);<br />
so.write(‘flash­Con­tent’);<br />
} else {<br />
document.write(‘<video width=“640” height=“480” con­trols auto­play>’);<br />
document.write(‘<source src=“http://www.site4video.com/public/Video/videoFileName.mp4” mce_src=“http://www.site4video.com/public/Video/videoFileName.mp4”  type=“video/mp4” />’);<br />
document.write(‘<source src=“http://www.site4video.com/public/Video/videoFileName.ogv” mce_src=“http://www.site4video.com/public/Video/videoFileName.ogv”  type=“video/ogg” />’);<br />
document.write(‘<span class=“mceItemObject”  width=“640” height=“480” type=“application/x‑shockwave-flash” data=“http://www.site4video.com/applications/jwplayer/player.swf”>’);<br />
document.write(‘    <img src=“http://www.site4video.com/public/Video/Video-problem.jpg” mce_src=“http://www.site4video.com/public/Video/Video-problem.jpg” width=“640” height=“480” alt=“Video prob­lem…“’);document.write(        ‘title=“No video play­back capa­bil­i­ties, please down­load the video below” />’);<br />
document.write(        ‘Try a new Flash player.’);<br />
document.write(        ‘<a href=“http://get.adobe.com/flashplayer/” mce_href=“http://get.adobe.com/flashplayer/”>from Adobe.</a>’);<br />
document.write(‘</span>’);<br />
document.write(‘</video>’);<br />
}<br />
// ]]></script>
<noscript>
<img src=“http://www.site4video.com/public/Video/Video-problem.jpg” width=“640” height=“480” alt=“Video prob­lem…” title=“No video play­back capa­bil­i­ties, please down­load the video below”>
Your browser is block­ing scipts. Change its settings.
</noscript>

8 thoughts on “How videos run on this site”

  1. Купить металлочерепицу — только в нашем магазине вы найдете качественную продукцию. Быстрей всего сделать заказ на металлочерепица для крыши можно только у нас!
    [url=https://metallocherepica24.by/]купить металлочерепицу минск[/url]
    стоимость металлочерепицы — [url=https://metallocherepica24.by]http://metallocherepica24.by/[/url]
    [url=https://visitingmontgomery.com/?URL=metallocherepica24.by]https://google.ci/url?q=http://metallocherepica24.by[/url]

    [url=https://thegioireview.vn/tao-so-dien-thoai-ao-84/#comment-6269]Металлочерепица купить в минске недорого — при выборе наиболее лучшего варианта металлочерепицы необходимо учитывать все преимущества и недостатки, а также анализировать погодные условия местности, где вы живете, качество продуктов, ее стоимость и технические характеристики.[/url] 7d38299

  2. Прогон сайта с помощью Хрумера может помочь улучшить позиции сайта в поисковых системах, повысить его трафик и увеличить количество потенциальных клиентов. Однако, не следует забывать, что использование Хрумера может повлечь за собой риск нарушения правил поисковых систем, таких как Google, что может привести к наказанию и снижению рейтинга сайта.
    [url=https://ru.xelo.pro/xrumer/]прогон хрумером заказать[/url]

  3. Прогон сайта с помощью Хрумера может помочь улучшить позиции сайта в поисковых системах, повысить его трафик и увеличить количество потенциальных клиентов. Однако, не следует забывать, что использование Хрумера может повлечь за собой риск нарушения правил поисковых систем, таких как Google, что может привести к наказанию и снижению рейтинга сайта.
    [url=https://ru.xelo.pro/site-v-top/]top to[/url]

  4. Прогон сайта с помощью Хрумера может помочь улучшить позиции сайта в поисковых системах, повысить его трафик и увеличить количество потенциальных клиентов. Однако, не следует забывать, что использование Хрумера может повлечь за собой риск нарушения правил поисковых систем, таких как Google, что может привести к наказанию и снижению рейтинга сайта.
    [url=https://ru.xelo.pro/]конкурентов анализ[/url]

Leave a Comment

Your email address will not be published. Required fields are marked *

This website uses cookies. By continuing to use this site, you accept our use of cookies. 

Scroll to Top