2009-01-27, 05:22 PM
Hello,
I wanted to have the possibility to embed FLV videos on my forums. The HTML Code/Javascript for this is the following:
So I made this custom MyCode:
and
Everything works fine in FireFox, but any other browser just displays the alternative text instead of a video.
What is wrong with the code?
Ok I now managed to solve this problem myself. I didn't know that even in this case new lines are automatically translated into line brackets instead of remaining unchanged in the source code. FireFox was the only browser that understood the code anyways.
Support would have been great and had saved me a day...
I wanted to have the possibility to embed FLV videos on my forums. The HTML Code/Javascript for this is the following:
<script type="text/javascript" src="http://www.taktische-kuscheltiere.de/videos/swfobject.js"></script>
<div id="player">Videoplayer</div>
<script type="text/javascript">
var so = new SWFObject('http://www.taktische-kuscheltiere.de/videos/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=http://www.taktische-kuscheltiere.de/videos/testvideo.flv');
so.write('player');
</script>
So I made this custom MyCode:
\[video\](.*?)\[/video\]
and
<script type="text/javascript" src="http://www.taktische-kuscheltiere.de/videos/swfobject.js"></script>
<div id="player">Videoplayer</div>
<script type="text/javascript">
var so = new SWFObject('http://www.taktische-kuscheltiere.de/videos/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=$1');
so.write('player');
</script>
Everything works fine in FireFox, but any other browser just displays the alternative text instead of a video.
What is wrong with the code?
Ok I now managed to solve this problem myself. I didn't know that even in this case new lines are automatically translated into line brackets instead of remaining unchanged in the source code. FireFox was the only browser that understood the code anyways.
Support would have been great and had saved me a day...