尝试让 Javascript 音乐播放器在外部网站上运行

发布于 2024-10-27 15:42:02 字数 682 浏览 3 评论 0原文

我在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傲性难收 2024-11-03 15:42:02

我想通了。对于任何仍然想使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文