如何制作一个外部按钮或链接,该链接或单击后可开始/停止嵌入同一页面的Soundcloud iframe上的音乐,播放暂停按钮

时间:2019-01-29 08:27:44

标签: button external soundcloud playback pause

我添加了一个Soundcloud Iframe,可以轻松播放我的Soundcloud个人资料中的播放列表。现在,我正在尝试创建一个按钮(在css中已经有一个名为button101的href类,用于管理样式和悬停。然后我想添加一个Onclick元素或某种类型的链接,以触发iframe上的播放和暂停顶部是https://tatouagecalypso.com主页上的一个外部按钮,用于开始和停止音乐。iframe不能很好地发挥圆圈的播放三角形,即在嵌入代码时Snundcloud wedbsite上的按钮是一个圆形。整个iframe处于活动状态,并且在单击时开始和停止音乐。在我的网站上,仅当您单击歌曲矩形时它才起作用。无论如何,如何创建链接或按钮来激活这些功能。我可以将某些内容集成到href标签中吗?

阅读论坛上的帖子以及有关Soundcloud api和小部件api的内容,但这有点让我难以承受。我正在尝试找到执行此操作的代码,但是我还没有尝试过任何操作。

`<a href="" class="button101" onclick('play/pause-music-of-some- 
 sort')></a>
--this is the embed code i used to add the iframe:--
<iframe width="100%" height="230" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/695661771&color=%234f9494&auto_play=true&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe>

` 也许因为我将高度从300像素更改为230像素,iframe上的链接已消失?歌曲标题栏上的链接有效。

Soundcloud中的音乐将iframe嵌入到同一页面中,可以启动,继续和停止Soundcloud iframe中的音乐

0 个答案:

没有答案