TinyPortal

Development => Block Codes => Topic started by: LeeD on September 13, 2006, 08:46:17 PM

Title: pop up media player in a block - wmv files
Post by: LeeD on September 13, 2006, 08:46:17 PM
pop up media player in a block

anybody help me out if they could

i have my radio to pop up in different window was looking to do same with embedded
wmv files

here is code i use for embedding into html on my site
is there a way to incorporate this into a block so it pops up in a different window

embedding video for rookies >>>> http://cit.ucsf.edu/embedmedia/step1.php

Quote<!-- begin embedded WindowsMedia file... -->
      <table border='0' cellpadding='0' align="center">
      <tr><td>
      <OBJECT id='mediaPlayer' width="320" height="285"
      classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
      standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
      <param name='fileName' value="http://racingbuds.com/BudsatRichmond911HIGHRES.wmv">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='true'>
      <param name='autoStart' value="false">
      <param name='showControls' value="true">
      <param name='loop' value="true">
      <EMBED type='application/x-mplayer2'
        pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
        id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
        bgcolor='darkblue' showcontrols="true" showtracker='-1'
        showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
        src="http://racingbuds.com/BudsatRichmond911HIGHRES.wmv" autostart="false" designtimesp='5311' loop="true">
      </EMBED>
      </OBJECT>
      </td></tr>
      <!-- ...end embedded WindowsMedia file -->
    <!-- begin link to launch external media player... -->
        <tr><td align='center'>
        <a href="http://racingbuds.com/BudsatRichmond911HIGHRES.wmv" style='font-size: 85%;' target='_blank'>Launch in external player</a>
        <!-- ...end link to launch external media player... -->
        </td></tr>
      </table>
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 13, 2006, 08:48:26 PM
Assuming your above code works correctly and displays the WMV

Place the code in a normal HTML file and upload to your server

Create a link for your popup using this little nifty tool (http://www.dynamicdrive.com/dynamicindex8/popwin.htm)

add it to your page or menu and ull be set to go :)
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 13, 2006, 08:50:38 PM
oh yes i forgot to mention ...to put all that code into a block you will have to declare the <head> bit like so:

<head>
code goes here
</head>

then you place your link as a normal ahref tag :)
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 13, 2006, 08:52:20 PM
an even easier way to do this is this:



<a target="_blank" onclick="popup = window.open('http://yoursite.com/yourvideo.html', 'PopupPage', 'width=310 height=405,scrollbars=no,resizable=no'); return false">YOUR BUTTON OR LINK TEXT</a>

Title: Re: pop up media player in a block - wmv files
Post by: LeeD on September 13, 2006, 09:13:20 PM
im still having problems

movie will show but no pop up

just link to download

i really am not to good with html and not sure where to add this stuff into above code
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 13, 2006, 09:47:10 PM
ok assuming your video embed code is in a file called "myvideo.html"

the code for it will be like this:



<a target="_blank" onclick="popup = window.open('http://yoursite.com/myvideo.html', 'PopupPage', 'width=340 height=300,scrollbars=no,resizable=no'); return false">Click To View</a>



put the above code in a SCRIPT box and change the address in the code to point to the exact location of your file

it should work - i have it workin on my site (http://path-to-peace.net/forum/index.php) on the left - media center.

tested in IE, FF and Opera

oh just remembered...make sure ur browser isnt preventing popups
Title: Re: pop up media player in a block - wmv files
Post by: LeeD on September 13, 2006, 10:14:41 PM
its not popping up directly in a window media player
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 13, 2006, 10:18:38 PM
well it is popping up though yea?

so thats the code for the POPUP

but as for the code to get windows media player started up - u will have to search around on google for that
Title: Re: pop up media player in a block - wmv files
Post by: LeeD on September 13, 2006, 11:28:49 PM
ah 10-4 lol

ty

yeah it pops up but what im looking for is exaclty what ya said

the code i have for my radio pops up windows movie player  and automatically goes into it

i thought maybe it might work the same way
Title: Re: pop up media player in a block - wmv files
Post by: LeeD on September 13, 2006, 11:36:03 PM
heres a decent tool found googling

http://joshkinberg.com/popupmaker/
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 13, 2006, 11:37:29 PM
well just an idea...if u wana launch directly into the media player why not use a simple link with a target set to blank like so:


<a href="http://mysite.com/myvideo.wma" target=_blank>Watch my video</a>

Title: Re: pop up media player in a block - wmv files
Post by: LeeD on September 14, 2006, 12:10:46 AM
heres what i went with for now

in java/html box

was working well in both ie and firefox
Title: Re: pop up media player in a block - wmv files
Post by: LeeD on September 14, 2006, 12:25:17 AM

in firefox your code above
opens in another window .. yes
but if choose to view it downloads doesnt stream

this other code i had found opens directly to streaming window

demo on left side of my tp
Title: Re: pop up media player in a block - wmv files
Post by: akulion on September 14, 2006, 12:27:23 AM
cool

glad u got it workin