tadalafil what is itcialis 20mg reviewgeneric tadalafil onlinebuy cheap tadalafil softbuy cialis online canadatadalafil dosecialis syntropbillig tadalafilcialis 2.5 mg cost walmartfree cialisprice compare tadalafilcialis romaniageneric cialis next day deliverycialis 20 mg onlinecialis dosage 40 mgtadalafil in pulmonary hypertensioncialis superactivepurchase cialis without prescriptioncialis dosage optionsgeneric tadalafil reviewcialis prices in mexicoguaranteed erections samplesgeneric cialis any goodgeneric cialis legalcheap tadalafil 20 mg onlinecialis pill cuttertadalafil 10mgcialis 5cheapest cialis ukbest discount cialisstallions erectionshow much cialiscialis side effectscheap 40 mg tadalafil visahow much does cialis costgeneric cialis usatadalafil pricecialis generiquebuy cialis 5mgcialis fast deliverytadalafil salecialas samplestadalafil professionaltadalafil tadalafilocialis paypal paymentpay with paypal for cialistadalafil dosingadcirca vs cialisgeneric cialis professionalcialis dealscialis coupon5mg cialisbuy cialis onlinecialis every daycanada brand name cialas 100mgcialis online canadian pharmacytadalafil daily dosecialis daily costsildenafil vardenafil tadalafilwhat is tadalafil 20mgvardenafil vs tadalafilcialis en francaiscialis professional reviewpaypal cialisfemale cialiswal-mart cialis pricetadalafil instructionsgeneric online cheap tadalafilcialis 5mg reviewscialis daily canadacheap cialis australiacialis online paypalcanadian everyday cialiscialis online canada no prescriptioncialis tadalafil lillycialas vancouver bcsildenafil or tadalafilcialis weekendgeneric cialis softbuy generic cialis canadapurchase cialis in mexicocialis professional canadatadalafil soft tabs 20mgcialis bestellendaily cialis 5mg genericcheap cialis from indiacialis chicagocialis online consultationgeneric verses traditional cialiscialis now no prescriptioncialis super active from indiabuy cialis online with a prescriptioncialas savingscialis price in mexicocialis super activegeneric cialis australiageneric cialis 20mg best buy mexicoorder cialiscialis no prescription needed candiancialis masturbationsildenafil vs tadalafil vs vardenafilcialis price comparisoncialis 2.5 prices canadatadalafil sublingual tabletswalgreens cost of cialistadalafil from canadageneric cialis capsuleswhat does generic cialis look likegeneric cialis online without prescriptioncialis without prescription in canadacialis price increasecanadian pharmacy cialiscialis 5mg daily dosecialis is awesomecialis 50 mgtadalafil soft tabsgeneric online order tadalafil 20mgfree cialis couponcialis generic canada drugstadalafil 20mgchemical makeup of cialisgeneric online order cheap tadalafil 20mgcialis online in canadacialas overmightcheap 40mg tadalafil overnight deliverytadalafil salecialis free sample canadacialis directionsis cialis covered by medicarecialis 20mg effectscialis vs viagra pricewhere to purchase cialistadalafil 5 mgcheapest tadalafil pharmacy comparisoncialis 5mg costcheap cialis soft tabscialis kontraindikacijeCialis discountcialis dosage side effectstadalafil bulkgeneric cialis in usacialis made in switzerlandcialis srbijageneric cialis clipsgeneric cialis namescheap cialis tabletscialis cenacanada cialistadalafil jellycialis price in indiacialis expiration datetadalafil maximum dosagecialis online canadacialis soft tabs 20mgtadalafil ohne rezeptis generic cialis availablecan cialis be bought over the countertadalafil pharmacokineticsis tadalafil the same as cialishow long does cialis 20mg lasttadalafil 100mglow dose cialis dailycialis from canadacialis for sale in ukcheap tadalafil for saleorder cheap tadalafilcialis online paypal paymentcialis netherlandscialis in canadacialis pill splittingtadalafil usacialis professional vs cialistadalafil tablets genericcialis vs over the countersildenafil tadalafil and vardenafiltadalafil effect on womenbuy tadalafil canadapurchase cheap cialis soft tabscialis price philippinegeneric tadalafil 10mghow to make cialis more effectivetadalafil 40 mgtadalafil costgeneric cialis 20mgbuy online cheap tadalafilgeneric tadalafil canadatadalafil tabletscialis expensivecompare generic cialis pricesventa de tadalafiltadalafil how long does it lastbest price for cialiscialistcialis 100cialis 20mg ukorder cheap cialis without prescriptioncheap brand tadalafilcost of cialis at walgreenscialis generique canadacialis canada cheapcialis 5mg dailylowest price tadalafilwhat is tadalafil oral jellycialistadalafil ukpurchase cialis online without prescriptioncialis price south africacialis 20 mg dailycialis francaiswhat does cialis look likegenetic tadalafilgeneric cialis in australiacialis 20 mg side effectscialis manilais tadalafil dangerouscialis cost australiaorder cialis from canadacialis 20tadalafil shelf lifepay with paypal for cialiscialis 10 mgfemale cialis reviewtadalafil tachyphylaxisorder cialis in canadatadalafil generic cialiswoman cialischeap cialis pricesgeneric cialis safetytadalafil pulmonary arterial hypertensionfemale cialis reviewsfree cialis samplesdoes female cialis worktadalafil for womencialis plustadalafil low dosebuy tadalafil 20mgmake cialis more effectivecialis retail price germanytadalafil how to usecialis vs cialis professionalcialis brandbuying cialis online reviewtadalafil intermediatescialis professional informationgeneric cialis overnightcialis saletadalafil erectile dysfunctiongeneric cialis free samplecialis 3 daycialis 40 mg dosetadalafil 10mg supplierlowest price cialistadalafil soft softcialis tablets for saletadalafil tolerancecialis pillscialis 20 mg reviewscialis efectos secundarioscialis sydneypurchase cialis without a prescriptionvardenafil tadalafiltadalafil from indiasuper active cialiscialis online in australiacialis couponstadalafil for pulmonary hypertensiontadalafil chewable tabletstadalafil womentadalafil pahtadalafil online without prescriptioncialis home deliverytadalafiltadalafil soft tablets 20mgtadalafil vardenafilcialis canada pricecialis 5 mg onlinecialis lelongcialis gel tabscialis c20tadalafil ranbaxycialis soft tabs reviewcialis cost ontariocialis soft tabs dosagetadalafil buy cheap onlinecialis srpskicialis online irelandcheapest cialis onlineprice of cialiscialis mail ordercan you buy cialis without a prescriptioncialis colombiacheap no prescription tadalafiltadalafil price comparisonbuy cialis with paypalcialis over the counter in montrealcialis cost walgreenscialis for salegeneric cialis online pharmacytadalafil generic uktadalafil 20mg indiafree cialis trialcost of 5mg cialiscialis irelandcialis samples in canadatadalafil medicationgeneric cialis indiatadalafil nedirtadalafil 20mg sx oral jelliestadalafil maximum dosebuy cialis online australiacialis 5mg side effectscialis no perscription paypalcialis online paypal canadacialis tabletshow effective is combining of injection medication with 20mg of cialasfast delivery cialas onlinetadalafil softcialis cost walmartcialis trial offertadalafil user reviewsbuy cialis online cheapcialis-savings.comcheap cialis pillscialis original buy onlinecialis once a day pricingcialis online pharmacythe effects of cialis on women does cialis work on womentadalafil msdscialis price paypaltadalafil long termcialis 5mg canadatadalafil usescialis without prescription in canadadaily cialiscialis price ukcialis 5mgtadalafil pulmonary hypertensioncialis goldgeneric cialis daily usetadalafil other usesone a day cialis reviewscialis beogradcialis online prescriptiontadalafil citrate dosagetadalafil e20cialis every day pillgeneric cialis no prescriptiongeneric cialis in ukcialis in costa ricacheap 10 mg tadalafil with amextadalafil generic alternativecheap 40 mg tadalafil otccialis price ustadalafil tablets 20mgbuy cialis from canadahow long does cialas 5mg take to worktadalafil half lifecomprar tadalafilcialis 10mg pricecheapest cialis pricestadalafil canadawhere can i buy cialis online without a prescriptioncialis for lowest price in canadaliquid tadalafilhow much is cialiscialis online discounttadalafil ic-351 25 mg mlcialispaypalcialis in costa ricabuy cheap cialis ukwhat dose of cialis should i takebuy tadalafil best pricetadalafil pharmacologycialis online pharmacy canadatadalafil package insertcialis online couponcialis 10mgdaily cialis 5mg pricecheap tadalafil 5 mg with amexcheap 5 mg tadalafilgeneric cialis reviewsgeneric cialis viagrabuy cialis in mexicoorder tadalafil onlinecialis price canadaonline order tadalafilcialis cost comparison walgreens and walmartgeneric cialis 10mgdiscount tadalafilcialis germanycialis in chennaicialis pay with pay palovernight cialisbuy cialis soft tabshow long does it take for cialas to workcialis tadalafil 10mgcialis daily dose costcialas compared to viragacialis 5mg tabletsorder cialis without a prescriptionshoppers drugmart cialis costtadalafil tablets for womengeneric cialis 40 mgtadalafil blogcialis 40mgbuy cialis online usacialis for womengeneric cialis best priceonline cheap tadalafil 20mgcialis canada onlinecialis overnight deliverytadalafil online canadacialis brand onlinecialis 20 mg lillyis generic tadalafil safecheap cialisorder cialis online without prescriptioncialis 40 mg erection after ejaculationorder cialis online with prescriptioncialis genericcheap tadalafil 40 mg with mastercardcialis professional online2.5mg cialistadalafil citrate liquidcialis price australiacialis professionalcialis india pharmacywhere to buy cialis without prescriptiontadalafil synthesiscialis free trialcanada/cialischeap canadian cialiscialis professional tadalafiltadalafil ciplawalmart prescription price for cialiscialis one a daycialis c10cheap cialis 20mgcialis super active reviewsoffshore drugs cheap tadalafilaverage cost cialiscialis100mgcialis 10mg vs 20mgbuy cialis online from canadacialis tabs 20mggeneric cialis online canadatadalafil directionsgeneric cialis from canadacheap cialis 5mggeneric cialis safewho makes cialiserection time shortcialis super active 20mg pricebuy cialis online paypalcialis from turkeycheap sildenfil with 4 free tadalafiltadalafil vs viagracialis dosage sizecialis 2.5mgbuy cialis australiageneric tadalafil 20mggeneric cialis buytadalafil forumcheap 5 mg tadalafil with amextadalafil on nhstadalafil dailytadalafil alternativetadalafil timecialis online without prescriptionbest price on brand cialistadalafil online pharmacycheap 20 mg tadalafil visacheap tadalafil generic mastercardcialis over the counterbest price on cialis for daily useno prescription tadalafilgeneric cialistadalafil effectivenesstadalafil mechanism of actiontadalafil interactionsbuy generic tab tadalafilcialis nyccialis paypalcialis 20mg side effectslow price tadalafilbuy cialis canadastreet price of cialiscan cialis and viagra be taken togethercialis instructionscialis 5mg vs 20mgcheap cialis in australiacialis shelf lifecialis free trial canadadiscount cialis canadacipla tadalafil reviewbuy cialis online in usabuy cialis online without a prescriptiontadalafil for saleonline cialis pay with paypalcialis dosage levels
intense creativity » Study - The Video Players of Social Networks (YouTube, DailyMotion, Veoh, Vimeo, GoogleVideo, Flickr)

