Chromecast Custom Receiver with YouTube Iframe API showing banner ads that can't be closed - chromecast

So we are working on developing a ChromeCast custom receiver app and we are using the YouTube iFrame API for loading YT videos. The issue is that we are seeing the banner ads across the bottom while they are playing on the ChromeCast. Obviously, there is no way for the user to interact with or close this ad while the video is being cast to the ChromeCast. Does anyone know if there is a way to disable these ads types when the video is being cast? I understand that the ads are controlled by the content owner, but it seems there would be a more effective ad then one that a user can't even click through to on the ChromeCast.

Related

Facebook messenger bot showing card images on web but not on mobile

I'm developing facebook bot using Microsoft bot framework & have a strange issue: I return card carousel with thumbnail images. When talking from the web, I get all images, when from android, I get only 1 or 2 images. Dimensions are same, images are returned by my own services, all are png.
Any ideas where to look for problems?
Update - Issue Fixed
So turns out, I messed up with Content-Length header in my image handler service and was sending incorrect length with images. After fixing it, everything works as expected. Still, it's interesting, why some images were showing up even with incorrect length header and some not.
Please, ensure the images you sent are httpS instead of http. This is a like a assumption in the documentation.
If you use http, its shown in the emulator but not in other secure channels like Skype and Facebook.

YouTube live on googlecast custom receiver

Is there any solution to play YouTube live video on my Chromecast custom receiver app?
The YouTube iFrame player API can play a regular YouTube video but it does not play Live videos.
Cast SDK does not provide any APIs for that.

SoundCloud Custom Player and YouTube Embed Player on https

I am using SoundCloud Custom Player on https site, everything works good but on chrome (html5 player) I get console alert that the player loads mp3 file from
http://ak-media.soundcloud.com...
This alert also occurs (on chrome yt-flash-player) while YT embed player (not iframe) loads video or crossdomain file from http
Is it possible to force those players to load source from https?
Could you please clarify what do you mean by SoundCloud Custom Player? Your own player which is built on top of Widget API or a standard (iframe-based) one?
I don't see any http request for widgets served via HTTPS.
Could you provide us with an example?

how to show a youtube video into WP7 application?

I want to develop a WP7 application. In this one, I would like to get video from youtube. For example, videos of a channel.
So, I know, I need youtube API, but I don't find a simple example to subscribe a channel and receive the latest video...
Is it possible ?
Thanks in advance , have a nice day !
I think there are simple RSS feeds for each channel... If there are no RSS feeds, parse the HTML feed (e.g. http://www.youtube.com/user/nokia/feed)
To play youtube videos, see
http://mytoolkit.codeplex.com/wikipage?title=YouTube
WP7 currently doesn't have a standard media layer for YouTube videos and you need the YouTube app in order to be able to play those. Unless you want to work on a low level with the encoding format used by YouTube, but then again - you would have to implement a decoding service.
To play a youtube Video you need to use the WebBrowserTask and open the target URL in the browser; if the youtube app is installed, it will play, if not installed, it will prompt the user to install and then play.
How to subscribe ?
I don't think if it's possible to make that directly from your app...

Possible to play Youtube video in a wp7 app?

is it possible to play youtube videos in a wp7 application? I would guess you could retrieve the video file from the youtube api and Perhaps play it using a media element? Any suggestion, tips or resources would be appreciated.
That's a great question and really goes to the heart of YouTube's business model, YouTube's API and WP7 Integration.
Short answer: To a limited extend it could be possible to play low-quality videos in WP7.
The first question you should ask yourself is: "What is Google?" The answer is "An Ad serving company". The overwhelming majority of Google & YouTube's revenue stream comes exclusively from advertisements. If you were to take YouTube's content and serve it on your own website/app without any YouTube branding or ads, that would works against their financial business model.
The second question you should ask yourself is: "So how is iPhone showing YouTube videos? And WP7? Or YouTube website itself for that matter?". This goes into the heart of YouTube's media delivery system. YouTube publicly exposes multiple formats from their website. For example format #1 is H263, Format #6 is MPEG and Format #5 is the SWF/FLV content. You can read more about YouTube Formats in their official documentation.
And now, to answer your question. YouTube API only exposes thumbnail size videos for unauthorized 3rd parties and those could potentially be showed in WP7 in-app. However the video quality will be terrible if scaled up for more than 1/4 of the WP7 screen resolution.
I suggest you read through the GData YouTube developer guide for information on the API. I'll do a quick run-through of how to get to those public videos. Personally, I haven't been successful in getting these 3GP videos to work on WP7.
Open up the GData feed for top rated videos: http://gdata.youtube.com/feeds/api/standardfeeds/top_rated
from the < entry /> element find the < id /> element which should have a link to single video GData feed. I picked up this one: http://gdata.youtube.com/feeds/api/videos/dMH0bHeiRNg
find the < media:content /> elements with yt:format attributes.
< media:content url='http://www.youtube.com/v/dMH0bHeiRNg?f=videos&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='360' yt:format='5'/>
< media:content url='rtsp://v5.cache7.c.youtube.com/CiILENy73wIaGQnYRKJ3bPTBdBMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='360' yt:format='1'/>
< media:content url='rtsp://v3.cache8.c.youtube.com/CiILENy73wIaGQnYRKJ3bPTBdBMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='360' yt:format='6'/>
Open up "VLC Player" with format #6 URL and you should see the RTSP stream player.
** This whole post should be considered "As far as I know". This is all knowledge I gleamed from official YouTube documentation and forums.
Quoting from the Windows Phone Developer FAQ
How can I play youtube videos in my app?
Use the WebBrowserTask and open the target URL in the browser; if the youtube app is installed, it will play, if not installed, it will prompt the user to install and then play.
No, you can't play it via standard API methods. A similar question was asked before. WP7 currently doesn't have a standard media layer for YouTube videos and you need the YouTube app in order to be able to play those. Unless you want to work on a low level with the encoding format used by YouTube, but then again - you would have to implement a decoding service.

Resources