Wordpress "player.swf" (1 pixel out) のこと
こんにちわ。
Hello.
player.swf を使っている人で、曲を再生したときに、再生中の曲に重なって一緒に鳴ってしまう形になって困っている人がいると思う。要は、ある曲を再生したら、その時再生中の曲は停止したいということだ。
Some people would be in trouble using player.swf, as when playing a song playing other one, that songs is played together with the previous one. What you want to do is to stop the song being played when starting other song.
それができているサイトがあるのに、自分のはうまくいかない。
Some sites achieves that, but in my site it's no good.
理由がわかった。
I found the reason and solution.
曲を再生すると再生中の曲が閉じるようにするためには、player.swf の(置いてある場所の)パスのドメイン名と、プレーヤーの配置されたページのドメイン名が同じでないとだめだということだ。
The domain name of the url of player.swf and that of the page the player is set must be the same, to achieve one song at one time.
以下の二つのページのソースは同じだけど、上の方はページのurlとplayer.swf の置いてある場所のドメイン名が違っているので再生すると同時に再生してしまうが、あえてplayer.swf の置いてある場所と同じ場所に同じ内容のページをアップロードしたものである下のものでは、違う曲を再生すると鳴っていた曲が停止する。
The both pages below has same source code, but the page from upper's link has a different domain name from that of the player.swf's and, the page from the below's link has the same domain name. So in below's page song being played stops when other song is started playing.
■ Bad page うまくいかない(no good)
■ Ok page こっちはちゃんと閉じる。(one song at a time achieved!)
すごくいろいろ、SWFObject のこととか調べまくって制御の仕方探して、答えが見つからずじまいで疲れ果てたけど、結論は簡単なことだった。
I studied a lot and lot about things like SWFObject for controlling objects, and no answer I've got and was made exhausted. But the conclusion was easy thing.
参考にしてください。じゃぁ。
Thank you.
(I am Japanese and I did translated, rather for training.Of course this article is my original. )
あ、ちなみに今は、audio-player.swf でなく、player.swfを使ってうまくいってます。
Hello.
player.swf を使っている人で、曲を再生したときに、再生中の曲に重なって一緒に鳴ってしまう形になって困っている人がいると思う。要は、ある曲を再生したら、その時再生中の曲は停止したいということだ。
Some people would be in trouble using player.swf, as when playing a song playing other one, that songs is played together with the previous one. What you want to do is to stop the song being played when starting other song.
それができているサイトがあるのに、自分のはうまくいかない。
Some sites achieves that, but in my site it's no good.
理由がわかった。
I found the reason and solution.
曲を再生すると再生中の曲が閉じるようにするためには、player.swf の(置いてある場所の)パスのドメイン名と、プレーヤーの配置されたページのドメイン名が同じでないとだめだということだ。
The domain name of the url of player.swf and that of the page the player is set must be the same, to achieve one song at one time.
以下の二つのページのソースは同じだけど、上の方はページのurlとplayer.swf の置いてある場所のドメイン名が違っているので再生すると同時に再生してしまうが、あえてplayer.swf の置いてある場所と同じ場所に同じ内容のページをアップロードしたものである下のものでは、違う曲を再生すると鳴っていた曲が停止する。
The both pages below has same source code, but the page from upper's link has a different domain name from that of the player.swf's and, the page from the below's link has the same domain name. So in below's page song being played stops when other song is started playing.
■ Bad page うまくいかない(no good)
■ Ok page こっちはちゃんと閉じる。(one song at a time achieved!)
すごくいろいろ、SWFObject のこととか調べまくって制御の仕方探して、答えが見つからずじまいで疲れ果てたけど、結論は簡単なことだった。
I studied a lot and lot about things like SWFObject for controlling objects, and no answer I've got and was made exhausted. But the conclusion was easy thing.
参考にしてください。じゃぁ。
Thank you.
(I am Japanese and I did translated, rather for training.Of course this article is my original. )
あ、ちなみに今は、audio-player.swf でなく、player.swfを使ってうまくいってます。