尝试让 Javascript 音乐播放器在外部网站上运行
我在我的 tumblr 页面和互联网上的其他几个页面上使用了 SCM 音乐播放器。但SCM网站瘫痪了。我找到了播放器源文件并将它们加载到我的服务器上。该脚本在托管文件的网站上运行良好,但是当我尝试在不在我的服务器上的网页上使用该脚本时,它似乎不起作用。
我尝试查看脚本文件以查看是否有可以修复的内容,但没有成功。下面的代码有问题吗?
<script type="text/javascript" src="http://www.itsnotch.com/tumblr/SCMmusic/script.php" ><!--
//--></script>
<script type="text/javascript"><!--
SCMMusicPlayer.init("{'skin':'http://itsnotch.com/tumblr/SCMmusic/skins/cyber/skin.css','playback':{'autostart':'true','shuffle':'true','volume':'50'},'playlist':[{'title':'Dam-Funk','url':'http://itsnotch.com/music/10_west.mp3'}],'placement':'bottom','showplaylist':'false'}");
//--></script>
I was using the SCM music player for my tumblr page and a couple of other pages on the internet. But the SCM website went down. I found the player source files and loaded them onto my server. The script works fine on the website that the files are hosted on, but when I try to use the script on web pages that aren't on my server it seems that it just won't work.
I tried looking in the script file to see if there was something I could fix, but no luck. Is there something wrong with the code below?
<script type="text/javascript" src="http://www.itsnotch.com/tumblr/SCMmusic/script.php" ><!--
//--></script>
<script type="text/javascript"><!--
SCMMusicPlayer.init("{'skin':'http://itsnotch.com/tumblr/SCMmusic/skins/cyber/skin.css','playback':{'autostart':'true','shuffle':'true','volume':'50'},'playlist':[{'title':'Dam-Funk','url':'http://itsnotch.com/music/10_west.mp3'}],'placement':'bottom','showplaylist':'false'}");
//--></script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了。对于任何仍然想使用 SCM 音乐播放器的人。
您必须从网站下载文件(忘记是哪个网站,只需谷歌一下即可)。然后您将编辑 script.php 文件。
有一行代码是这样的。
“this.url =”,然后是一个 php 方法。删除 及其之间的所有内容,并将其替换为实际的 container.php url 路径。
它应该有效
I figured it out. For anybody who would still like to use the SCM music player.
You will have to download the files from a site (forgot which one, just google it). Then you'll have edit the script.php file.
There a line of code that reads like this.
"this.url =" and then a php method follows it. Erase the and everything between it and replace it with the actual container.php url path.
ANd it should work