Knowledge Base/Getting Started/Integrate with iMediaShare

Integrating "Watch on TV" Button with a Web Site

Stefan Lilov
posted this on May 10, 2012 06:21 pm

Overview

Adding "Watch on TV" button to your site is easy. Just remember to follow these tthree simple rules:

  • Get Button - Choose a button from our Get "Watch on TV" Button Page to generate your code.
  • Add Your Code - Paste your generated code from the Get "Watch on TV" Button Page to your video webpage. 
  • Test Your Code - Point your video page with Android browser to your video webpage and tap "Watch on TV" button to start video playback. 

Done!

Getting The Code

Navigate to the Get "Watch on TV" Button Page.

 iMediaShare-Watch_on_TV-Button.png

Step 1: Enter Video URL

Once your arrived to the Get Button Page, enter the URL to the actual video file. The video file shall be encoded in MP4 format. You can also provide a valid YouTube video link.

Step 2: Choose a Button Style

Select from any of our available button styles.

Step 3: Enable Google Analytics Tracking

If you want to track "Watch on TV" generated events directly from your Google Analytics account toggle on the checkbox and provide your Google Analytics tracking ID. For tracking usage follow the instructions from Track "Watch on TV" Usage with Google Analytics.

Step 4: Generate the Code

Once you're satisfied with your customized button, click Get Button Code to generate your button code.

Your generated code should now be displayed. Read on to see how this code is added to a website

Adding The Code

Your generated button code comes as HTML iFrame.

The code can be placed anywhere between the <body> tags on your page. This code tells iMediaShare what type of "Watch on TV" button to build and the action to trigger when tapped.

Example

<iframe src="http://www.imediashare.tv/w/watch.php?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9xHWiaHsVPI&bg_style=light&show_text=yes" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:122px; height:30px;" allowTransparency="true"></iframe>

Note: Your HTML may look different depending on what button styles you choose.

Testing The Code

Point your Android mobile web browser to the video webpage and your "Watch on TV" button shall appear. Tap on it and iMediaShare will start with the video preloaded, ready for playback on your TV.