• Resolved jopcloud

    (@jopcloud)


    Why is it that my video code will work in a htm page, but not in a blog post? The htm page shows the player fine, but the player doesn’t even show in the blog post. WordPress sucks for this.
    code is below:

    <script type=”text/javascript”
    src=”http://www.jeroenwijering.com/embed/swfobject.js”></script&gt;

    <div id=”player”>This text will be replaced</div> <script type=”text/javascript”>

    var so = new SWFObject
    (‘http://www.towardpraxis.com/blog/mediaplayer.swf&#8217;,’mpl’,’500′,’200′,’8′);
    so.addParam(‘allowscriptaccess’,’always’);
    so.addParam(‘allowfullscreen’,’true’);
    so.addVariable(‘height’,’200′);
    so.addVariable(‘width’,’500′);
    so.addVariable(‘file’,’http://www.towardpraxis.com/blog/playlist.xml&#8217;);
    so.addVariable(‘backcolor’,’0x000033′);
    so.addVariable(‘frontcolor’,’0x6666FF’);
    so.addVariable(‘lightcolor’,’0xFFFFFF’);
    so.addVariable(‘screencolor’,’0x6666FF’);
    so.addVariable(‘displaywidth’,’200′);
    so.addVariable(‘searchbar’,’false’);so.write(‘player’);
    </script>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The code is getting messed up during saving.

    eg. `<script type=”text/javascript”></p>
    <p>var so = new SWFObject`

    Those paragraph tags in amongst the JavaScript are probably making the code invalid. When you paste the code into the form you may have to remove whitespace and line-breaks so that WordPress doesn’t interpret a line break as a cue to insert a paragraph.

    So rather than it looking like this:

    <script type="text/javascript">
    var so = new SWFObject

    it would look like this:

    <script type="text/javascript"> var so = new SWFObject

    That would be what I’d start with.

    And I’m assuming you’re using the plain text editor.

    Thread Starter jopcloud

    (@jopcloud)

    Haecceity,

    Thank you so much. Works great now. I knew that if someone responded we could this thing resovled. Thanks for taking the time to dig up this post and reply. This made my day!

    Josh

    You’re welcome, Josh.

    Could you take the time to mark this thread resolved? It’s helpful for other users.

    Hi,

    I am fairly new to wordpress getting better at it but I want to embed a jw player with playlist from the code used below.

    Can someone tell me what I need to do, step by step instructions.

    I have turned off the rich text editor and pasted the above code into the post text area and I get the following message:

    ‘This text will be replaced’

    <script type=”text/javascript”
    src=”http://www.mydomain.com/blog/swfobject.js”></script&gt;

    <div id=”player”>This text will be replaced</div> <script type=”text/javascript”>

    var so = new SWFObject
    (‘http://www.mydomain.com/blog/mediaplayer.swf&#8217;,’mpl’,’500′,’200′,’8′);
    so.addParam(‘allowscriptaccess’,’always’);
    so.addParam(‘allowfullscreen’,’true’);
    so.addVariable(‘height’,’200′);
    so.addVariable(‘width’,’500′);
    so.addVariable(‘file’,’http://www.mydomain/blog/playlist1.xml&#8217;);
    so.addVariable(‘backcolor’,’0x000033′);
    so.addVariable(‘frontcolor’,’0x6666FF’);
    so.addVariable(‘lightcolor’,’0xFFFFFF’);
    so.addVariable(‘screencolor’,’0x6666FF’);
    so.addVariable(‘displaywidth’,’200′);
    so.addVariable(‘searchbar’,’false’);so.write(‘player’);
    </script>

    Please can someone tell me if the above code is wrong and if not where do I put it?

    Thanks

    Paul

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘video embed code doesn’t work for blog, only html pages’ is closed to new replies.