0

I've got an interesting question.

I am building a website which is all about playing my movies. Found a nice script, which plays .avi files (using windows media player I gues).

Standard buttons won't work with my graphics, and I like to place them somewhere else on my webpage. So I need start/pause/stop buttons, and a button to change volume with 5 different settings. But how do I apply all this without stoping the video... How do I get the buttons to interface with the player.

Here is the code I use for the player, its in HTML, running it on an apache/php/mysql server. All very basic, nothing fancy:

<OBJECT id="VIDEO" width="718" height="600"
style="position:absolute; left:15; top:11; z-index:1"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">

<PARAM NAME="URL" VALUE="example.avi">
<PARAM NAME="AutoStart" VALUE="-1">
<PARAM name="uiMode" value="mini">
<PARAM name="PlayCount" value="9999">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param id="soundvolume" name="volume" value="100">
<param name="mute" value="0">
<param name="stretchToFit" value="-1">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
</OBJECT>

What I've tryed is: function changeId(id) { $("#video param[name=volume]").attr('value', id); }

And also this: // get a reference to the var obj = document.getElementById('video'); // duplicate the var newObj = obj.cloneNode(true); // get a reference to the current var param = document.getElementById('soundvolume'); // duplicate the var newParam = param.cloneNode(true); // change the value of the newParam.setAttribute('value', '1'); // replace the tag on the newObj.replaceChild(newParam, param); // replace the on the page obj.parentNode.replaceChild(newObj, obj);

Tryed playing with these, but no luck so far. Anyone?

Pietertje
  • 43
  • 1
  • 7
  • What script are you using? Please edit that into your question. – Nathan Tuggy Feb 02 '15 at 01:41
  • Think I've edited the question. Using that code as a HTML file. It's between the body tags, but I think it should become javascript somewhere, but I am fairly new to javascript. – Pietertje Feb 02 '15 at 01:47

0 Answers0