Study - The Video Players of Social Networks (YouTube, DailyMotion, Veoh, Vimeo, GoogleVideo, Flickr)

Hi Everyone,

I am doing research on which video player I can easily embed inside of an AS3 application. I had these players in mind: DailyMotion, Vimeo, Veoh, Youtube, GoogleVideo, and the DivShare player as a fallback. Right of the bat, the following players are still in AS2:

  • YouTube
  • DailyMotion
  • DivShare
  • GoogleVideo

While these are in AS3:

  • Vimeo
  • Veoh
  • Flickr


AS2 PLAYERS
The big disadvantage with AS2 players is you cannot interact with them directly from AS3. When AS2 swf files are loaded into a Loader object, they become an AVM1Movie, on which you cannot control much. This is a fundamental problem to start with. However each player had even more reasons to keep my interest away; they are listed below.

YouTube Player
There are tricks out there, using a LocalConnection, that enable you to wrap the YouTube player into another AS2 file, which acts as a bridge to AS3 by opening a LocalConnection between the two; but honestly, this is a wonky workaround. It doesn't work locally in your test environment, you need to run it in the browser, plus there are security sandbox issues since YouTube's crossdomain.xml file will not open the door for you. For me this kills it, YouTube is out.

DailyMotion Player
The DailyMotion player runs great inside of a AS3 project, except for one detail: it will always resize to the full Stage size. I don't know who wrote that code, but it is laughable. You can position the AVM1Movie to take any position you want in your flash movie, however you will not be able to control it's size (unless someone can tell me how?). This is not acceptable in the context where I want to show a videos on a GoogleMap, hence DailyMotion is dropped.

