Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next
Trailers resizeable?
Author Message
DVD Profiler Unlimited RegistrantStar ContributorRomzarah
Registered: January 11, 2008
United States Posts: 168
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Hi all.

What I want to do is add code to the script I am using that will give me the ability to change the size of the trailer in the window in my layout. I was thinking it might work with tags, but have no idea where to start in scripting it. Here is the script I am using thanks to mediadogg for writing it. I am trying to do this without a popup.

<html>
<head>
<script type="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</script>
</head>
<body>
<title>Play Trailer</title>
<b><DP NAME="TITLE"></b>
<br />
Released- <DP NAME="RELDATE" YearDigits="">, <DP NAME="PURCHDATE" Prefix="Added- ">
<br /><br />
Collection Number: <DP NAME="COLLNUM">
<br />
<script type="text/javascript">
  var i;
  var path_CollectionNumber = "C:\\Trailers\\" + DP_CollectionNumber;
  for (i = 0; i < DP_Tags.length; i++)
    {
        if  (DP_Tags[i].toLowerCase()  == "trailer/mov"){ document.write("<br/><a href=\""+path_CollectionNumber + ".mov\">Play MOV Trailer</a>");}
      if  (DP_Tags[i].toLowerCase() == "trailer/avi"){ document.write("<br/><a href=\""+path_CollectionNumber + ".avi\">Play AVI Trailer</a>");}
      if  (DP_Tags[i].toLowerCase()  == "trailer/flv"){document.write("<br/><a href=\""+path_CollectionNumber + ".vob\">Play FLV Trailer</a>");}
      if  (DP_Tags[i].toLowerCase() == "trailer/wmv"){document.write("<br/><a href=\""+path_CollectionNumber + ".wmv\">Play WMV Trailer</a>");}
  }
</script>
<br />
<br />
<DP NAME="FEATURES"><DP NAME="OTHERFEATURES">
<br /><br />
<DP NAME="CAST"  MaxList="12"  ShowRoles="YES"  Divider=" ,<BR>  ">
<br /><br />
</body>
</html>


And this is a thought on how the tags could be setup.

Trailers

      640x272

      480x204

      320x136
DVD Profiler Unlimited Registrantxyrano
41215.reg 70320.urk
Registered: March 13, 2007
Sweden Posts: 646
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Not possible, because the instant you click the link you are replacing the code with the video, thus any control over the video size is lost.

My Episode Guide Loader uses a technique that allows the EPGL to maintain control over the Episode Guide that is loaded. Please, check it out, to figure out how to maintain control over the video size.
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting xyrano:
Quote:
My Episode Guide Loader uses a technique that allows the EPGL to maintain control over the Episode Guide that is loaded. Please, check it out, to figure out how to maintain control over the video size.

Amazing!!!! 
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
DVD Profiler Unlimited RegistrantVittra
O.o
Registered: September 29, 2008
United States Posts: 384
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Not sure which you are asking. To be able to have your 3 different resolutions of trailers play in their respective sized Trailer windows? For example clicking on the larger trailer will make the Trailers window larger.

Or are you trying to have any resolution you pick to play within the window you have created regardless of the resolution of the trailer? I have a code that will play a trailer within a window which you can size to your liking, and regardless of how large of a resolution the video file is, it will always play within the size parameters you have set.

My Trailers window is part of my Layout so doesn't pop up. It's just another Tab that I click on to bring up the media player within that HTML window. If this is what you're asking, I'll see if I can help you out.
"The perfect is the enemy of the good." - Voltaire
DVD Profiler Unlimited RegistrantStar ContributorRomzarah
Registered: January 11, 2008
United States Posts: 168
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Vittra

Yes this is what I am looking for, what you say in this line.

"I have a code that will play a trailer within a window which you can size to your liking, and regardless of how large of a resolution the video file is, it will always play within the size parameters you have set."

Thanks for the reply.
DVD Profiler Unlimited RegistrantVittra
O.o
Registered: September 29, 2008
United States Posts: 384
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Okay, here's the code that I use.

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_CollectionNumber + '.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_CollectionNumber + '.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;
      case "Trailer/MP4":
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_CollectionNumber + '.mp4"><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/FLV":
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_CollectionNumber + '.flv"><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>



I bolded the parts that might have to be changed for your setup.

Step 1: "Trailer/???" would be the tags you have setup and are case sensitive. So in my code I have a parent tag of "Trailer" and child tags of "WMV", "MP4", "FLV", and "MOV". From your previous code you posted I believe all yours are lower case. If you wish to not change your tags go into the code I posted and change all 4 to match what you have.

Step 2: Check to see the path is correct. In my code I bolded "C:/Trailers/". If you have your trailers in a different path be sure to change it in all 4 video types. For example "C:/Documents and Settings/Romzarah/My Documents/Trailers/", if you happen to put them somewhere else. Be sure you put the correct "/"'s, I don't believe "\"'s will work or maybe "\\" each would be necessary. Anyway, not important.

I noticed on your code you have "flv" movie files with the extension of ".vob". Check to be sure you actually have ".vob" files and not ".flv" files. If you have both, you can easily add another tag "VOB" and another line of code and change the respective information that's specific to that file type. If you need help with this, let me know.

