MRSS - Display poster/background image on audio-only feed - rss

Not sure if this is possible, but I need to display a poster/background image in an MRSS feed where I am playing audio only, not sure if this can be done. As at the moment, when the player accesses this feed, it plays the audio, but with a black background. I am hoping to add an image there, but not sure what element to use. I have checked the MRSS specs here http://www.rssboard.org/media-rss, but it doesn't look like they've been updated for a while and I cannot find how to add such a background image.
<item>
<title>My Title</title>
<link></link>
<description>My Description</description>
<guid isPermaLink="false"></guid>
<media:category>All</media:category>
<media:category>Music</media:category>
<media:content url="http://linktoaudiofile.mp3 language="en-us" medium="audio" isDefault="true">
<media:title type="plain">Title</media:title>
<media:description type="html">Description</media:description>
<media:thumbnail url="icon_large.png" />
<media:credit role="author" scheme="urn:ebu">Author</media:credit>
<media:copyright url="coprightURL" />
</media:content>
</item>
Any ideas? Thank you.
Happy to also understand if this can be done a different way, such as using a player with the element instead?

Related

implementing html5 banner ad

Good Afternoon, I created a banner ad in HTML5 using div containers and css3 animation. I submitted my banner to who i needed to submit it to and they responded they want a gif file. I'm a little confused as to what they need. how do i convert the html5 to a gif. It seems they're following XAXIS/Google ADX criteria. I know that they do not actually want an animated gif, but are looking for a backup of sorts. Never dealt with this type of stuff so your help is greatly appreciated. Here's the documentation:
Initial Load - 200kb
Secondary Load
Max Additional Load - 1 MB
Max number of file requests – 15
Backup static image must be supplied separate from the HTML5 zip for trafficking
DCM doesn’t accept HTML files which are made using the SWIFFY tool
HMTL must include at least 1 clickTAG (See Below for the clickTag supported by DCM)
<html>
<head>
<meta name=”ad.size” content=”width=300,height=250”>
<script type='text/javascript'>
var clickTag = 'https://www.google.com';
</script>
</head>
<body>
[The rest of your creative code goes here.]
</html>
Please ensure that your creative uses the clicktag variable as the click-through URL:
<a href='javascript:window.open(window.clickTag)'>
<img src='images/dclk.png' border=0>
</a>
</body>
</html>
All banners require a static backup gif (or jpg, or png) that displays when the animated version fails to load. If you don't have a Photoshop layout to make a static version from you can do this:
Run the banner locally in your browser
Take a screenshot of the frame you want for the static version
Crop the image down to banner size & save as gif, jpg, png or whatever

Center text of a Xamarin Forms TabbedPage Title

i have a TabbedPage with multiple Child-Pages, with a title each.
When the title is short enough to be single line the text gets centered perfectly, but as soon as the text needs more than 1 line it is no longer centered.
Can anyone tell me how to fix this?
I think it's impossible to do in common way for all platforms, and you have to do it in platform specific way.
For android project I did it in such way:
In file Styles.xml from folder Resources/values I added style
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomTheme"
parent="#android:style/Theme.Holo">
<item name="android:actionBarTabTextStyle">#style/CustomTab</item>
</style>
<style name="CustomTab"
parent="#android:style/Widget.Holo.ActionBar.TabText">
<item name="android:gravity">center</item>
</style>
</resources>
And in MainActivity.cs I added
[Activity(Theme = "#style/CustomTheme")]
For Windows phone I found this article https://nocture.dk/2014/12/10/xamarin-forms-customizing-tabbed-page-header-title-windows-phone/, but didn't try it.
For iOS i didn't check too http://jfarrell.net/2015/02/25/customizing-the-tab-bar-on-ios-with-xamarin-forms/.

Open all links within a div in a lightbox

I'm trying to figure out how to open all of the images within a div in a lightbox. The div is pulling images from a picasa album, so I can't edit each link individually.
What would also work for me is the ability to open all links of a certain filetype in a lightbox.
Thanks!
Try the pretty gallery which meets your requirement.Demo for photo gallery.
I have create a enlarge button on the photo gallery of the pikaChoose by clicking the button i display the gallery in light box. The code for display from pikaChoose is
jQuery(".pika-stage #enlarge a").live('click',function(){
jQuery.fn.prettyPhoto();
jQuery.prettyPhoto.open(api_gallery,api_titles,api_descriptions);
return false;
});
I hope this may be useful to you
You can use lightbox: http://lokeshdhakar.com/projects/lightbox2/
For example (first three lines in head - be sure to have the images like close button in imgs folder):
<script src="jquery-1.11.0.min.js"></script>
<script src="lightbox.min.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />
Image #2
Image #3
Image #4
Since you're using picasa, change the href to the appropriate link to the image. If you're using php, then use for loops with echo, etc...