DivShare Player
The DivShare player uses the same logic as the DailyMotion player, it will resize to full stage size on it's own. This is a no go. DivShare player is dropped.

GoogleVideo Player
I haven't fully tested the GoogleVideo player since there is no easy functionality on GoogleVideo to embed it's player even in HTML. GoogleVideo seems to be more geared towards searching, and if I can't embed the player easily, I cannot do it inside of an AS3 application. So GoogleVideo was dropped alse.

AS3 PLAYERS

Veoh Player
The Veoh player will not run properly inside of an AS3 application. On the output window you see: TypeError: Error #1009: Cannot access a property or method of a null object reference.
at WebPlayer()
. I decompiled their player using the nice SoThink SWF Decompiler, and saw that in the constructor of the Veoh player they do the following:

Actionscript:
  1. public function WebPlayer()
  2.         {
  3.             initLogger();
  4.             Log.s("[info] AoWPlayer instantiated! PRODUCTION=", WebPlayerConstants.IS_PRODUCTION);
  5.             _f = WebPlayerFacade.getInstance(WebPlayerFacade.CORE_NAME);
  6.             stage.scaleMode = StageScaleMode.NO_SCALE;
  7.             stage.align = StageAlign.TOP_LEFT;
  8.             stage.addEventListener(Event.ENTER_FRAME, handle_enterframe);
  9.             createCustomMenu();
  10.             return;
  11.         }// end function

