Author |
Message |
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | been trying to add movie trailers by embeding media player into an html window in dvd profiler 3.1 with the code below...but it does not work. can anyone shed some light? im using trailers which i have located on my hard disk.
thanks in advance
<HTML> <HEAD>
<SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT>
</HEAD> <BODY>
<OBJECT id="VIDEO" width="640" height="480" style="position:absolute; left:0;top:0;" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"> <PARAM NAME="URL" VALUE="D:/Movie Trailers/"+title+".divx"> <PARAM NAME="AutoStart" VALUE="True"> <PARAM name="uiMode" value="mini"> <PARAM name="PlayCount" value="1"> </OBJECT> </BODY> </HTML> | | | Last edited: by _anthony |
|
Registered: March 13, 2007 | Posts: 2,692 |
| Posted: | | | | have a look at this thread.. hereI believe that covers what you want to do.. | | | Paul | | | Last edited: by pauls42 |
|
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | thank u for your reply pauls42 i did have a search of the forums prior to me posting and i counldn't find what i was looking for. i dont want to place a link in the notes section for all the dvds i own. i want it to do it automatically by the title name.
so if someone can help me with the code or point me to a specific location that would be appreciated. if you havent guessed by now im not much of a coder. |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | Try hereIt isnt embedded in the html window tho, it launches in a media player. btw if all your trailers are the same file type it would be even simpler than that. |
|
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | thanks MarEll had a read through but i still couldnt get it to work. i mangaged to get the link to display but it could not find the video files. i think its a bug.
also not really after just a link. want to embed media player and have it play through that rather than clcking on a link and then play throuh the media player
more help and suggestions welcome |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | Your sample code says:
<PARAM NAME="URL" VALUE="D:/Movie Trailers/"+title+".divx">
(among other things). Since this isn't inside a script tag, it likely won't do what you want (ie. it won't create a filepath). Why not try to replace that particular line with:
<script type="text/javascript">document.write('<PARAM NAME="URL" VALUE="D:/Movie Trailers/'+title+'.divx">');</script>
and see if that works any better. | | | -fred |
|
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | Thanks FredLooks
Now we are getting somewhere. However I am still no able to play the trailer. Does not seem to find the location, but media player now show up in the html window. Thanks for that. Here is the full code. U seem to know what u r talking about as opposed to me who tries to feel his way through. lol
<HTML> <HEAD>
</Head> <BODY>
<OBJECT id="VIDEO" width="640" height="480" style="position:absolute; left:0;top:0;" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"> <script type="text/javascript">document.write('<PARAM NAME="URL" VALUE="D:/Movie Trailers (Divx)/'+title+'.divx">');</script> <PARAM NAME="AutoStart" VALUE="False"> <PARAM name="uiMode" value="mini"> <PARAM name="PlayCount" value="1"> </OBJECT> </BODY> </HTML> |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | That looks ok to me. If you run windows explorer, and browse to one of those trailers, and right-click on it and select properties, what does it say the name of the trailer is? Does that match up with what your script constructs for the name? If you double-click on the trailer, does it start? And does it start in Media player?
Sorry, but my work machine is a mac and I can't check some of those things, like if that CSLID corresponds to media play (I guess it does or media player wouldn't start), or if Media Player will tell you what file it is trying to play (to see if the names match). | | | -fred |
|
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | Yeah all the details are correct FredLooks.
The trialer files do open up in windows media players when clicked upon. Yep all the names match too. |
|
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | okies now i've tried Goggling it but to no avail. You see the code seems to be the same with everyone else too.
Not sure how to get it working. Could it be DVD Profiler 3.1 as most of my previous skins that I downloaded worked fine with 3.0 but now they don't with 3.1 they come up with script errors and stuff like that.
If the line in the code read like this for example it plays that particular movie but only that particular movie so the destination is correct.
<PARAM NAME="URL" VALUE="D:/Movie Trailers (Divx)/underworld.divx">
but if i were to change the code to this it does not work <PARAM NAME="URL" VALUE="D:/Movie Trailers (Divx)/+'title'+.divx">
even after FredLooks advice changing the code to this
<script type="text/javascript">document.write('<PARAM NAME="URL" VALUE="D:/Movie Trailers (Divx)/underworld.divx">');</script>
or the code to this
<script type="text/javascript">document.write('<PARAM NAME="URL" VALUE="D:/Movie Trailers (Divx)/'+title+'.divx">');</script>
neither or them worked. Any ideas anyone
Thanks in advance
Anthony |
|
Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | I'm not at home, so can't check this, but it looks to me that the value "title" is undefined.
Try using DP_Title instead.
You'll also need to make sure that the "edition" section of the title doesn't get added either.
I'm afraid I can't be any more help till I get home tonight - sorry! |
|
Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | OK, I've done some fiddling. Turns out the OBJECT value didn't like having the script in the middle, but it works if the whole thing is inside the script. Try this:
<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="640" height="480" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">') document.write('<PARAM NAME="URL" VALUE="D:/Movie Trailers (Divx)/' + DP_Title + '.divx"><PARAM NAME="AutoStart" VALUE="False">') document.write('<PARAM name="uiMode" value="mini"><PARAM name="PlayCount" value="1"></OBJECT>') </SCRIPT> </BODY> </HTML>
Please note there is no error checking in this script, it assumes that there will always be a trailer there. |
|
Registered: May 18, 2007 | Posts: 10 |
| Posted: | | | | Yes that worked. Thank You for your help northbloke, very much appreciated.
Anthony |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | Is there any way to have the window only display if there is a trailer? Or a tag enabled? |
|
Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | Quoting MarEll: Quote: Is there any way to have the window only display if there is a trailer? Or a tag enabled? Probably, but as I'm at work now and I'm out tonight, it ain't gonna get done soon! | | | Last edited: by northbloke |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | I'm chagrined I should have noticed that the script was in the middle of the object. My apologies ... | | | -fred |
|