Results 1 to 9 of 9

Thread: Help with quicktime and WMP

  1. #1
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Exclamation Help with quicktime and WMP

    I managed to get a quick time and windows media player detection script working

    but if you have the player
    Code:
    if(player ==true){fixcode()}
    I have a code to write out quicktime.

    Code:
    function fixcode (){ document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" 
    
    codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="256">');
    document.write('<param name="src" 
    value="http://www.knallgrau.at/code/plugin_js/demo/video-embeding/files/skifoan.mov" />');
    document.write('<param name="autoplay" value="true" />');
    document.write('<param name="controller" value="true" />');
    document.write('<embed 
    src="http://www.knallgrau.at/code/plugin_js/demo/video-embeding/files/skifoan.mov" width="320" height="256" type="video/quicktime" 
    pluginspage="http://www.apple.com/quicktime/download/" autoplay="false" controller="true" />');
    document.write('</object>')}
    the problem is when I just write it out normaly it works and you can see the movie. But when I use document write it dosen't play but there are no errors.
    I searched many sites but I don't see a clear explainion for why this won't work.

    I even tried making an object and using createElement. Still no luck.

  2. #2
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Is there something i'm misssing here?

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by riptide View Post
    Is there something i'm misssing here?
    The realisation, perhaps, that no-one here knows a solution?
    Mike

  4. #4
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    so...no one has tried to embed a player like this.

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by riptide View Post
    so...no one has tried to embed a player like this.
    I know I haven't.
    Mike

  6. #6
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    This is a stab in the dark, but would it make a difference if the object was written all at once.

    Or

    Use DOM techniques?

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Bob90 View Post
    This is a stab in the dark, but would it make a difference if the object was written all at once.
    I think there has been a case where outputting a start-tag first and the end-tag later caused the browser to error-correct the document, closing the element immediately. I don't remember the circumstances, though.

    Quite a possibility...


    Use DOM techniques?
    The OP already tried that.
    Mike

  8. #8
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    I think I only got an error when I used an object. the other times I got no errors. I did try writing it out all in one document.write I still didn't get an error or have it play.

  9. #9
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    I decided to have the player written out.

    in the body



    HTML Code:
    <OBJECT id='mediaPlayer' width="320" height="240" 
    classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' 
    codebase='http://activex.microsoft.com/activex/controls/ mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
    standby='this will take some time<img src='misterioloder'' type='application/x-oleobject'>
    <param name='fileName' value="">
    <param name='animationatStart' value='1'>
    <param name='transparentatStart' value='1'>
    <param name='autoStart' value='1'>
    <param name='ShowControls' value='1'>
    <param name='ShowStatusBar' value='0'>
    <param name='loop' value='0'>
    <EMBED type='application/x-mplayer2'
    pluginspage='http://microsoft.com/windows/mediaplayer/ en/download/'
    id='mediaPlayer2' name='mediaPlayer' displaysize='4' autosize='0' 
    bgcolor='darkblue' showcontrols='true' showtracker='true' 
    showdisplay='0' showstatusbar='0' videoborder3d='0' width="320" height="240"
    src='' autostart='1' designtimesp='5311' loop='0'>
    </EMBED>
    </OBJECT>
    
    <a id="thebiglink" href="http://www.knallgrau.at/code/plugin_js/demo/video-embeding/files/skifoan.wmv" onclick="return false">clickhere</a>

    but I'm trying to load the file from a link into the embed src.
    I can't load the link to the objects param because I can't use createElement("param")


    Code:
    document.getElementById("mediaPlayer2").setAttribute("src", document.getElementById("thebiglink").getAttribute("href"));
    I thougth about loading the files from an array. But I need to have the links connected to the right files in the array and I don't know how to do that.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •