Author |
Message |
Registered: September 29, 2008 | Posts: 384 |
| Posted: | | | | Hey all, I'm aware that the subject of getting trailers to work is covered pretty often here but I'm happy to say I can get trailers to play just fine so this is not the area I need help with. I do need some help making this window better though and curious if what I'm asking is even possible. I don't know much about HTML but trying to customize a few windows I've learned a little but keep that in mind when you are trying to help me...I'm about as novice as one can be. Here's the original code I'm using: <HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT> <SCRIPT language=javascript> window.onload = window_onload; function window_onload() { var i; myloop: for (i = 0; i < DP_Tags.length; i++) { switch (DP_Tags[i]) { case "Trailer/WMV": idPlay.href = "C:\\Trailers\\" + DP_UPC + ".wmv"; break myloop; case "Trailer/MOV": idPlay.href = "C:\\Trailers\\" + DP_UPC + ".mov"; break myloop; case "Trailer/VOB": idPlay.href = "C:\\Trailers\\" + DP_UPC + ".vob"; break myloop; } } if (i >= DP_Tags.length) { idPlay.removeNode(true); } } </SCRIPT> </HEAD> <BODY> <A id=idPlay href="#">Play Trailer</A> </BODY> </HTML> I would like to be able to have the trailer auto fit to the window size that I'm using. Much like the Gallery feature, I'd like to add another Tab labeled "Trailers" but when I download a higher resolution trailer, the sides of the video are off the screen due to the space I've allowed for it. I'd rather not have a separate window pop up for the trailer. Ideally having it auto size to the window size that I have allowed it. Secondly, I've been trying to put an image of a Play Button rather than the simple text of "Play Trailer". I've downloaded and added the image I want to use and I can get it to pop up on the html window, but can't get it to activate the playing of said trailer. But I did this by only switching the last line from: <A id=idPlay href="#">Play Trailer</A> to: <center><A id=idPlay href="#"><img src="$DPIMAGES.PlayButton.jpg" border="0" alt="Play Trailer"></A></center> I've also added the "center" tags to have it center horizontally, but I'm also curious if I am able to get the image to center vertically as well. I realize this may be a bit picky since I can get the trailers to play, but any assistance would be much appreciated! | | | "The perfect is the enemy of the good." - Voltaire |
|
Registered: September 29, 2008 | Posts: 384 |
| Posted: | | | | Ok, I figured out why it wouldn't play when I inserted the image, so that's not an issue anymore. So at this point only 2 things:
**Vid to auto-fit to screen size
**Image centered not only vertically, but horizontally | | | "The perfect is the enemy of the good." - Voltaire |
|
Registered: September 29, 2008 | Posts: 384 |
| Posted: | | | | Figured out how to both vertically and horizontally center something by searching online...so now I'm down to only the auto-fit thing. Here's another question though. If having a vid auto fit to the window size isn't possible (which the more I think about it I'm thinking that is the case), is there a way to change the background color that is not taken up by the video to black instead of the default white? I've done some searches on it and it seems it's possible for on Quicktime to do it, but I have no idea where or how to insert the code to change the color. There's a link to the code HERE, it's the 3rd one down. Any help would be appreciated! | | | "The perfect is the enemy of the good." - Voltaire |
|
Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | Quoting Vittra: Quote: Here's another question though. If having a vid auto fit to the window size isn't possible (which the more I think about it I'm thinking that is the case), is there a way to change the background color that is not taken up by the video to black instead of the default white? <BODY style="background-color: black;"> ...might do the trick! I don't think the auto-fit thingie will work since there isn't a embed or object tag in the code. In dvdp's case you'd want the object tag since embed is for mozilla based browsers. I bet the object tag has some way to do a auto-fit on its content. |
|
Registered: September 29, 2008 | Posts: 384 |
| Posted: | | | | Quoting xyrano: Quote: Quoting Vittra:
Quote: Here's another question though. If having a vid auto fit to the window size isn't possible (which the more I think about it I'm thinking that is the case), is there a way to change the background color that is not taken up by the video to black instead of the default white? <BODY style="background-color: black;"> ...might do the trick!
I don't think the auto-fit thingie will work since there isn't a embed or object tag in the code. In dvdp's case you'd want the object tag since embed is for mozilla based browsers. I bet the object tag has some way to do a auto-fit on its content. Thanks xyrano! I had almost given up on getting a response since I kept finding my own answers... I'll try what you suggested, but where exactly would I put that code you suggested? Before the script tags? after? I have been able to change the background color before the movie starts, just not after. As it stands right now I have the following: <HTML> <HEAD> <STYLE> BODY { padding: 0px; margin: 0px; background-color: #000000; background-repeat: repeat-x; background-image:url($DPIMAGES.DarkDecay2.jpg); } </STYLE> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT> <SCRIPT language=javascript> window.onload = window_onload; function window_onload() { var i; myloop: for (i = 0; i < DP_Tags.length; i++) { switch (DP_Tags[i]) { case "Trailer/WMV": idPlay.href = "C:\\Trailers\\" + DP_UPC + ".wmv"; break myloop; case "Trailer/MOV": idPlay.href = "C:\\Trailers\\" + DP_UPC + ".mov"; break myloop; case "Trailer/VOB": idPlay.href = "C:\\Trailers\\" + DP_UPC + ".vob"; break myloop; } } if (i >= DP_Tags.length) { idPlay.removeNode(true); } } </SCRIPT> </HEAD> <BODY> <table width="100%" height="100%" valign="middle"> <tr> <td> <center> <A id=idPlay href="#"><img src="$DPIMAGES.PlayButton.jpg" border="0" alt="Play Trailer"></A> </center> </td> </tr> </table> </BODY> </HTML> This gives me a custom background for the window and an image of a Play Button that I downloaded that's centered on the screen. But as soon as I hit the play button, and the Quicktime Plugin loads, the background jumps to white which I believe is Quicktime's default. No matter what I try, it seems this background is always white. If you could point out where to add the tag suggested, that would be great! As for your second paragraph, I'm a little lost. I'm not sure I understand what you mean but I think at this point I've given up on the auto-sizing being possible. I've found a workaround, but would like to get this background image thing figured out. Thanks again for your help! | | | "The perfect is the enemy of the good." - Voltaire | | | Last edited: by Vittra |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | I think what he means is that if you use an embedded player such as WMP or VLC or Quicktime to show the trailer, you will need an object definition that includes size and formatting parameters. There are any number of examples in these threads - I think I even posted an example somewhere a few months back. Not selling, but for your information if it helps, LoadDVD Pro has a built-in embedded player that stays centered and will pop to full screen. You'll only risk a few bucks to try it. Hope I'm not offending anybody to mention this - just trying to help.
I just noticed that I think you are already using the script I was talking about - and it is not the object version. I'll search for one of the examples and repost it or a link to it, unless somebody else beats me to it.
Here is one of the sections I use. It looks for a playlist tied to the UPC in the "\TrailerPark" directory. See the parameters for size and position. You can Google for details on how to use them. Let's see, I think this is the embedded WMP. There are also similar scripts out there for embedded VLC, QuickTime and YouTube.
<HTML> <HEAD>
<SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT>
<HTML> <HEAD>
<SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT>
</HEAD> <BODY> <SCRIPT> document.write('<OBJECT id="VIDEO" style="position:absolute; left:0;top:0;" width="320" height="240" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">') document.write('<PARAM NAME="URL" VALUE="C:/TrailerPark/' + DP_UPC + '.m3U"><PARAM NAME="AutoStart" VALUE="False">') doucument.write('<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">') document.write('<PARAM name="uiMode" value="mini"><PARAM name="PlayCount" value="1"><PARAM name="windowlessVideo" VALUE="True"></OBJECT>') </SCRIPT> </BODY> </HTML> | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: September 29, 2008 | Posts: 384 |
| Posted: | | | | Ah, ok, thanks mediadogg for the explanation. After looking at the html you posted, I already have a version of that html. It does open up WMP which won't play my .mov files. I'll try to do what you suggest and google a bit and see if I can get it to embed Quicktime instead. I feel a lot of this is way over my head but it's fun to experiment. And also I appreciate the recommendation of LoadDVD Pro but at this point, since I can get the trailers to play just fine and it's really only little nit picky things I'm ironing out, I'll have to pass for now. Thanks again! | | | "The perfect is the enemy of the good." - Voltaire | | | Last edited: by Vittra |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Vittra: Quote: I feel a lot of this is way over my head but it's fun to experiment.
Oh, you're welcome. When you mess around with it, you can post your script and we can all learn from your progress and make suggestions. You are not out there alone - we got your back! | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
Registered: September 29, 2008 | Posts: 384 |
| Posted: | | | | Well I finally got the embedded WMP to work, but never could get a Quicktime player to work embedded. The quicktime symbol would pop up but the video wouldn't play for some reason. Finally, after spending all day reading on these forums and searching online I found a codec that allows WMP to play .mov files and a set of html code that worked for me. Figured I'd post it here so that others might be able to save themselves the trouble. And thank you to whomever came up with the original code...I apologize I have no idea who did. Copy and Paste the following: Quote:
<HTML> <HEAD>
<SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT>
</HEAD> <BODY>
<SCRIPT language=javascript> window.onload = window_onload; function window_onload() { var i; myloop: for (i = 0; i < DP_Tags.length; i++) { switch (DP_Tags[i]) { case "Trailer/WMV": document.write('<OBJECT id="VIDEO" style="position:absolute; left:0;top:0;" width="525" height="333" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">') document.write('<PARAM NAME="URL" VALUE="C:/Trailers/' + DP_UPC + '.wmv"><PARAM NAME="AutoStart" VALUE="False">') document.write('<PARAM name="uiMode" value="mini"><PARAM name="PlayCount" value="1"><PARAM NAME="Volume" VALUE="100"></OBJECT>'); break myloop; case "Trailer/MOV": document.write('<OBJECT id="VIDEO" style="position:absolute; left:0;top:0;" width="525" height="333" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">') document.write('<PARAM NAME="URL" VALUE="C:/Trailers/' + DP_UPC + '.mov"><PARAM NAME="AutoStart" VALUE="False">') document.write('<PARAM name="uiMode" value="mini"><PARAM name="PlayCount" value="1"><PARAM NAME="Volume" VALUE="100"></OBJECT>'); break myloop; } }
} </SCRIPT>
</BODY> </HTML>
**First and foremost: Create a parent tag called "Trailers" with two sub-tags "MOV" and "WMV" (see the bolded areas in the HTML code. These are case sensitive, so be sure to match them exactly) **----> C:/Trailers/' + DP_UPC + '.wmv" is where these files are coming from. In my case, I'm using my file names as the DVD's UPC in a folder labeled "Trailers" right inside C:/. You can change "C:/Trailers/" to whatever you want just so long as that's where you're storing your trailers. Be sure to change both instances of it though in the MOV and WMV sections of the above code. **The numbers after "width" and "height" can be changed to whatever value you want so once you decide where you want your window, adjust these numbers accordingly to fit your allowed screen space. The trailer that you've downloaded will be viewed within said window regardless of what it's native resolution is. **Lastly, be sure to set the correct tag that corresponds to your file type. So if you've downloaded a .mov file for Aliens, be sure that movie has both the "MOV" Tag selected. As long as Windows Media Player can play both types of files, then you should have no problem with watching your trailers. If for some reason you are having trouble with .mov files since WMP doesn't play them out of the box, I found the codec to make it work HERE. Just click on the download link and be sure to download the "FULL" not the "BASIC". The basic one didn't work for me the first time. During the installation you will be asked what files you would like to associate with WMP, select Quicktime Files. I realize most of this may seem really easy to many who read this, but I wish I had something like this written out when I first started working on getting trailers to work. I almost gave up on multiple occasions since this is all a foreign language to me. Hope this helps some future users though! | | | "The perfect is the enemy of the good." - Voltaire |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Nice job man!!! I was just about to post a reference to a script made by MarEll on "Posted: October 18, 2008 4:19 PM" in the "adding movie trailers" thread. You might find some more hints to make improvements there, but it seems you are already well on the way. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: January 11, 2008 | Posts: 168 |
| Posted: | | | | Is anyone willing to spend the time to list the steps to add the latest script to a Layout, and the steps to the path this nice little feature need to get it working? Or is Vittra planing to create a Layout for users to download? Please keep in mind that not everyone has tried to build their own Layouts. So try to make it simple. | | | Last edited: by Romzarah |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Romzarah: Quote: Is anyone willing to spend the time to list the steps to add the latest script to a Layout, and the steps to the path this nice little feature need to get it working? Or is Vittra planing to create a Layout for users to download?
Please keep in mind that not everyone has tried to build their own Layouts. So try to make it simple. I got your PM. So now, full circle. Seems to me the steps are laid out already. When you create an HTML section, it becomes part of your layout. Just save the layout to make it recoverable in the future. Other than that, I don't understand what you need. Also, have your tried using the Help, and the FAQ? What you are creating is called an "HTML section." Before I knew how to do it, it was confusing, but I finally bit the bullet and did the homework to figure it out. There is no substitute. But after you try, and you are still having trouble, you need to publish explicit details of what you are doing, including your complete script. No mindreaders here ... | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: January 11, 2008 | Posts: 168 |
| Posted: | | | | Following the posted info here I created the HTML window and added it to my layout. There is not enough info on file naming or if you need to make sub-folders for each trailer. So far I get a blank window with no trailer. |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Romzarah: Quote: Following the posted info here I created the HTML window and added it to my layout. There is not enough info on file naming or if you need to make sub-folders for each trailer. So far I get a blank window with no trailer. Ok, you made your point. Stand your ground. Ignore my advice. Have a nice day and good luck. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
Registered: January 11, 2008 | Posts: 168 |
| Posted: | | | | Advice?
Here I will post the code. It is the same as he posted it with nothing changed.
<HTML> <HEAD>
<SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT>
</HEAD> <BODY>
</BODY> </HTML> <HTML> <HEAD>
<SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT>
</HEAD> <BODY>
<SCRIPT language=javascript> window.onload = window_onload; function window_onload() { var i; myloop: for (i = 0; i < DP_Tags.length; i++) { switch (DP_Tags[i]) { case "Trailer/WMV": document.write('<OBJECT id="VIDEO" style="position:absolute; left:0;top:0;" width="525" height="333" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">') document.write('<PARAM NAME="URL" VALUE="C:/Trailers/' + DP_UPC + '.wmv"><PARAM NAME="AutoStart" VALUE="False">') document.write('<PARAM name="uiMode" value="mini"><PARAM name="PlayCount" value="1"><PARAM NAME="Volume" VALUE="100"></OBJECT>'); break myloop; case "Trailer/MOV": document.write('<OBJECT id="VIDEO" style="position:absolute; left:0;top:0;" width="525" height="333" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">') document.write('<PARAM NAME="URL" VALUE="C:/Trailers/' + DP_UPC + '.mov"><PARAM NAME="AutoStart" VALUE="False">') document.write('<PARAM name="uiMode" value="mini"><PARAM name="PlayCount" value="1"><PARAM NAME="Volume" VALUE="100"></OBJECT>'); break myloop; } }
} </SCRIPT>
</BODY> </HTML> |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Romzarah: Quote: Advice?
Here I will post the code. It is the same as he posted it with nothing changed.
Ok, I'll take your word that this is the exact code you are running, and you didn't fake it by copying and pasting from this thread instead of from your HTML section. If not, you run the rsik of wasting our time. It is entirely possible for a simple mistake cutting and pasting to cause problems. That's why my advice was to for you to post the exact code you are using (not what you think you are using.) Furthermore, there are several different scripts in this thread. Simply saying "I followed those directions and nothing works ..." was useless information. Now if you want to keep up this sarcastic attitude, it's up to you. But that's not the best way to get my help. My first question is, where are your videos stored? You will see in the code "C:/Trailers/' + DP_UPC + '.wmv" that the files need to be in a folder called "Trailers" on the "c:\" drive, each file having a filename of the UPC of the movie, and a filetype of either ".wmv" or ".mov". Futhremore, the profile must have a tag set to "Trailer/WMV" or "Trailer/MOV". I don't see any errors in the script, but hopefully other people will take a look. Please confirm that you have your files named and stored correctly. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|