Live Stream Embedding Question

9 replies
Hey guys, I'm trying to get something to work on my website and need a little help. I'm trying to put an image on my page next to a gamers name. If that gamer is not live streaming, it shows one image, and when he is live streaming, it changes images. (So people know he's currently online)

I found a site doing it already and I can't quite figure out how to make the image automatically change when they go online to stream.

Here is an image of the site doing it. When the gamer is offline, they have the red dot and it will automatically switch to the green dot when they come online. (Example, Guardsman Bob is currently online streaming)



I looked at the coding and found this: (Only showing 2 of the links to avoid spamming with code)

<div id="video_container">
<div class="container_12"><p>

<div class="grid_14 picks">
<ul><img alt="League of Legends" src="http://www.warriorforum.com/assets/img/icon_lol.png"><br><br>
<img alt="offline" src="http://www.warriorforum.com/assets/img/offline.png"><a href="http://www.athenelive.com/o/?s=13576"> bigfatlp</a><br>
<img alt="online" src="http://www.warriorforum.com/assets/img/online.png"><a href="http://www.athenelive.com/o/?s=34046"> Guardsman Bob</a><br>
</ul>

So all i see is the img link (to either offline or online) and the ahref tag to the stream.

Any ideas how to automatically switch out the image for offline/online?

Thanks guys.
</div>
#embedding #live #question #stream
  • Profile picture of the author Lovelogic
    Do you have your own group of streaming gamers or
    just want to grab the information from 'Athenelive' ?
    {{ DiscussionBoard.errors[5635811].message }}
  • Profile picture of the author Nochek
    If you want this done in real-time, then jQuery would be what you want to use. Otherwise, a simple PHP call to determine if someone is streaming or not and setting their status to online/offline would be all you need, but that would only update the pictures when people refresh the page.

    I don't know what your websites backend looks like, so I can't tell you the best way to go about it, but if you are already loading jQuery on the page, it would be best to just use that and call the function when someone starts streaming. How do you know when someone is streaming? Do they connect to your network, or is there a third party application/API you connect to, or something that sends out calls to your site?

    Short answer, jQuery or PHP
    Signature
    Nochek Solutions Presents:
    The Hydrurga WSO - Rank Your Site #1 And Score Over The Penguin Updates!
    {{ DiscussionBoard.errors[5635875].message }}
  • Profile picture of the author oldwarrioruser1
    I do not have my own set of gamers, I'm actually embedding streams from own3d.tv (#1 site for gamer streams) Which is the same thing AtheneLive is doing.

    Nochek, I'm using Pligg software to run my website. I'm not knowledgeable in coding, would you be willing to work for me and set up this coding?

    Thanks.
    {{ DiscussionBoard.errors[5636027].message }}
  • Profile picture of the author Lovelogic
    Lifting the content out of the the 3D.tv site can be done fairly easily with a PHP script running on your web server. Of course it would be useful to know who they are and if they actually support PHP first.. If it does not then you will need to sign up for a Google App engine account (there's a free version) and use that to scrape the content then pass it to your website via an ajax call.



    Did think about a tapping in with a Yahoo Pipe sadly the search results page is to large for it to process in one pass and the workarounds are ugly to say yhe least.


    Useful Notes:

    If you want to add Javascript code in Pligg pages, then you will need to place the codes in between {literal} …… {/literal} tags. These are custom tags for Pligg that lets the Pligg CMS know that there is a Javascript to be processed.


    Insert PHP code in a similar fashion as that of adding Javascript. Simply place your PHP code inside {php} …… {/php} tags and your PHP code will be processed on the live website. NB!! check webhost supports PHP first



    But the important thing to note here is that if your PHP code contains <?php …… ?> delimiter, then you need to remove that. {php} ….. {/php} tags works as an replacement for the default PHP delimiter and if you use both, it will not work.
    {{ DiscussionBoard.errors[5636448].message }}
  • Profile picture of the author oldwarrioruser1
    Yeah if someone can do this code for me, happy to pay.

    skype: legitsells
    {{ DiscussionBoard.errors[5636567].message }}
  • Profile picture of the author Lovelogic
    UPDATE:
    whilst the entire list of 'League of Legends' players currently streaming is to large to process using a Yahoo Pipe + ajax however the basic who's streaming live page: own3d.tv/live has a much shorter scrollable list that can be harvested via Yahoo pipes and filtered for specific items.

    I'll bash a javascript based demo together for you and I dare say others may find it useful for other sites as well.
    {{ DiscussionBoard.errors[5636588].message }}
    • Profile picture of the author oldwarrioruser1
      Originally Posted by Lovelogic View Post

      UPDATE:
      whilst the entire list of 'League of Legends' players currently streaming is to large to process using a Yahoo Pipe + ajax however the basic who's streaming live page: own3d.tv/live has a much shorter scrollable list that can be harvested via Yahoo pipes and filtered for specific items.

      I'll bash a javascript based demo together for you and I dare say others may find it useful for other sites as well.
      That'd be awesome!
      {{ DiscussionBoard.errors[5641920].message }}
  • Profile picture of the author oldwarrioruser1
    That'd be great Lovelogic
    {{ DiscussionBoard.errors[5642035].message }}
  • Profile picture of the author Lovelogic
    Little short on my quota to add links, but here's a quick PHP demo
    complete with code

    lovelogic.net/z_tuts/war_room_demo2.php

    war_room_demo1.php is a bare bones demo that grabs the lot but takes ages
    {{ DiscussionBoard.errors[5644442].message }}

Trending Topics