Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Javascript controls for embedded quicktime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Javascript controls for embedded quicktime



Does anyone have any experience with building movie "progress sliders" and volume "sliders" for custom Javascript controls?  I have the following functions that are for use with Windows Media and i'm hoping to do something similar...


function volslider() {
  var sliderEl2=document.getElementById ? document.getElementById('vslider') : null;
  var inputEl2=document.forms[0]['vslider-input'];
  var s2=new Slider(sliderEl2,inputEl2);
  s2.onchange=function() {
    document.wMediaPlayer.settings.volume=s2.getValue();
  }
  var cvol=document.wMediaPlayer.settings.volume;
  s2.setValue(cvol);
}

function seekslider() {
	s.onchange=function() {
		var canseek=document.wMediaPlayer.controls.isAvailable('currentPosition');
		if(canseek) {
			var tlen=document.wMediaPlayer.currentMedia.duration;
			var svalue=s.getValue();
			if(svalue!=seekpos) document.wMediaPlayer.controls.currentPosition=tlen*svalue/100;
		}
	}
}

function update() {
  cposition=Math.ceil(document.wMediaPlayer.controls.currentPosition);
  clen=document.wMediaPlayer.currentMedia.duration;
  if(lastvalue!=cposition) remtime.innerHTML=hms(cposition)+'';
  lastvalue=cposition;
  if(s) {
    seekpos=Math.ceil(document.wMediaPlayer.controls.currentPosition/clen*100);
    s.setValue(seekpos);
  }
}
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.