Basically they are trying to access the stage right away, which will be null until I add this class to the DisplayList, hence, it is a no go. Veoh had to be dropped also. Too bad they call "createCustomMenu" after their manipulation of the stage.

Vimeo Player
This one is my favorite. Although after decompilation I noticed it isn't exactly well engineered, it works great, is simple, and you can play with it with a few api functions that are not documented. For a list of those functions refer to this post. I wanted to hide a few features, well, most of the features on the right hand side, plus get rid of the fullscreen button, and I was successfull. Here is a sample code of how I do it:

Actionscript:
  1. package tests
  2. {
  3.     import flash.display.DisplayObject;
  4.     import flash.display.DisplayObjectContainer;
  5.     import flash.display.Graphics;
  6.     import flash.display.Sprite;
  7.     import flash.events.TimerEvent;
  8.     import flash.net.URLRequest;
  9.     import flash.display.Loader;
  10.     import flash.events.Event;
  11.     import flash.events.ProgressEvent;
  12.     import flash.system.ApplicationDomain;
  13.     import flash.system.LoaderContext;
  14.     import flash.system.Security;
  15.     import flash.utils.describeType;
  16.     import flash.utils.getDefinitionByName;
  17.     import flash.utils.Timer;
  18.  
  19.     /**
  20.      * ...
  21.      * @author Martin Legris
  22.      */
  23.     public class VimeoTest extends Sprite
  24.     {
  25.         protected var moogaloop:Sprite;
  26.         protected var player_width:int = 400;
  27.         protected var player_height:int = 300;
  28.         protected var clip_id:int = 198785;
  29.         protected var _timer:Timer;
  30.        
  31.         public function VimeoTest()
  32.         {
  33.             startLoad();
  34.         }
  35.  
  36.         protected function startLoad():void
  37.         {
  38.             Security.allowDomain("http://bitcast.vimeo.com");
  39.    
  40.             moogaloop = new Sprite();
  41.             var v_loader:Loader = new Loader();
  42.             var v_request:URLRequest = new URLRequest("http://bitcast.vimeo.com/vimeo/swf/moogaloop.swf?server=vimeo.com&force_embed=0&clip_id=" + clip_id + "&width=" + player_width + "&height=" + player_height);
  43.             v_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
  44.             v_loader.contentLoaderInfo.addEventListener(Event.INIT, onInitHandler);
  45.             v_loader.load(v_request, new LoaderContext(true, ApplicationDomain.currentDomain));
  46.             //addChild(v_loader);
  47.         }
  48.        
  49.         protected function onInitHandler(evt:Event):void
  50.         {
  51.             trace("onInitHandler");
  52.             var vimeo:DisplayObjectContainer = evt.currentTarget.content;
  53.            
  54.             var child:DisplayObject;
  55.             for (var i:Number = 0; i <vimeo.numChildren; i++)
  56.             {
  57.                 child = vimeo.getChildAt(i);
  58.                 trace("child[" + child.name + "] = " + child);
  59.             }
  60.         }
  61.  
  62.         protected function onCompleteHandler(e:Event):void
  63.         {
  64.             // Position the player where you want it
  65.             var vimeo:DisplayObjectContainer = e.currentTarget.content;
  66.             moogaloop.addChild(e.currentTarget.content);
  67.             trace("vimeo.name:" + vimeo.name);
  68.             //vimeo.name = "vimeo";
  69.            
  70.             trace("vimeo:" + vimeo);
  71.             //trace(describeType(vimeo));
  72.             //trace(describeType((vimeo as Object).sidedock));     
  73.            
  74.                
  75.             // Create the mask for moogaloop
  76.             var v_mask:Sprite = new Sprite();
  77.             with( v_mask.graphics ) {
  78.                 beginFill(0x000000, 1);
  79.                 drawRect(moogaloop.x, moogaloop.y, player_width, player_height);
  80.                 endFill();
  81.             }
  82.  
  83.             addChild(v_mask);
  84.             moogaloop.mask = v_mask;
  85.  
  86.             addChild(moogaloop);
  87.            
  88.             _timer = new Timer(33, 0);
  89.             _timer.addEventListener(TimerEvent.TIMER, doTimer);
  90.             _timer.start();
  91.         }
  92.        
  93.         protected function doTimer(evt:TimerEvent):void
  94.         {
  95.             var vimeo:Sprite = moogaloop.getChildAt(0) as Sprite;
  96.             var sidedock:Sprite = (vimeo as Object).sidedock as Sprite;
  97.            
  98.             trace(sidedock);
  99.             if (sidedock != null)
  100.             {
  101.                 _timer.stop();
  102.                
  103.                 (sidedock as Object).forceHide();
  104.                
  105.                 var toToggle:Array = ["like_button", "share_button", "embed_button", "hd_button", "scaling_button", "clipinfo_title", "clipinfo_byline", "clipinfo_portrait", "vimeo_logo", "fullscreen_button"];
  106.                 var element:String;
  107.                 for each(element in toToggle)
  108.                 {
  109.                     trace("removing :" + element);
  110.                     try{
  111.                     (vimeo as Object).api_toggleElement(element, false);
  112.                     } catch (e:Error) { };
  113.                 }
  114.             }
  115.         }
  116.     }
  117. }