Question related to layout and margin of text in XSL

My other question about layout the text correctly on the webpage. I would like to write RSS code and then use XSL to format the RSS into HTML
My question:
Why the text of the ITEM DESCRIPTION run out of the margin of the webpage? HOw to force that piece of text maintain inside the margin?
Run out of margin http://i40.photobucket.com/albums/e236/ngquochung86/somemargin.jpg
My XML CODE:
<channel>
.......
<description>
CHANNEL DESCRIPTION: Website of New York Times
</description>
<item>
<title>
ITEM TITLE:YouTube and Universal to Create a Hub for Music
</title>
<link>
<a href="http://www.nytimes.com/2009/04/10/technology/internet/10google.html?ref=technology"/>
</link>
<description>
CHANNEL DESCRIPTION: The agreement is an effort by YouTube, which is owned by Google, to put more professionally produced content in front of its huge audience, and in turn, earn more money from advertising.
</description>
</item>
My XSL code:
<span class="channelDescription"> <xsl:value-of select="channel/description"/></span>
<xsl:for-each select="channel/item">
<span class="itemTitle"><xsl:value-of select="title"/></span>
<span class="itemLink"><xsl:value-of select="link"/></span>
<span class="itemDescription"><xsl:value-of select="description"/></span>
</xsl:for-each>
Would you please help me? Thank you
Like AnthonyWJones said, this seems like a CSS/HTML question. Once you use XSLT to transform the RSS feed into HTML, it is simply treated (and thus rendered) as a standard HTML document.
My best guess at this point is that you need to put a container (a block level element such as <DIV>) around the description (or the whole document) and specify a width for it that is within the dimensions of the display using CSS.
So something like this should work:
<style type="text/css">
#container {
width: 90%;
}
</style>
<div id="container">
// Your XSL code
</div>

What tag should I use instead of deprecated tag font in html (cannot use CSS)

this question can create a misunderstanding: I know I have to use CSS to validate successfully my document as XHTML 1.0 Transitional. The fact is that I have to embed in my webpage a picture composed by zeros and ones created with text image, and the problem is that the code uses deprecated tag font and looks like this
<!-- IMAGE BEGINS HERE -->
<pre>
<font size="-3">
<font color="#000000">0001100000101101100011</font>
<font color="#010000">00</font>
<font color="#020101">0</font>
<font color="#040101">0</font>
<font color="#461919">1</font>
<font color="#b54f4f">1</font>
...etc.etc...
</font>
</pre>
<!-- IMAGE ENDS HERE -->
(In this code example I inserted a newline after each couple of tags to make it more readable, but the original code is all in one line because of the <pre> tag).
The font's color changes at least thousands times so I never considered to create a field in the CSS for each combination.Hope someone knows at least where to find a solution, I searched everywhere :)
Thanks
You could replace
<font color="#000000">0001100000101101100011</font>
with
<span style="color:#000000">0001100000101101100011</span>
etc...
*Edit: I know this is CSS, but it doesn't involve a separate stylesheet like the question states, which may be ok.
Thanks a lot! :D I used this code
<!-- IMAGE BEGINS HERE -->
<div style="font-size:x-small;font-family:monospace">
<span style="color:#000000">0001100000101101100011</span>
<span style="color:#010000">00</span>
...etc.etc...
</div>
<!-- IMAGE ENDS HERE -->
It works correctly! :D
What about javascript ?
Send the color data as a JSON array, the '0' and '1' as another array and dynamically generate the DOM elements.
<script>
values = [1, 0, 0, 1, ... ]
colors = ["010000", "020101", ...]
for (i = 0; i < values.length; i++) {
span = createElement("span"); // use a portable function for creating elements
span.setAttribute("style", "color:#"+colors[i]);
txtNode = document.createTextNode(values[i]);
span.appendChild(txtNode);
document.appendChild(span);
}
</script>
Or something like this...
Why does it need to validate?
The solution you've already got is absolutely fine for what you're doing. It works. This is not a meaningful document that should be marked up with semantic tags for improved accessibility; it's a work of art, so feel free to ignore the rules if it helps you express your intentions more clearly.
If validation is part of the artistic statement you're trying to make, then use <span style="color:#ff00ff;">00</span> as suggested by other posters - but that'll increase your file size considerably.
Another approach is just to change the doctype so you're not targetting XHTML Transitional - use <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> or some earlier HTML revision instead.

Resources