Step 3: Test it with a WMV file. Doesn't have to be a trailer since they seem to be harder to find in WMV format. Just download any WMV file as if it were a trailer and test out your window to be sure it can play that type of file. Set the file name to your "Collection Number" as you've been doing previously. Set the "Trailer" and "WMV" tags. Be sure to switch to another profile then back again for the Windows Media Player to show up (only need to do this if you just set the tags). If you tested WMV files and it works, you have a working window.

Step 4: Test all the other media types. Getting WMP to play .mov files is the most difficult. This is what I did. I found the codec to make all file types work HERE. Just click on "Download D-Lite Codec Pack" and be sure to download the "FULL" not the "BASIC" or "STANDARD". 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'm not positive all this is necessary to get them to work but it worked for me so I'm just giving you the information.

Step 5: Now that you have a working window (hopefully), pull it up on profiler and move it to where you want it. This is what mine looks like.


Adjust the size of your window to perfectly fit the spot you picked by adjusting the two numbers I've bolded in each of the 4 file types. It's time consuming since you have to go in, Edit, then Exit, and Test with each change to be sure it's window size is getting closer. After a dozen or so adjustments you should be able to get the numbers perfect so you have no gaps around your Media Player Window like in the picture of mine.

Step 6: Breath a sigh of relief and SAVE YOUR LAYOUT!! Very important. If you close your Profiler it doesn't save all those changes you've done and boy does it stink to have to do that all over again (From personal experience  ).

I've also uploaded my layout if you want to download it. It's under my name and "For Large Screen + Trailers HTML (v 1.00)". It might also contain a few other things you might not want since I'm not exactly sure what's uploaded when you do that. I've used the translation files to change "Wishlist" to Video Games and have a specific image file set for my background in the HTML Overview. Those might or might not show up.

Anyway, hope all that helps. Sorry for the HUGE post but feel free to reply if you need any more assistance or if I haven't been too clear in my instructions.
"The perfect is the enemy of the good." - Voltaire
 Last edited: by Vittra
DVD Profiler Unlimited RegistrantStar ContributorRomzarah
Registered: January 11, 2008
United States Posts: 168
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Vittra

Thank you so much, I got the script working and it's what I needed. Now if I could find a good place to download HD trailers.  
DVD Profiler Unlimited RegistrantFrodonf
Registered: March 14, 2007
Canada Posts: 225
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Thanks a lot for the code, it seems to work very well

If I want to use something other than the collection number to name my trailers, I guess I have to change "DP_CollectionNumber" with something else.

What should I use if I name the trailers with the Title or the cup ?
Certainty of death...
Small chance of success...
What are we waiting for ?!
DVD Profiler Unlimited RegistrantVittra
O.o
Registered: September 29, 2008
United States Posts: 384
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
You're both very welcome.  Glad it worked out for ya. 

Quoting Frodonf:
Quote:
Thanks a lot for the code, it seems to work very well

If I want to use something other than the collection number to name my trailers, I guess I have to change "DP_CollectionNumber" with something else.

What should I use if I name the trailers with the Title or the cup ?


As for changing "DP_CollectionNumber" you can change it to "DP_UPC" which will work. Only problem with that is for titles in which they only have Disc IDs. I used to use DP_UPC and then ran into my first box set and it messed it all up. 

"DP_Title" will work but I believe you have to remove illegal file name characters which can be troublesome such as "/, :, \, etc.". I haven't tested it but try replacing all the "DP_CollectionNumber"
with "DP_Title.replace(/[\/\\:\*\?"<>|]/g,'')". I believe this ignores those types of characters in a title. So for example if your title is "Blah/Blah" then your file name would be "BlahBlah". At least that's how I believe it works.

The last " isn't a quotation mark it's two '. Putting a _ between the two ' like this: "DP_Title.replace(/[\/\\:\*\?"<>|]/g,'_')" would replace all those characters with _. So "Blah/Blah" file name would be "Blah_Blah".

Hope all that makes sense. The DP_Title thing I posted wasn't my idea. Another member on these forums wrote it so like I said, I haven't tested it. Guy's name is FredLooks though so if you're having trouble with it you can try shooting him a PM. 
"The perfect is the enemy of the good." - Voltaire
DVD Profiler Unlimited RegistrantVittra
O.o
Registered: September 29, 2008
United States Posts: 384
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Romzarah:
Quote:
Vittra

Thank you so much, I got the script working and it's what I needed. Now if I could find a good place to download HD trailers.  


Not all titles have HD trailers, but this was a site recommended to me.

HERE

Some are broken links too I've noticed. But you should at least be able to get HD versions of just about any semi recent release. 
"The perfect is the enemy of the good." - Voltaire
DVD Profiler Unlimited RegistrantStar ContributorRomzarah
Registered: January 11, 2008
United States Posts: 168
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Thanks for the link, I'll see what I can find there. Oh well Apple.com links, can't find a way to download them. They want you to buy their player to get the downloads.
 Last edited: by Romzarah
DVD Profiler Unlimited RegistrantVittra
O.o
Registered: September 29, 2008
United States Posts: 384
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Most of them if by clicking on them pulls up the video you can right click and "Save link as" or "Save target as", depending on your browser. I'll try that and if it saves a large file, that means I got the trailer, if it's super small it's just a web link and that means the file is no longer available. Unfortunately there's a lot of those. Another place I go is HERE. Some are going to be the same links though since apple tends to have a ton of trailers.

I've yet to find a definitive source for trailers though so I'll google quite a bit. 
"The perfect is the enemy of the good." - Voltaire
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next