Basically, once the player is loaded, I run a timer that waits until the sidedock object is created, and at this point I call api_toggleElement to remove the elements I do not want. I got the string constants by decompiling the player, so those constants that you see there are basically all that is available from my research; all the elements you can toggle. Now all you need is to extract the clip ID from the video page's permalink, which is done this way:

Actionscript:
  1. var extractor:RegExp = /\/([0-9]*)$/g;
  2. var playerUri:String = "http://vimeo.com/moogaloop.swf?clip_id={id}&width=400&height=300";
  3. var result:Object = extractor.exec(url);
  4. var id:String = result[1];
  5.            
  6. trace("vimeo id:" + id);
  7.  
  8. playerUri = playerUri.replace("{id}", id);

The Vimeo Player is therefore usable and fun to play with :)). Plus it is pretty.

Flickr Player
The Flickr Player is a good one too. You need to know the photo_id and photo_secret to use in this url:
http://www.flickr.com/apps/video/stewart.swf?v=49235&photo_id=2345938910&photo_secret=846d9c1be9
However that is easy to do with the Flickr API. The Flickr API clearly states that it is meant for non-commercial use.. so. well.. that limits the playground. This player also has the bad habit of resizing to the stage dimensions, but after decompiling I noticed that I can call the function setSize on it, which will make it behave. From my observation of the code behind this player, it is over-engineered. This is an opinion... but I basically would need documentation to understand it, and to me that is not a sign of clean, good code.

