Player html5 soundcloud

為{幸葍}努か 提交于 2019-12-12 04:46:42

问题


I would like to change flash player SoundCloud to HTML5 player to my site in WordPress. The audios are add in pages.

I'm having problems because i cant find a code no user, just a player that work.

The flash code:

<object height="100%" width="100%"> 
<param name="movie" 
value="http://player.soundcloud.com/player.swf?url=<?=print_field($data,'sound_link') ?>&auto_play=false&player_type=artwork&color=000000"></param>
                                    <param name="allowscriptaccess" value="always"></param>
                                    <embed allowscriptaccess="always" height="100%" src="http://player.soundcloud.com/player.swf?url=<?=print_field($data,'sound_link') ?>&auto_play=false&player_type=artwork&color=000000" type="application/x-shockwave-flash" width="100%"></embed>
                                </object>

回答1:


Did you try code like this?

Simply create a new Wordpress post, give a title, then in main text area just insert the shown code below into it as if it was usual article text: (click "Save draft" and then try "Preview") :

[soundcloud url="http://api.soundcloud.com/tracks/34019569" params="color=000000" width="100%" height="166" iframe="true" /]

note: You must use http:// not the SSL version of https://.

EDIT :

First make sure you install the SoundCloud Short Code plugin (made by SoundClound Inc) :

For using SoundCloud URL as link, you can now try:

[soundcloud url="https://soundcloud.com/soulmovementrecords/dj-fleg-new-horns" params="auto_play=false&amp;show_comments=false" width="100%" height="150" /]

Here is a link to an example: SoundCloud Player test (using a page URL not user or track ID)

I assume using your code, you can try something like:

[soundcloud url="sound_link" params="auto_play=false&amp;show_comments=false" width="100%" height="150" /]


来源:https://stackoverflow.com/questions/33792843/player-html5-soundcloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!