javascript 如何将现有播客嵌入我的网站?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4719918/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 14:40:06  来源:igfitidea点击:

How can I embed an existing podcast into my website?

javascriptflashhtmlwebpodcast

提问by michaellindahl

I manage a podcast and a website, currently they are separate but I would like to have a way to embed the podcast into the website, I still want to create/update the podcast separate from the website I just want visitors to be able to listen to the podcast on the website without having to open iTunes while still having the ability to choose what episode to play. The best solution I have found is: http://tools.wizzard.tv/but I do not like it that much. Currently I have to log on and click refresh for it to recognize new episodes.

我管理一个播客和一个网站,目前它们是分开的,但我想有办法将播客嵌入网站,我仍然想创建/更新与网站分开的播客我只希望访问者能够收听到网站上的播客,而无需打开 iTunes,同时仍然可以选择要播放的剧集。我找到的最佳解决方案是:http: //tools.wizzard.tv/但我不太喜欢它。目前我必须登录并单击刷新才能识别新剧集。

I want to be able to update the podcast, and just like how iTunes will be updated I want the page on the website to be updated as well. The 'podcast' page will most likely not be like a blog but have a Flash or Java script, maybe HTML5 application that will pull the info from the podcast.xml file to show the episodes.

我希望能够更新播客,就像 iTunes 的更新方式一样,我希望网站上的页面也能更新。“播客”页面很可能不像博客,而是有一个 Flash 或 Java 脚本,也许是 HTML5 应用程序,它将从 podcast.xml 文件中提取信息以显示剧集。

采纳答案by michaellindahl

I have found two solutions for this problem:

我为这个问题找到了两个解决方案:

The first solutionshows the podcast in a widget, in which you can tell its hosted outside the site.

一个解决方案在小部件中显示播客,您可以在其中告诉它在站点外托管。

The second solutionis a little more native, however to use it you must be making you site in RapidWeaver and this solution costs a wee bit.

第二个解决方案是多一点人,但是使用它,你必须让你的网站中的RapidWeaver这个解决方案的成本一丁点。

回答by Guest

If you want to display the updated podcasts as they are added to iTunes, use an iFrame. The iFrame should point to your iTunes Preview page. You probably don't want to display the iTunes Preview page top navigation bar and all of the links at the bottom of the iTunes Preview page and there is a way around that.

如果要在添加到 iTunes 时显示更新的播客,请使用 iFrame。iFrame 应该指向您的 iTunes 预览页面。您可能不想显示 iTunes 预览页面顶部导航栏和 iTunes 预览页面底部的所有链接,并且有一种解决方法。

Place your iFrame inside a div and use some inline styling to get the dimensions you want and trim off the top and bottom using negative margins. Note that the negative margins top and bottom in the iFrame are subtracted from the iFrame height so the actual height is 500px. Should look something like this.

将您的 iFrame 放在一个 div 中,并使用一些内联样式来获得您想要的尺寸,并使用负边距修剪顶部和底部。请注意,从 iFrame 高度中减去 iFrame 顶部和底部的负边距,因此实际高度为 500px。应该看起来像这样。

<div style="overflow: hidden;">
<iframe src="link-to-podcast" scrolling="auto width="100%" frameborder="0"
height="980px" allowtransparency="no" allowfullscreen="allowfullscreen"
style="margin: -80px 0 -400px 0;"></iframe>
</div>

回答by Cameron

If you use WordPress for your site, a great option is PowerPress. Also, if you want to keep the podcast off your website but still give listeners an option other than iTunes, check out Blubrry

如果您的网站使用 WordPress,PowerPress是一个不错的选择。此外,如果您想让播客远离您的网站,但仍为听众提供 iTunes 以外的选择,请查看Blubrry