Here is the code:

Actionscript:
  1. protected function embedFlickr():void
  2. {
  3.     Security.allowDomain("http://www.flickr.com");
  4.     var loader:Loader = new Loader();
  5.     loader.load(new URLRequest("http://www.flickr.com/apps/video/stewart.swf?v=49235&photo_id=2345938910&photo_secret=846d9c1be9"));
  6.     addChild(loader);
  7.     loader.contentLoaderInfo.addEventListener(Event.INIT, doFlickrInit);
  8. }
  9.        
  10. protected function doFlickrInit(evt:Event):void
  11. {
  12.     var flickr:DisplayObject = evt.currentTarget.content;
  13.     trace("flickr:" + flickr);
  14.            
  15.     trace(describeType(flickr));
  16.            
  17.     var flick:Object = flickr;
  18.     flick.setSize(320, 200);
  19.            
  20.     trace(describeType(flick.playbackManager));
  21. }

CONCLUSION
If you want to use one of the social networks as an engine to store videos in an application that is written in flash for the front-end, your options are not easy. YouTube has the best API in the business, however using their player is a f*cking pain. Vimeo has the best player, but their API is limited. You can cheat YouTube with the little KeepVid client I wrote, but how long will KeepVid.com be alive for?

I opted to use DivShare, found a way around their player. DivShare will resize all the videos to 560x420 however, no matter what the proportions are on your original video. It will convert AVI & MPG to FLV for you on the fly, it has a nice .NET client and PHP client for the back-end. So the integration can be seamless with your system IF you are ok with them resizing the videos to 560x420.

I will blog about the details of that later.

Cheers!

Martin

3 Responses to “Study - The Video Players of Social Networks (YouTube, DailyMotion, Veoh, Vimeo, GoogleVideo, Flickr)”

  1. XkiD | 07.03Study - The Video Players of Social Networks (YouTube, DailyMotion, Veoh, Vimeo, GoogleVideo, Flickr) | blog.xkid.ro says:

    [...] rest is here:  07.03Study - The Video Players of Social Networks (YouTube, DailyMotion, Veoh, Vimeo, GoogleVideo, F… Posted in PHP | Tags: and-the, are-loaded, daily, doing-research, everyone, had-these, [...]

  2. intense creativity » Study – The Video Players of Social Networks … - Cheat Codes says:

    [...] tripwiremag wrote an interesting post today onHere’s a quick excerptI don’t know who wrote that code, but it is laughable. You can position the AVM1Movie to take any position you want in your flash movie, however you will not be able to control it’s size (unless someone can tell me how?). … I haven’t fully tested the GoogleVideo player since there is no easy functionality on GoogleVideo to embed it’s player even in HTML. GoogleVideo seems to be more geared towards searching, and if I can’t embed the player easily, I cannot do it inside … [...]

  3. flv player says:

    Thanks for given this useful post…

Leave a Reply