![]() |
how to play different types of audio-video files in the browser?
When the user chooses an AV file to play, based upon the type of file,
I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives, suggestions or improvements? if( wmv file) document.write("<OBJECT id=Player classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" width="479"> <PARAM NAME="autoStart" VALUE="true"> </OBJECT> "); if( swf file) document.write("flash classid") if(rm file) document.write("real audio classid") Qs: 1) How to tell which players are installed on the system? 2) How to make reentrant ie. let user play flash now, then afterwards in the same browser, play wmv etc. 3) Is it possible to minimise or make invisible the players that are not being played? 4) what if a player is not installed - will the OBJECT tag fail gracefully? thanks, Anil |
Re: how to play different types of audio-video files in the browser?
anil.rita@gmail.com wrote: > When the user chooses an AV file to play, based upon the type of file, > I want to use the default installed media player to play it. > > I am wondering if this is a good way - any alternatives, suggestions or > improvements? > > if( wmv file) > document.write("<OBJECT id=Player > classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" > width="479"> > <PARAM NAME="autoStart" VALUE="true"> > </OBJECT> > "); The above and the 2 objects below use an ActiveX classid and thus these are all thus ActiveX objects. Thus they will not work on most non-IE browsers as written. In many cases you can use an ordinary object for both IE and other browsers and avoid invalid embed paths for other browsers. > if( swf file) > document.write("flash classid") > > if(rm file) > document.write("real audio classid") > > > Qs: > 1) How to tell which players are installed on the system? Complicated at best, and subject to change without notice on player upgrades. Avoid when possible > 2) How to make reentrant ie. let user play flash now, then afterwards > in the same browser, play wmv etc. I will give you an example below. > 3) Is it possible to minimise or make invisible the players that are > not being played? Yes, an example follows below. > 4) what if a player is not installed - will the OBJECT tag fail > gracefully? Yes, if the code is properly written - no player = no display See my page at http://www.cwdjr.info/temp/video_multiFormat2.php and be sure to read the comments in the source. The page is written mainly to stream for a high broadband connection. A connection that will not support over 2Mbps will cause long buffering on some files. It is possible to offer multiple bitrates for high broadband, low, broadband, and dialup. See http://www.cwdjr.info/temp/video_multiBR3.php . for an example of this. Notice that I am using playlist files such as .wax (for WMP), .rpm for Real players etc. These can contain one or more video url references to urls for files that WMP, Real, or other player can play. The SMIL program is directed to the Real player, because Real has builtin support for most of SMIL2. Some other players have very limited SMIL support, so you don't want the SMIL file getting directed to these. The .mov file required the most complex object, and here I had to use both ActiveX and object paths as determined by Microsoft conditional comments. There is a recent complication for the WMP that everyone who embeds videos using this player should be aware of. The new WMP11 can be installed only on Windows XP(and likely Vista) OSs, but there are a huge number of such OSs out there that may be viewing your videos. If you embed a video and the width of the video called for in the object is greater than the actual width for a .wmv file, the width is stretched to the width called for in the code, but the height is not on non-IE browsers including recent Opera, Firefox, Mozilla, Netscape, and Seamonkey. However the image is normal viewed on an IE browser. If you have a Windows XP OS, the new WMP11 installed, and script turned on, you can see an example at http://www.cwdjr.info/temp/video_multiFormat.php. It will view as normal on IE and distorted on the mentioned non-IE browsers. Hopefully Microsoft will correct this bug. Until then the way to avoid it is to call for the same width in the object code as the actual width of the ..wmv or other video files played by the WMP11. If the actual width of the video is not what you need for your page layout, then the video should be re-encoded at the desired width. If you do not heed the above and have a commercial site, your viewers of slim young ladies in swim wear you wish to sell may stretch the ladies to the width of Henry VIII for those using the WMP11 on a non-IE browser until,and if, Microsoft fixes this bug.! |
Re: how to play different types of audio-video files in the browser?
Hello cwdjrxyz,
Thank you for the pointers. Reading through video_multiformat2 source, I am having difficulty with the following: <object data="http://www.cwdjr.net/ram/realmix.rpm" type="audio/x-pn-realaudio-plugin" .... The plugin is loaded from a remote url. Is there any way to load the player that is installed on the local desktop instead? When disconnected from the internet, the user should still be able to play the AV files. thanks, Anil On Dec 25, 8:01 pm, "cwdjrxyz" <spamtr...@cwdjr.info> wrote: > anil.r...@gmail.com wrote: > > When the user chooses an AV file to play, based upon the type of file, > > I want to use the default installed media player to play it. > > > I am wondering if this is a good way - any alternatives, suggestions or > > improvements? > > > if( wmv file) > > document.write("<OBJECT id=Player > > classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" > > width="479"> > > <PARAM NAME="autoStart" VALUE="true"> > > </OBJECT> > > ");The above and the 2 objects below use an ActiveX classid and thus these > are all thus ActiveX objects. Thus they will not work on most non-IE > browsers as written. In many cases you can use an ordinary object for > both IE and other browsers and avoid invalid embed paths for other > browsers. > > > if( swf file) > > document.write("flash classid") > > > if(rm file) > > document.write("real audio classid") > > > Qs: > > 1) How to tell which players are installed on the system?Complicated at best, and subject to change without notice on player > upgrades. Avoid when possible > > > 2) How to make reentrant ie. let user play flash now, then afterwards > > in the same browser, play wmv etc.I will give you an example below. > > > 3) Is it possible to minimise or make invisible the players that are > > not being played?Yes, an example follows below. > > > 4) what if a player is not installed - will the OBJECT tag fail > > gracefully?Yes, if the code is properly written - no player = no display > > See my page athttp://www.cwdjr.info/temp/video_multiFormat2.phpand be > sure to read the comments in the source. The page is written mainly to > stream for a high broadband connection. A connection that will not > support over 2Mbps will cause long buffering on some files. It is > possible to offer multiple bitrates for high broadband, low, broadband, > and dialup. Seehttp://www.cwdjr.info/temp/video_multiBR3.php. for an > example of this. Notice that I am using playlist files such as .wax > (for WMP), .rpm for Real players etc. These can contain one or more > video url references to urls for files that WMP, Real, or other player > can play. The SMIL program is directed to the Real player, because Real > has builtin support for most of SMIL2. Some other players have very > limited SMIL support, so you don't want the SMIL file getting directed > to these. The .mov file required the most complex object, and here I > had to use both ActiveX and object paths as determined by Microsoft > conditional comments. > > There is a recent complication for the WMP that everyone who embeds > videos using this player should be aware of. The new WMP11 can be > installed only on Windows XP(and likely Vista) OSs, but there are a > huge number of such OSs out there that may be viewing your videos. If > you embed a video and the width of the video called for in the object > is greater than the actual width for a .wmv file, the width is > stretched to the width called for in the code, but the height is not on > non-IE browsers including recent Opera, Firefox, Mozilla, Netscape, and > Seamonkey. However the image is normal viewed on an IE browser. If you > have a Windows XP OS, the new WMP11 installed, and script turned on, > you can see an example athttp://www.cwdjr.info/temp/video_multiFormat.php. It will view as > normal on IE and distorted on the mentioned non-IE browsers. Hopefully > Microsoft will correct this bug. Until then the way to avoid it is to > call for the same width in the object code as the actual width of the > .wmv or other video files played by the WMP11. If the actual width of > the video is not what you need for your page layout, then the video > should be re-encoded at the desired width. If you do not heed the above > and have a commercial site, your viewers of slim young ladies in swim > wear you wish to sell may stretch the ladies to the width of Henry VIII > for those using the WMP11 on a non-IE browser until,and if, Microsoft > fixes this bug.! |
Re: how to play different types of audio-video files in the browser?
anil.rita@gmail.com wrote: > Hello cwdjrxyz, > Thank you for the pointers. > Reading through video_multiformat2 source, > I am having difficulty with the following: > <object data="http://www.cwdjr.net/ram/realmix.rpm" > type="audio/x-pn-realaudio-plugin" .... > > The plugin is loaded from a remote url. > Is there any way to load the player that is installed on the local > desktop instead? > When disconnected from the internet, the user should still be able to > play the AV files. The rpm, with the mime type for it given, is just a standard type of Real playlist file. It points to where the actual media file or files are stored. This is just standard procedure, and ensures that the actual media file gets sent to the real player. The Real developer site has more details on Real than most people ever will wish to know, including SMIL that Real will play if a SMIL file is directed to it. The rpm file is: http://www.cwdjr.net/ram/realmix.smil In this case it points to the SMIL file at the given url. If you want to play the smill file locally, you just feed the local address on the computer where it is stored into the Real Player that you have brought up. The SMIL2 file is a type of xml file, and in this case is: <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> <head> <layout> <root-layout width="500" height="450" backgroundColor="blue" /> <region id="video_region" backgroundColor="blue" z-index="1" /> <regPoint id="middle" left="50%" top="50%" regAlign="center" /> <region id="brush_region_1" width="25%" height="50%" left="0" top="0" z-index="2" /> <region id="brush_region_2" width="25%" height="50%" left="25%" top="0" z-index="2" /> <region id="brush_region_3" width="25%" height="50%" left="50%" top="0" z-index="2" /> <region id="brush_region_4" width="25%" height="50%" left="75%" top="0" z-index="2" /> <region id="brush_region_5" width="25%" height="50%" left="0" top="50%" z-index="2" /> <region id="brush_region_6" width="25%" height="50%" left="25%" top="50%" z-index="2" /> <region id="brush_region_7" width="25%" height="50%" left="50%" top="50%" z-index="2" /> <region id="brush_region_8" width="25%" height="50%" left="75%" top="50%" z-index="2" /> </layout> <transition id="fromBlue" type="spiralWipe" subtype="topLeftClockwise" dur="5s" /> <transition id="fromStar" type="starWipe" subtype="fivePoint" dur="5s" /> <transition id="fromKeyhole" type="miscShapeWipe" subtype="keyhole" dur="5s" /> <transition id="fromHexagon" type="hexagonWipe" subtype="vertical" dur="5s" /> <transition id="fromBarnZigZag" type="barnZigZagWipe" subtype="vertical" dur="10s" /> <transition id="fromFourBox" type="fourBoxWipe" subtype="cornersIn" dur="10s" /> <transition id="fromPinWheel" type="pinWheelWipe" subtype="fourBlade" dur="5s" /> <transition id="fromSnake" type="snakeWipe" subtype="topLeftHorizontal" dur="10s" /> <transition id="toBlue" type="fade" subtype="fadeToColor" fadeColor="blue" dur="5s" /> <transition id="toRed" type="fade" subtype="fadeToColor" fadeColor="red" dur="5s" /> <transition id="toGreen" type="fade" subtype="fadeToColor" fadeColor="green" dur="5s" /> <transition id="toYellow" type="fade" subtype="fadeToColor" fadeColor="yellow" dur="5s" /> </head> <body> <seq> <img src="chttp://www.cwdjr.net/ram/roach.gif" id="image1" region="video_region" dur="34s" width="256" height="256" left="0" top="0" fill="hold" title="The SMIL Bug"> <animate targetElement="image1" attributeName="width" from="256" to="128" begin="3s" dur="4s" fill="freeze" /> <animate targetElement="image1" attributeName="height" values="256;128" calcMode="linear" begin="4s" dur="4s" fill="freeze" /> <animate targetElement="image1" attributeName="left" to="196" begin="9s" dur="4s" fill="freeze" /> <animate targetElement="image1" attributeName="top" to="196" begin="14s" dur="4s" fill="freeze" /> <animateMotion targetElement="image1" to="-128,-128" begin="19s" dur="4s" fill="freeze" /> <set targetElement="image1" attributeName="left" to="64" begin="24s" fill="freeze" /> <set targetElement="image1" attributeName="top" to="64" begin="24s" fill="freeze" /> <animate targetElement="image1" attributeName="height" to="256" begin="26s" dur="4s" fill="freeze" /> <animate targetElement="image1" attributeName="width" to="256" begin="26s" dur="4s" fill="freeze" /> <animateMotion targetElement="image1" to="0,0" begin="30s" dur="4s" fill="freeze" /> </img> </seq> <seq> <par> <audio src="chttp://www.cwdjr.net/souopera/Tetrazzini_CaroNome_1911.rmj" title="Caro Nome RA" author="Tetrazzini" /> <img src="chttp://www.cwdjr.net/picsnap/roscoe_foil2.jpg" region="video_region" regPoint="middle" transIn="fromBarnZigZag" transOut="toGreen" begin="2s" fill="remove" dur="240s" z-index="3" /> </par> </seq> <!-- remove comment tags from around below code to play midi. It is not included here as Real may ask you to install the Crescendo plugin to play the midi. --> <!-- <seq> <par> <audio src="chttp://www.cwdjr.net/ram/cancan.mid" title="Cancan mid" /> <img src="chttp://www.cwdjr.net/picani/dancer_blacktights.gif" region="video_region" regPoint="middle" transIn="fromStar" transOut="toYellow" begin="2s" fill="remove" dur="120s" /> </par> </seq> --> <seq> <par> <audio src="chttp://www.cwdjr.net/souearly/ColumbiaExpositionMarch.wma" title="Columbia Exposition March WMA" author="Sousa" /> <img src="chttp://www.cwdjr.net/picsnap/roscoe.jpg" region="video_region" regPoint="middle" transIn="fromFourBox" transOut="toYellow" begin="2s" fill="remove" dur="148s" /> </par> </seq> <seq> <par> <audio src="chttp://www.cwdjr.net/ram/SidewalksOfNewYork.mp3" title="Sidewalks Of New York MP3" /> <img src="chttp://www.cwdjr.net/pic3/burlesque_house2.jpg" region="video_region" regPoint="middle" transIn="fromSnake" transOut="toRed" begin="2s" fill="remove" dur="95s" /> </par> </seq> <seq> <par> <audio src="chttp://www.cwdjr.net/ram/ZarahLeander.ram" title="Zarah Leander RA" /> <img src="chttp://www.cwdjr.net/ram/aurora5f.jpg" region="video_region" regPoint="middle" transIn="fromStar" transOut="toBlue" begin="2s" fill="remove" dur="158s" /> </par> </seq> <seq> <video src="chttp://www.cwdjr.net/ram/eyeslicesmall.ram" region="video_region" regPoint="middle" title="eye slice - RM" transIn="fromPinWheel" transOut="toRed" begin="2s" fill="remove" dur="70s" /> </seq> <seq> <video src="chttp://www.cwdjr.net/ram/pianopullsmall.ram" region="video_region" regPoint="middle" title="piano pull - RM" transIn="fromHexagon" transOut="toRed" begin="2s" fill="remove" dur="119s" /> </seq> <seq> <video src="chttp://www.cwdjr.net/ram/Nosferatu.rmvb" region="video_region" regPoint="middle" title="Nosferatu - RM" transIn="fromStar" transOut="toRed" begin="2s" fill="remove" dur="175s" /> </seq> <seq> <par> <video src="chttp://www.cwdjr.net/ram/caligari.rmvb" region="video_region" regPoint="middle" title="Cabinet Of Dr Caligari - RM" begin="4s" /> <brush color="teal" region="brush_region_1" begin="0s" end="7s" /> <brush color="fuchsia" region="brush_region_2" begin="0.5s" end="9s" /> <brush color="olive" region="brush_region_3" begin="1s" end="5s" /> <brush color="red" region="brush_region_4" begin="1.5s" end="11s" /> <brush color="purple" region="brush_region_5" begin="2s" end="12s" /> <brush color="blue" region="brush_region_6" begin="2.5s" end="8s" /> <brush color="maroon" region="brush_region_7" begin="3s" end="10s" /> <brush color="navy" region="brush_region_8" begin="3.5s" end="6s" /> </par> </seq> <seq> <par> <audio src="chttp://www.cwdjr.net/ram/donkey.wav" title="donkey wav" begin="7s" /> <img src="chttp://www.cwdjr.net/pic/horse_fanny3.jpg" region="video_region" regPoint="middle" transIn="fromBlue" transOut="toRed" begin="2s" fill="remove" dur="15s" /> </par> </seq> </body> </smil> Of course you would also have to point image files to where you store these on the computer also if you want to be offline when you play the media. All of these media are designed for progressive download streaming on a website. Of course you could store all of the media files in the same directory as the SMIL file and use relative urls to make it more simple to play offline. However, I did not care to duplicate a lot of long media files that I already had stored at various locations on the server. |
Re: how to play different types of audio-video files in the browser?
Hello cwdjrxyz,
Ok, I realize I can generate the url dynamically using a document.write(). But (important) How will I control the player programmatically? Can I control the media player - set/get position, stop, play, pause - via Javascript? thanks, Anil On Dec 26, 5:13 pm, "cwdjrxyz" <spamtr...@cwdjr.info> wrote: > anil.r...@gmail.com wrote: > > Hello cwdjrxyz, > > Thank you for the pointers. > > Reading through video_multiformat2 source, > > I am having difficulty with the following: > > <object data="http://www.cwdjr.net/ram/realmix.rpm" > > type="audio/x-pn-realaudio-plugin" .... > > > The plugin is loaded from a remote url. > > Is there any way to load the player that is installed on the local > > desktop instead? > > When disconnected from the internet, the user should still be able to > > play the AV files.The rpm, with the mime type for it given, is just a standard type of > Real playlist file. It points to where the actual media file or files > are stored. This is just standard procedure, and ensures that the > actual media file gets sent to the real player. The Real developer site > has more details on Real than most people ever will wish to know, > including SMIL that Real will play if a SMIL file is directed to it. > > The rpm file is:http://www.cwdjr.net/ram/realmix.smil > > In this case it points to the SMIL file at the given url. > > If you want to play the smill file locally, you just feed the local > address on the computer where it is stored into the Real Player that > you have brought up. The SMIL2 file is a type of xml file, and in this > case is: > > <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> > <head> > <layout> > <root-layout width="500" height="450" backgroundColor="blue" /> > <region id="video_region" backgroundColor="blue" z-index="1" /> > <regPoint id="middle" left="50%" top="50%" regAlign="center" /> > <region id="brush_region_1" width="25%" height="50%" left="0" top="0" > z-index="2" /> > <region id="brush_region_2" width="25%" height="50%" left="25%" top="0" > z-index="2" /> > <region id="brush_region_3" width="25%" height="50%" left="50%" top="0" > z-index="2" /> > <region id="brush_region_4" width="25%" height="50%" left="75%" top="0" > z-index="2" /> > <region id="brush_region_5" width="25%" height="50%" left="0" top="50%" > z-index="2" /> > <region id="brush_region_6" width="25%" height="50%" left="25%" > top="50%" z-index="2" /> > <region id="brush_region_7" width="25%" height="50%" left="50%" > top="50%" z-index="2" /> > <region id="brush_region_8" width="25%" height="50%" left="75%" > top="50%" z-index="2" /> > </layout> > <transition id="fromBlue" type="spiralWipe" subtype="topLeftClockwise" > dur="5s" /> > <transition id="fromStar" type="starWipe" subtype="fivePoint" dur="5s" > /> > <transition id="fromKeyhole" type="miscShapeWipe" subtype="keyhole" > dur="5s" /> > <transition id="fromHexagon" type="hexagonWipe" subtype="vertical" > dur="5s" /> > <transition id="fromBarnZigZag" type="barnZigZagWipe" > subtype="vertical" dur="10s" /> > <transition id="fromFourBox" type="fourBoxWipe" subtype="cornersIn" > dur="10s" /> > <transition id="fromPinWheel" type="pinWheelWipe" subtype="fourBlade" > dur="5s" /> > <transition id="fromSnake" type="snakeWipe" subtype="topLeftHorizontal" > dur="10s" /> > <transition id="toBlue" type="fade" subtype="fadeToColor" > fadeColor="blue" dur="5s" /> > <transition id="toRed" type="fade" subtype="fadeToColor" > fadeColor="red" dur="5s" /> > <transition id="toGreen" type="fade" subtype="fadeToColor" > fadeColor="green" dur="5s" /> > <transition id="toYellow" type="fade" subtype="fadeToColor" > fadeColor="yellow" dur="5s" /> > </head> > <body> > <seq> > <img src="chttp://www.cwdjr.net/ram/roach.gif" id="image1" > region="video_region" dur="34s" width="256" height="256" left="0" > top="0" fill="hold" title="The SMIL Bug"> > <animate targetElement="image1" attributeName="width" from="256" > to="128" begin="3s" dur="4s" fill="freeze" /> > <animate targetElement="image1" attributeName="height" values="256;128" > calcMode="linear" begin="4s" dur="4s" fill="freeze" /> > <animate targetElement="image1" attributeName="left" to="196" > begin="9s" dur="4s" fill="freeze" /> > <animate targetElement="image1" attributeName="top" to="196" > begin="14s" dur="4s" fill="freeze" /> > <animateMotion targetElement="image1" to="-128,-128" begin="19s" > dur="4s" fill="freeze" /> > <set targetElement="image1" attributeName="left" to="64" begin="24s" > fill="freeze" /> > <set targetElement="image1" attributeName="top" to="64" begin="24s" > fill="freeze" /> > <animate targetElement="image1" attributeName="height" to="256" > begin="26s" dur="4s" fill="freeze" /> > <animate targetElement="image1" attributeName="width" to="256" > begin="26s" dur="4s" fill="freeze" /> > <animateMotion targetElement="image1" to="0,0" begin="30s" dur="4s" > fill="freeze" /> > </img> > </seq> > <seq> > <par> > <audio > src="chttp://www.cwdjr.net/souopera/Tetrazzini_CaroNome_1911.rmj" > title="Caro Nome RA" author="Tetrazzini" /> > <img src="chttp://www.cwdjr.net/picsnap/roscoe_foil2.jpg" > region="video_region" regPoint="middle" transIn="fromBarnZigZag" > transOut="toGreen" begin="2s" fill="remove" dur="240s" z-index="3" /> > </par> > </seq> > <!-- remove comment tags from around below code to play midi. It is not > included here as Real may ask you to install the Crescendo plugin to > play the midi. --> > <!-- > <seq> > <par> > <audio src="chttp://www.cwdjr.net/ram/cancan.mid" title="Cancan mid" /> > <img src="chttp://www.cwdjr.net/picani/dancer_blacktights.gif" > region="video_region" regPoint="middle" transIn="fromStar" > transOut="toYellow" begin="2s" fill="remove" dur="120s" /> > </par> > </seq> > --> > <seq> > <par> > <audio src="chttp://www.cwdjr.net/souearly/ColumbiaExpositionMarch.wma" > title="Columbia Exposition March WMA" author="Sousa" /> > <img src="chttp://www.cwdjr.net/picsnap/roscoe.jpg" > region="video_region" regPoint="middle" transIn="fromFourBox" > transOut="toYellow" begin="2s" fill="remove" dur="148s" /> > </par> > </seq> > <seq> > <par> > <audio src="chttp://www.cwdjr.net/ram/SidewalksOfNewYork.mp3" > title="Sidewalks Of New York MP3" /> > <img src="chttp://www.cwdjr.net/pic3/burlesque_house2.jpg" > region="video_region" regPoint="middle" transIn="fromSnake" > transOut="toRed" begin="2s" fill="remove" dur="95s" /> > </par> > </seq> > <seq> > <par> > <audio src="chttp://www.cwdjr.net/ram/ZarahLeander.ram" title="Zarah > Leander RA" /> > <img src="chttp://www.cwdjr.net/ram/aurora5f.jpg" region="video_region" > regPoint="middle" transIn="fromStar" transOut="toBlue" begin="2s" > fill="remove" dur="158s" /> > </par> > </seq> > <seq> > <video src="chttp://www.cwdjr.net/ram/eyeslicesmall.ram" > region="video_region" regPoint="middle" title="eye slice - RM" > transIn="fromPinWheel" transOut="toRed" begin="2s" fill="remove" > dur="70s" /> > </seq> > <seq> > <video src="chttp://www.cwdjr.net/ram/pianopullsmall.ram" > region="video_region" regPoint="middle" title="piano pull - RM" > transIn="fromHexagon" transOut="toRed" begin="2s" fill="remove" > dur="119s" /> > </seq> > <seq> > <video src="chttp://www.cwdjr.net/ram/Nosferatu.rmvb" > region="video_region" regPoint="middle" title="Nosferatu - RM" > transIn="fromStar" transOut="toRed" begin="2s" fill="remove" dur="175s" > /> > </seq> > <seq> > <par> > <video src="chttp://www.cwdjr.net/ram/caligari.rmvb" > region="video_region" regPoint="middle" title="Cabinet Of Dr Caligari - > RM" begin="4s" /> > <brush color="teal" region="brush_region_1" begin="0s" end="7s" /> > <brush color="fuchsia" region="brush_region_2" begin="0.5s" end="9s" /> > <brush color="olive" region="brush_region_3" begin="1s" end="5s" /> > <brush color="red" region="brush_region_4" begin="1.5s" end="11s" /> > <brush color="purple" region="brush_region_5" begin="2s" end="12s" /> > <brush color="blue" region="brush_region_6" begin="2.5s" end="8s" /> > <brush color="maroon" region="brush_region_7" begin="3s" end="10s" /> > <brush color="navy" region="brush_region_8" begin="3.5s" end="6s" /> > </par> > </seq> > <seq> > <par> > <audio src="chttp://www.cwdjr.net/ram/donkey.wav" title="donkey wav" > begin="7s" /> > <img src="chttp://www.cwdjr.net/pic/horse_fanny3.jpg" > region="video_region" regPoint="middle" transIn="fromBlue" > transOut="toRed" begin="2s" fill="remove" dur="15s" /> > </par> > </seq> > </body> > </smil> > > Of course you would also have to point image files to where you store > these on the computer also if you want to be offline when you play the > media. > > All of these media are designed for progressive download streaming on a > website. Of course you could store all of the media files in the same > directory as the SMIL file and use relative urls to make it more simple > to play offline. However, I did not care to duplicate a lot of long > media files that I already had stored at various locations on the > server. |
Re: how to play different types of audio-video files in the browser?
forgot to add - also on non-IE or non-Windows platforms. - Anil On Dec 27, 7:44 am, anil.r...@gmail.com wrote: > Hello cwdjrxyz, > Ok, I realize I can generate the url dynamically using a > document.write(). > But (important) > How will I control the player programmatically? > Can I control the media player - set/get position, stop, play, pause - > via > Javascript? > thanks, > Anil > > On Dec 26, 5:13 pm, "cwdjrxyz" <spamtr...@cwdjr.info> wrote: > > > > > anil.r...@gmail.com wrote: > > > Hello cwdjrxyz, > > > Thank you for the pointers. > > > Reading through video_multiformat2 source, > > > I am having difficulty with the following: > > > <object data="http://www.cwdjr.net/ram/realmix.rpm" > > > type="audio/x-pn-realaudio-plugin" .... > > > > The plugin is loaded from a remote url. > > > Is there any way to load the player that is installed on the local > > > desktop instead? > > > When disconnected from the internet, the user should still be able to > > > play the AV files.The rpm, with the mime type for it given, is just a standard type of > > Real playlist file. It points to where the actual media file or files > > are stored. This is just standard procedure, and ensures that the > > actual media file gets sent to the real player. The Real developer site > > has more details on Real than most people ever will wish to know, > > including SMIL that Real will play if a SMIL file is directed to it. > > > The rpm file is:http://www.cwdjr.net/ram/realmix.smil > > > In this case it points to the SMIL file at the given url. > > > If you want to play the smill file locally, you just feed the local > > address on the computer where it is stored into the Real Player that > > you have brought up. The SMIL2 file is a type of xml file, and in this > > case is: > > > <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> > > <head> > > <layout> > > <root-layout width="500" height="450" backgroundColor="blue" /> > > <region id="video_region" backgroundColor="blue" z-index="1" /> > > <regPoint id="middle" left="50%" top="50%" regAlign="center" /> > > <region id="brush_region_1" width="25%" height="50%" left="0" top="0" > > z-index="2" /> > > <region id="brush_region_2" width="25%" height="50%" left="25%" top="0" > > z-index="2" /> > > <region id="brush_region_3" width="25%" height="50%" left="50%" top="0" > > z-index="2" /> > > <region id="brush_region_4" width="25%" height="50%" left="75%" top="0" > > z-index="2" /> > > <region id="brush_region_5" width="25%" height="50%" left="0" top="50%" > > z-index="2" /> > > <region id="brush_region_6" width="25%" height="50%" left="25%" > > top="50%" z-index="2" /> > > <region id="brush_region_7" width="25%" height="50%" left="50%" > > top="50%" z-index="2" /> > > <region id="brush_region_8" width="25%" height="50%" left="75%" > > top="50%" z-index="2" /> > > </layout> > > <transition id="fromBlue" type="spiralWipe" subtype="topLeftClockwise" > > dur="5s" /> > > <transition id="fromStar" type="starWipe" subtype="fivePoint" dur="5s" > > /> > > <transition id="fromKeyhole" type="miscShapeWipe" subtype="keyhole" > > dur="5s" /> > > <transition id="fromHexagon" type="hexagonWipe" subtype="vertical" > > dur="5s" /> > > <transition id="fromBarnZigZag" type="barnZigZagWipe" > > subtype="vertical" dur="10s" /> > > <transition id="fromFourBox" type="fourBoxWipe" subtype="cornersIn" > > dur="10s" /> > > <transition id="fromPinWheel" type="pinWheelWipe" subtype="fourBlade" > > dur="5s" /> > > <transition id="fromSnake" type="snakeWipe" subtype="topLeftHorizontal" > > dur="10s" /> > > <transition id="toBlue" type="fade" subtype="fadeToColor" > > fadeColor="blue" dur="5s" /> > > <transition id="toRed" type="fade" subtype="fadeToColor" > > fadeColor="red" dur="5s" /> > > <transition id="toGreen" type="fade" subtype="fadeToColor" > > fadeColor="green" dur="5s" /> > > <transition id="toYellow" type="fade" subtype="fadeToColor" > > fadeColor="yellow" dur="5s" /> > > </head> > > <body> > > <seq> > > <img src="chttp://www.cwdjr.net/ram/roach.gif" id="image1" > > region="video_region" dur="34s" width="256" height="256" left="0" > > top="0" fill="hold" title="The SMIL Bug"> > > <animate targetElement="image1" attributeName="width" from="256" > > to="128" begin="3s" dur="4s" fill="freeze" /> > > <animate targetElement="image1" attributeName="height" values="256;128" > > calcMode="linear" begin="4s" dur="4s" fill="freeze" /> > > <animate targetElement="image1" attributeName="left" to="196" > > begin="9s" dur="4s" fill="freeze" /> > > <animate targetElement="image1" attributeName="top" to="196" > > begin="14s" dur="4s" fill="freeze" /> > > <animateMotion targetElement="image1" to="-128,-128" begin="19s" > > dur="4s" fill="freeze" /> > > <set targetElement="image1" attributeName="left" to="64" begin="24s" > > fill="freeze" /> > > <set targetElement="image1" attributeName="top" to="64" begin="24s" > > fill="freeze" /> > > <animate targetElement="image1" attributeName="height" to="256" > > begin="26s" dur="4s" fill="freeze" /> > > <animate targetElement="image1" attributeName="width" to="256" > > begin="26s" dur="4s" fill="freeze" /> > > <animateMotion targetElement="image1" to="0,0" begin="30s" dur="4s" > > fill="freeze" /> > > </img> > > </seq> > > <seq> > > <par> > > <audio > > src="chttp://www.cwdjr.net/souopera/Tetrazzini_CaroNome_1911.rmj" > > title="Caro Nome RA" author="Tetrazzini" /> > > <img src="chttp://www.cwdjr.net/picsnap/roscoe_foil2.jpg" > > region="video_region" regPoint="middle" transIn="fromBarnZigZag" > > transOut="toGreen" begin="2s" fill="remove" dur="240s" z-index="3" /> > > </par> > > </seq> > > <!-- remove comment tags from around below code to play midi. It is not > > included here as Real may ask you to install the Crescendo plugin to > > play the midi. --> > > <!-- > > <seq> > > <par> > > <audio src="chttp://www.cwdjr.net/ram/cancan.mid" title="Cancan mid" /> > > <img src="chttp://www.cwdjr.net/picani/dancer_blacktights.gif" > > region="video_region" regPoint="middle" transIn="fromStar" > > transOut="toYellow" begin="2s" fill="remove" dur="120s" /> > > </par> > > </seq> > > --> > > <seq> > > <par> > > <audio src="chttp://www.cwdjr.net/souearly/ColumbiaExpositionMarch.wma" > > title="Columbia Exposition March WMA" author="Sousa" /> > > <img src="chttp://www.cwdjr.net/picsnap/roscoe.jpg" > > region="video_region" regPoint="middle" transIn="fromFourBox" > > transOut="toYellow" begin="2s" fill="remove" dur="148s" /> > > </par> > > </seq> > > <seq> > > <par> > > <audio src="chttp://www.cwdjr.net/ram/SidewalksOfNewYork.mp3" > > title="Sidewalks Of New York MP3" /> > > <img src="chttp://www.cwdjr.net/pic3/burlesque_house2.jpg" > > region="video_region" regPoint="middle" transIn="fromSnake" > > transOut="toRed" begin="2s" fill="remove" dur="95s" /> > > </par> > > </seq> > > <seq> > > <par> > > <audio src="chttp://www.cwdjr.net/ram/ZarahLeander.ram" title="Zarah > > Leander RA" /> > > <img src="chttp://www.cwdjr.net/ram/aurora5f.jpg" region="video_region" > > regPoint="middle" transIn="fromStar" transOut="toBlue" begin="2s" > > fill="remove" dur="158s" /> > > </par> > > </seq> > > <seq> > > <video src="chttp://www.cwdjr.net/ram/eyeslicesmall.ram" > > region="video_region" regPoint="middle" title="eye slice - RM" > > transIn="fromPinWheel" transOut="toRed" begin="2s" fill="remove" > > dur="70s" /> > > </seq> > > <seq> > > <video src="chttp://www.cwdjr.net/ram/pianopullsmall.ram" > > region="video_region" regPoint="middle" title="piano pull - RM" > > transIn="fromHexagon" transOut="toRed" begin="2s" fill="remove" > > dur="119s" /> > > </seq> > > <seq> > > <video src="chttp://www.cwdjr.net/ram/Nosferatu.rmvb" > > region="video_region" regPoint="middle" title="Nosferatu - RM" > > transIn="fromStar" transOut="toRed" begin="2s" fill="remove" dur="175s" > > /> > > </seq> > > <seq> > > <par> > > <video src="chttp://www.cwdjr.net/ram/caligari.rmvb" > > region="video_region" regPoint="middle" title="Cabinet Of Dr Caligari - > > RM" begin="4s" /> > > <brush color="teal" region="brush_region_1" begin="0s" end="7s" /> > > <brush color="fuchsia" region="brush_region_2" begin="0.5s" end="9s" /> > > <brush color="olive" region="brush_region_3" begin="1s" end="5s" /> > > <brush color="red" region="brush_region_4" begin="1.5s" end="11s" /> > > <brush color="purple" region="brush_region_5" begin="2s" end="12s" /> > > <brush color="blue" region="brush_region_6" begin="2.5s" end="8s" /> > > <brush color="maroon" region="brush_region_7" begin="3s" end="10s" /> > > <brush color="navy" region="brush_region_8" begin="3.5s" end="6s" /> > > </par> > > </seq> > > <seq> > > <par> > > <audio src="chttp://www.cwdjr.net/ram/donkey.wav" title="donkey wav" > > begin="7s" /> > > <img src="chttp://www.cwdjr.net/pic/horse_fanny3.jpg" > > region="video_region" regPoint="middle" transIn="fromBlue" > > transOut="toRed" begin="2s" fill="remove" dur="15s" /> > > </par> > > </seq> > > </body> > > </smil> > > > Of course you would also have to point image files to where you store > > these on the computer also if you want to be offline when you play the > > media. > > > All of these media are designed for progressive download streaming on a > > website. Of course you could store all of the media files in the same > > directory as the SMIL file and use relative urls to make it more simple > > to play offline. However, I did not care to duplicate a lot of long > > media files that I already had stored at various locations on the > > server.- Hide quoted text -- Show quoted text - |
Re: how to play different types of audio-video files in the browser?
anil.rita@gmail.com wrote: > Hello cwdjrxyz, > Ok, I realize I can generate the url dynamically using a > document.write(). > But (important) > How will I control the player programmatically? > Can I control the media player - set/get position, stop, play, pause - > via > Javascript? If you remain only on IE browsers with ActiveX on, Microsoft has some information on their developer site for controlling the WMP directly using scripts. They may use Jscript and sometimes VB script(which does not work on many other browsers). Microsoft does an extremely poor job of showing how to use their player in general, and scripting to control it, for non-IE browsers, and they use such outlandish things as an embed tag that is not, and never has been, an official W3C tag. A few years ago I used some Microsoft scripts to detect the presence and version of the WMP. This failed without warning on the upgrade to the WMP10. I had to change many web pages. Since then I avoid Microsoft scripts for controlling their player like the plague. I see no need to do so. I do not think media should usually be autostarted - that annoys many people. If you use the player object that I use, it generates the payer control panel with controls to stop, start, pause, etc. If you are determined to have the player autostart on audio and play until finished without user control, you can reduce the player size to about 1 x 1 pixel so that it does not show and set the autostart parameter to 1 instead of 0 to autostart. Then if you are using a mixture of WMP, Real, QT, etc players, the Microsoft player scripting is not going to control these except in a few special cases when one has added an ActiveX plugin for the WMP to a Mozilla family browser. Netscape at one time had a script, that was huge, to detect if the ActiveX plugin was added to their browser, and to control playing on the Netscape browser. Unfortunately it is extremely difficult to detect what browser you have using script, and subject to failure at any time, because many browsers can report themselves as other browsers when you use script detection. This is done to prevent being locked out of a page because the developer of the page only considers IE ,and perhaps Netscape, and locks out everything else when the Browser such as Opera or Firefox may indeed be able to handle the page with few or no problems. |
Re: how to play different types of audio-video files in the browser?
Hello, I am controlling the default media player from an application - not directly by the user. Think of it as an application for user training. thanks, Anil On Dec 27, 11:11 am, "cwdjrxyz" <spamtr...@cwdjr.info> wrote: > anil.r...@gmail.com wrote: > > Hello cwdjrxyz, > > Ok, I realize I can generate the url dynamically using a > > document.write(). > > But (important) > > How will I control the player programmatically? > > Can I control the media player - set/get position, stop, play, pause - > > via > > Javascript?If you remain only on IE browsers with ActiveX on, Microsoft has some > information on their developer site for controlling the WMP directly > using scripts. They may use Jscript and sometimes VB script(which does > not work on many other browsers). Microsoft does an extremely poor job > of showing how to use their player in general, and scripting to control > it, for non-IE browsers, and they use such outlandish things as an > embed tag that is not, and never has been, an official W3C tag. A few > years ago I used some Microsoft scripts to detect the presence and > version of the WMP. This failed without warning on the upgrade to the > WMP10. I had to change many web pages. Since then I avoid Microsoft > scripts for controlling their player like the plague. I see no need to > do so. I do not think media should usually be autostarted - that annoys > many people. If you use the player object that I use, it generates the > payer control panel with controls to stop, start, pause, etc. If you > are determined to have the player autostart on audio and play until > finished without user control, you can reduce the player size to about > 1 x 1 pixel so that it does not show and set the autostart parameter to > 1 instead of 0 to autostart. Then if you are using a mixture of WMP, > Real, QT, etc players, the Microsoft player scripting is not going to > control these except in a few special cases when one has added an > ActiveX plugin for the WMP to a Mozilla family browser. Netscape at one > time had a script, that was huge, to detect if the ActiveX plugin was > added to their browser, and to control playing on the Netscape browser. > Unfortunately it is extremely difficult to detect what browser you have > using script, and subject to failure at any time, because many browsers > can report themselves as other browsers when you use script detection. > This is done to prevent being locked out of a page because the > developer of the page only considers IE ,and perhaps Netscape, and > locks out everything else when the Browser such as Opera or Firefox may > indeed be able to handle the page with few or no problems. |
Re: how to play different types of audio-video files in the browser?
Hello cwdjrxyz, Your post is not clear to me. As I understand it, please correct me, without ActiveX, one cannot control the Windows Media Player from JavaScript? thanks, Anil P.S. I found these links - are they different from your post? http://developer.apple.com/documenta...ipt/index.html http://forums.mozillazine.org/viewto...06213#CheckWMP On Dec 27, 11:11 am, "cwdjrxyz" <spamtr...@cwdjr.info> wrote: > anil.r...@gmail.com wrote: > > Hello cwdjrxyz, > > Ok, I realize I can generate the url dynamically using a > > document.write(). > > But (important) > > How will I control the player programmatically? > > Can I control the media player - set/get position, stop, play, pause - > > via > > Javascript?If you remain only on IE browsers with ActiveX on, Microsoft has some > information on their developer site for controlling the WMP directly > using scripts. They may use Jscript and sometimes VB script(which does > not work on many other browsers). Microsoft does an extremely poor job > of showing how to use their player in general, and scripting to control > it, for non-IE browsers, and they use such outlandish things as an > embed tag that is not, and never has been, an official W3C tag. A few > years ago I used some Microsoft scripts to detect the presence and > version of the WMP. This failed without warning on the upgrade to the > WMP10. I had to change many web pages. Since then I avoid Microsoft > scripts for controlling their player like the plague. I see no need to > do so. I do not think media should usually be autostarted - that annoys > many people. If you use the player object that I use, it generates the > payer control panel with controls to stop, start, pause, etc. If you > are determined to have the player autostart on audio and play until > finished without user control, you can reduce the player size to about > 1 x 1 pixel so that it does not show and set the autostart parameter to > 1 instead of 0 to autostart. Then if you are using a mixture of WMP, > Real, QT, etc players, the Microsoft player scripting is not going to > control these except in a few special cases when one has added an > ActiveX plugin for the WMP to a Mozilla family browser. Netscape at one > time had a script, that was huge, to detect if the ActiveX plugin was > added to their browser, and to control playing on the Netscape browser. > Unfortunately it is extremely difficult to detect what browser you have > using script, and subject to failure at any time, because many browsers > can report themselves as other browsers when you use script detection. > This is done to prevent being locked out of a page because the > developer of the page only considers IE ,and perhaps Netscape, and > locks out everything else when the Browser such as Opera or Firefox may > indeed be able to handle the page with few or no problems. |
Re: how to play different types of audio-video files in the browser?
Quicktime recommends using *both* EMBED and OBJECT tags. However you are using only OBJECT? - Anil On Dec 30, 10:48 am, anil.r...@gmail.com wrote: > Hello cwdjrxyz, > Your post is not clear to me. > As I understand it, please correct me, without ActiveX, one cannot > control the Windows Media Player from JavaScript? > thanks, > Anil > P.S. I found these links - are they different from your post?http://developer.apple.com/documenta...06213#CheckWMP > > On Dec 27, 11:11 am, "cwdjrxyz" <spamtr...@cwdjr.info> wrote: > > > > > anil.r...@gmail.com wrote: > > > Hello cwdjrxyz, > > > Ok, I realize I can generate the url dynamically using a > > > document.write(). > > > But (important) > > > How will I control the player programmatically? > > > Can I control the media player - set/get position, stop, play, pause - > > > via > > > Javascript?If you remain only on IE browsers with ActiveX on, Microsoft has some > > information on their developer site for controlling the WMP directly > > using scripts. They may use Jscript and sometimes VB script(which does > > not work on many other browsers). Microsoft does an extremely poor job > > of showing how to use their player in general, and scripting to control > > it, for non-IE browsers, and they use such outlandish things as an > > embed tag that is not, and never has been, an official W3C tag. A few > > years ago I used some Microsoft scripts to detect the presence and > > version of the WMP. This failed without warning on the upgrade to the > > WMP10. I had to change many web pages. Since then I avoid Microsoft > > scripts for controlling their player like the plague. I see no need to > > do so. I do not think media should usually be autostarted - that annoys > > many people. If you use the player object that I use, it generates the > > payer control panel with controls to stop, start, pause, etc. If you > > are determined to have the player autostart on audio and play until > > finished without user control, you can reduce the player size to about > > 1 x 1 pixel so that it does not show and set the autostart parameter to > > 1 instead of 0 to autostart. Then if you are using a mixture of WMP, > > Real, QT, etc players, the Microsoft player scripting is not going to > > control these except in a few special cases when one has added an > > ActiveX plugin for the WMP to a Mozilla family browser. Netscape at one > > time had a script, that was huge, to detect if the ActiveX plugin was > > added to their browser, and to control playing on the Netscape browser. > > Unfortunately it is extremely difficult to detect what browser you have > > using script, and subject to failure at any time, because many browsers > > can report themselves as other browsers when you use script detection. > > This is done to prevent being locked out of a page because the > > developer of the page only considers IE ,and perhaps Netscape, and > > locks out everything else when the Browser such as Opera or Firefox may > > indeed be able to handle the page with few or no problems.- Hide quoted text -- Show quoted text - |
| All times are GMT. The time now is 04:02 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.