ඇඩ් එක - තමන්ගේ වෙබ් අඩවියට සිංදු කලෙක්ශන් එකක් එක්කිරිම .

7
  • Jul 13, 2010
  • C0de BlUe
  • Labels: ,

  • Share/Bookmark හරි වැඩිදෙනාගේ ඉල්ලිම පරිදි .. අද මම කියලා දෙන්නම් කොහොමද JW player එක උපයෝගී කරගෙන තමන්ගේම විඩියෝ / ඕඩියෝ කොලෙක්ශන් එකක් හදාගෙන , තමන්ගේ වෙබ් අඩවියකට දාගෙන කික් එකක් ලබදෙන්නේ කියලා ...... menari



    හරි වැඩි කතා නැතුව වැඩේට බහිමුකෝ ......

    * මුලින්ම ඔයාලට කරන්න තියන්නේ JW Player Free version  එක http://www.longtailvideo.com/players/jw-flv-player/ අඩවියෙන් භාගත කරගන්න . ඊලගට එහි ඇති සියලුම ගොනු ටික (මෙහි ඇති video.flv එක අවශය නැත . නමුත් palyer.swf එක සහ yt.swf (මෙය youtube videos බැලිමට භාවිතා කරයි) , swfobject.js upload කිරිම අවශය වේ .) free web hosting serviceඑකකට upload කරගන්න ......

     * ඊළඟට අපිට තියන්නේ අපිට අවශය විඩියෝ /ඕඩියෝ එකක් හෝ වැඩි ප්‍රමාණයක් player එකට දමාගැනිමයි . මේ වැඩේ හරිම ලෙහෙසි , මම එක එක උදාහරන මඟින් එක එක පැහැදිලි කරන්නම් garupale. මුලින්ම කියන්න ඕනේ මේ අපි කරන්න යන උදාහරන අපිට online අත්හදා බලන්න , අපිට JW player වෙබ් අඩවිය මඟින්ම පහසුකම් ලබාදි තිබෙනවා . මෙය" http://www.longtailvideo.com/support/jw-player-setup-wizard " වෙබ් ලිපිනය හරහා අත්හදා බැලිය හැක .


     * පලමුව එක විඩියෝ සහ ඕඩියෝ වක් ...

    Demo :





    කේතය :

    විඩියෝ ....
    <embed allowfullscreen="true" allowscriptaccess="always" bgcolor="undefined" flashvars="file=http://content.longtailvideo.com/videos/flvplayer.flv" height="320" id="single2" name="single2" src="http://ashan.host56.com/blogger_video/jw/player.swf" type="application/x-shockwave-flash" width="470" wmode="transparent"></embed>
    

    ඕඩියෝ .....

    <embed allowfullscreen="true" allowscriptaccess="always" bgcolor="#000000" flashvars="file=http://www.longtailvideo.com/jw/upload/bunny.mp3&amp;duration=33" height="24" id="single2" name="single2" src="http://ashan.host56.com/blogger_video/jw/player.swf" width="470"></embed>
    

     මුලින්ම කියන්න ඕනේ ඔයාලට  http://www.longtailvideo.com/support/jw-player-setup-wizard වෙබ් ලිපිනිය මඟින් තමන්ට , තමන්ට අවශය විඩියෝ / ඕඩියෝ URL දීලා තමන්ට අවශය ලෙස player එක සකස් කරගෙන අවශය කේතය ගන්න පුලුවන් කියලා . ඉතින් මම කියන්නේ ඔය අලුත්ම අයට , ඒකට ගිහිල්ලා පොඩ්ඩක් අතපත ගාලා ඉගෙනගන්න කියලා . අනික තමා ඕක ගියහම අපිට අවශය වෙනස් කිරිම් කරලා , "Update Preview & Code" බොත්තම ඔබලා , කරපු වෙනස්කම් ටික බලාගන්න පුලුවන් .මුලිකමව මේ online application එක අපේ වෙබ් අඩවි වල දමා ගැනිමට ක්‍රම 2 කට සලසා දෙනවා . ඒවා තමා javascript හරහා වෙබ් අඩවියට දමාගැනිම සහ "embed" විධානය මඟින් එය වෙබ් අඩවියකට දමාගැනිමයි . අපිට මෙය මඟින් කේතය ලබාදිමේදි javascript වලින්ලබාදෙන අතර , අපිට අවශය නම් එය embed වලින් ලබාගැනිමට , කේතය දී ඇති ස්ථානයේ ඉහළින් ඇති "the embed code." යන්න කිලික් කරන්න . මම නම් කියන්නේ ඔය සාමානය වෙබ් අඩවියක නම් emebed එක පාවිච්චි කරන එක හොඳයි , මොකද ඔය internet explorer 6 වගේ javascript වලට සප් එක දෙන්නේ නෑ නොවැ . javascript භාවිතය යෝගය වන්නේ , ඔය palyer එකේ එක එක අංග කිලික් කරහම ඇඩ් එහෙම ලෝඩ් කරගන්න ඕනේ නම් තමයි , මොකද ඔක්කොම javascript වලින් දුවන් නිසා player එකට අදාල කේතය ඇතුලත ඇඩි සොලුශන් එකත් ලෙහෙසියෙන්ම ගොඩනගන්න පුලුවන් . garupale

    හරි දැන් බලමුකෝ අපි කොහොමද අපේ විඩියෝව/ ඕඩියෝව ඉහත කේත මඟින් දාගන්නේ කියලා . මම කේතය ගැන කියුවොත් එහෙම මම මෙතැන පාවිච්චි කරලා තියන්නේ embed එක .කේතය විස්තර කරනවා නම් ........nerd

    • allowscriptaccess="xxxx"  //* මෙමඟින් අපිට palyer එකේ තිබෙන යම් යම් ගුණාංග වැඩකරන්න දෙනවද , නැද්ද කියලා දිම *//
    •  bgcolor="xxxx"               //* player එකෙහි අවට වර්ණය කුමක්ද යන්න ලබාදිම *//
    • flashvars="file=[ ඕඩියෝ /විඩියෝ ගොනුවේ URL එක]"      //* ඕඩියෝ /විඩියෝ ගොනුවේ  URL එක ලබාදිම .. *//
    • height="xxx        //* player උස //*
    • width="xxx"         //* player පලළ //*
    • src="[ඔයාගේ palyer.swf එකෙහි URL එක ]"  //* ඔයාගේ palyer.swf එකෙහි URL එක //*

    ඔච්චර තමා කියන්න තියන්නේ .......

    හරි අපි ඊලඟට බලමුකෝ , කොහොමද video playlist එකක් XML වලින් හදාගෙන , ඒකෙන් playlist එකක් හදාගන්නේ කියලා .

    Demo :



    කේතය :

    Player කේතය ...

    <embed allowfullscreen="true" allowscriptaccess="always" bgcolor="undefined" flashvars="playlistfile=http://www.longtailvideo.com/jw/upload/mrss.xml&amp;playlist=bottom" height="470" id="single2" name="single2" src="http://ashan.host56.com/blogger_video/jw/player.swf" type="application/x-shockwave-flash" width="470" wmode="transparent"></embed>
    

    XML හි කේතය :

    <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
     <channel>
      <title>Example media RSS playlist for the JW Player</title>
      <link>http://www.longtailvideo.com</link>
    
      <item>
       <title>Big Buck Bunny - FLV Video</title>
       <link>http://www.bigbuckbunny.org/</link>
    
       <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</description>
       <media:credit role="author">the Peach Open Movie Project</media:credit>
       <media:content url="http://www.longtailvideo.com/jw/upload/bunny.flv" type="video/x-flv" duration="33" />
      </item>
    
      <item>
       <title>Big Buck Bunny - MP3 Audio with thumb</title>
       <link>http://www.bigbuckbunny.org/</link>
    
       <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</description>
       <media:credit role="author">the Peach Open Movie Project</media:credit>
       <media:content url="http://www.longtailvideo.com/jw/upload/bunny.mp3" type="audio/mpeg" duration="33" />
       <media:thumbnail url="http://www.longtailvideo.com/jw/upload/bunny.jpg" />
      </item>
    
      <item>
       <title>Big Buck Bunny - PNG Image with start</title>
    
       <link>http://www.bigbuckbunny.org/</link>
       <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</description>
       <media:group>
        <media:credit role="author">the Peach Open Movie Project</media:credit>
        <media:content url="http://www.longtailvideo.com/jw/upload/bunny.png" type="image/png" duration="20" start="10" />
       </media:group>
      </item>
    
     </channel>
    </rss>
    

    ඉහත පළමු උදාහරණයේ කේතය හා සැසඳු කල මෙහි player කේතයෙහි වැඩි වි ඇත්තේ  , flashvars=file වෙනුවට playlistfile ඇවිත් තිබිමත් ,  එහි playlistfile එකට ඔයාගේ playlist එක හදලා තියන XML ගොනුවේ URL එකදිද තිබේ . තවද අදාල playlist එක player එකේ පෙන්විමට අවශය ස්ථානය සඳහන් කිරිමට " playlist= [playlist එක player එකේ පෙන්විමට අවශය ස්ථානය]" මඟින්ද දී තිබේ . kenyit

    flashvars="playlistfile=http://www.longtailvideo.com/jw/upload/mrss.xml&playlist=bottom"

    XML  එක ගැන කථා කරනවා නම් , අප බ්ලොග් වල , ඔය RSS feed එක කියලා කියන්නෙත් ඔය XML වලින් ලියලා තියන එක්තරා ගොනුවකට තමා . ඉතින් JW player එකට XML අඳුනගත හැකි ලෙස ලියන ක්‍රමයක් තියනවා , ඕනැම XML ගොනුවක් ලියන්නේද මේ ක්‍රමයට අනුවයි . මම ඔයාලට පහත XML ලියන සැකිල්ල (Structure) එක දෙන්නම් , ඔයාලත් ඔයාගේ playlist එකක් භාවිතා කරනවා නම් , ඒක පහත සැකිල්ලට අනුව ලියලා , .xml ගොනුවක් ලෙස save කරගෙන , එය අදාල වෙබ් අඩවියට upload කර , player එකේ playlsit ගොනුව ලෙස් එහි path එක දීලා player එක ධාවනය කරගන්න . ඔයාලට මේ පිළිබඳව වැඩි විස්තර http://www.longtailvideo.com/support/jw-player/24/create-a-playlist-with-the-jw-player මඟින් ලබාගන්න පුලුවන් . garupale

     <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
     <channel>
      <title>Example media RSS playlist for the JW Player</title>
      <link>[ඔයාගේ වෙබ් අඩවියේ හෝ palylist එකට අදාල වන වෙබ් අඩවියේ URL එක]</link>

      <item>
       <title>[ විඩියෝවේ නම ] </title>
       <link>http://www.bigbuckbunny.org/</link>

       <description> [ විඩියෝවේ පිළිබඳ විස්තරය ....  ] </description>
       <media:credit role="author">[ විඩියෝව අයිතිකාරයා පිළිනඳව විස්තර , මෙතැන ඔයාලගේ විස්තර දාගන්න :P ]</media:credit>
       <media:content url="[ විඩියෝවේ තියන ස්ථානයේ URL එක ]" type="video/x-flv" duration="[ විඩියෝව ධාවනය වන කාලය තත්පර වලින් (මෙය අතවශයම නැත) ]" />
      </item>

     <item>
       <title>[ විඩියෝවේ නම ] </title>
       <link>http://www.bigbuckbunny.org/</link>

       <description> [ විඩියෝවේ පිළිබඳ විස්තරය ....  ] </description>
       <media:credit role="author">[ විඩියෝව අයිතිකාරයා පිළිනඳව විස්තර , මෙතැන ඔයාලගේ විස්තර දාගන්න :P ]</media:credit>
       <media:content url="[ විඩියෝවේ තියන ස්ථානයේ URL එක ]" type="video/x-flv" duration="[ විඩියෝව ධාවනය වන කාලය තත්පර වලින් (මෙය අතවශයම නැත) ]" />
      </item>

     

     </channel>
    </rss>

    * ඉහත කේතයේ item මඟින් අපට අවශය තරම් විඩියෝ /ඕඩියෝ ලබාදිය හැක .

    හරි අපි ඊළගට බලමු කොහොමද youtube feed එකක් , ඒ කියන්නේ youtube විඩියෝ ගොඩක් playlist එකක් ලෙස ply කරන්න player එක හදගන්නේ කියලා. ඉහත මම කියුවානේ RSS feed වලටත් ඔය XML එකම තමා පාවිච්චි කරන්නේ කියලා . ඉතින් අපිට පුලුවන් නම් youtube එකේ තියන මේ rss feed එක ගන්න , අපිට පුලුවන් , අර අපි XML ගොනුවේ URL එක දුන්න තැනට youtube එකේ තියන මේ rss feed එක දුන්නානම් හරිනේ .. ඉතින් ඔයාලට youtube එකේ rss feeds හැසිරෙන්නේ කෙලෙසද කියලා, http://www.youtube.com/rssls මඟින් දැනගන්න පුලුවන් . hah

    RSS Feeds for Tags and Users

    To create an RSS feed for your favorite tags or users, simply enter the tag or username as specified in the below URLs. You can then add this URL to your newsreader. Please note, you will need to create a feed for each individual tag or user you wish to subscribe to.
    Tags:
    http://gdata.youtube.com/feeds/base/videos/-/[insert tagname here]?client=ytapi-youtube-browse&v=2
    For example, if you wanted to create an RSS feed for the tag "monkey", you would enter:
    http://gdata.youtube.com/feeds/base/videos/-/monkey?client=ytapi-youtube-browse&v=2
    Full-text searches:
    http://gdata.youtube.com/feeds/base/videos?q=[insert url-encoded search term here]&client=ytapi-youtube-search&v=2
    For example, if you wanted to create an RSS feed for the search term "monkey", you would enter:
    http://gdata.youtube.com/feeds/base/videos?q=monkey&client=ytapi-youtube-search&v=2
    Users:
    http://gdata.youtube.com/feeds/base/users/[insert username here]/uploads
    For example, if you wanted to create an RSS feed for the user "YouTube," you would enter:
    http://gdata.youtube.com/feeds/base/users/youtube/uploads

    හරි අපිට ඉහත සඳහන් පරිදි youtube RSS feed එක යොදාගන්න පුලුවන් , නමුත් youtube RSS feed එක JW player එක සමඟ වැඩකිරිමට මෙහි RSS feed URL එකේ "base" වෙනුවට එය "api" ලෙස වෙනස් විය යුතුයි .
    උදාහරන :  http://gdata.youtube.com/feeds/[මෙහි base වෙනුවට api කියලා වෙනස් කරන්න ]/users/youtube/uploads

    මම දැන් Demo එකක් විදිහට youtube එකෙන් Elakiri.com user යටතේ තියන feed එක අරගෙන , ඒක player එකේ දාලා පෙන්වන්නම්කෝ . මම මෙතැන පාවිචිචි කරලා තියන්නේ youtube user කෙනෙක් upload කරපු videos වලට ලැබෙන feed එක උපයෝගි කරගෙනයි. එතකොට මෙතැන feed එක වෙන්නේ
    http://gdata.youtube.com/feeds/api/users/ElaKiri/uploads . ආ අනික තමා ඔයාලට youtube playlist එකක feed එක ගන්න ඕනේ නම් , http://gdata.youtube.com/feeds/api/playlists/[playlist එකේ නම්බර් එක, උදා :1C7B8C997AC1112C]  ලබාගත හැක . peace

    Demo :



    කේතය :
    <embed allowfullscreen="true" allowscriptaccess="always" bgcolor="undefined" flashvars="playlistfile=http://gdata.youtube.com/feeds/api/users/ElaKiri/uploads&amp;playlist=bottom" height="470" id="single2" name="single2" src="http://ashan.host56.com/blogger_video/jw/player.swf" type="application/x-shockwave-flash" width="470" wmode="transparent"></embed>
    

    මෙතැන ඉතින් මම අමුතුවෙන් කියලා දෙන්න ඕනේ නෑනේ . ඉහත XML එකේ වගේ , XML එක වෙනුවට youtube එකෙන් feed එක අරගෙන , එම feed URL එක playlistfile එකේ URL එක විදිහට දීලා තියනවා .

     හරි අපි දැන් දන්නවානේ කොහොමද youtube එකෙන් feed එකක් අරගෙන playlist එක හදලා ඒක අපේ player එක දාගන්නේ කියලා , අන්තිමට මම කියන්නම් කොහොමද අපේ player එකට කික් එකක් එන විදිහට , JW player වෙබ් අඩවිය මඟින් ලබාදි තිබෙන skin අපේ player එකට දාගන්නේ කියලා .fikir

    Demo :



    කේතය :

    <embed allowfullscreen="true" allowscriptaccess="always" bgcolor="undefined" flashvars="playlistfile=http://gdata.youtube.com/feeds/api/playlists/5637DAA24A431159&amp;playlist=bottom&amp;skin=http://ashan.host56.com/blogger_video/jw/skins/grungetape.zip" height="600" id="single2" name="single2" src="http://ashan.host56.com/blogger_video/jw/player.swf" type="application/x-shockwave-flash" width="500" wmode="transparent"></embed>
    

    හරි අපි කේතය දිහා බැලුවවොත් පෙනෙනවා , අපි youtube feed එක ඇදලා ගන්න එකේ කේතයට , අමතරව යමක් එකතු වෙලා තියනවා , එය තමා " skin=http://ashan.host56.com/blogger_video/jw/skins/grungetape.zip" යන්නයි . මෙහිදි අපි JW player වෙබ් අඩවිය මඟින් ලබාදි තිබෙන skin package එකක් .zip ගොනුව , upload කර එහි URL එක ලබාදි තිඅබෙනවා . ඔයාලට මෙම skins ,  http://www.longtailvideo.com/addons/skins මඟින් ලබාගන්න පුලුවන් . sengihnampakgigi

    මොකද හිතන්නේ මේ ගැන , ඔය පහළින් කොමෙන්ට් එකක් දාලම යන්නකෝ !!!garupale

    7 comments:

    1. හෙළයා said...
    2. හෙමීට කියවලා බලන්න ඕනෙ. ස්තූතියි මචං

    3. C0de BlUe said...
    4. @ හෙළයා : හිමිට කියවලා බලන්නකෝ , ස්තුතියි මචන් ප්‍රතිචාරයට !!

    5. Anonymous said...
    6. මැක්සා.....පට්ට කියන්නෙ පට්ටම තමා

    7. ♠GaŋGster♠™ said...
    8. හොද පෝස්ට් එකක් මචන්...හොඳට පහැදිලි කරලා තියෙනවා... :)..තැන්කූ කිව්වා... :)

    9. Jay said...
    10. එළ...
      :)
      ට්‍රයියක් දෙන්න හිතෙනවා..

    11. C0de BlUe said...
    12. @ Hasitha ජයසූරිය : එල එල මලයෝ , ස්තුතියි ප්‍රතිචාරයට !!

    13. C0de BlUe said...
    14. @♠GaŋGster♠™ : අඩේ හොඳට පැහැදිලි කරලා තියනවද බන් ,මම හිතුවේ අච්චාරු වගේ ඇති කියලා , එල එල මචෝ !!!

      @ Ansh Lucky Sri Jay :ට්‍රයි එකක් දිලා , බලලම කියන්නකෝ අක්කේ , ස්තුතියි ප්‍රතිචාරයට !!!

    Post a Comment

    write your comments here!

    Related Posts with Thumbnails