top of page
Home
Services
Testimonials
Get a Quote
Forum
My theme
Examples
Suggest an app
Custom Menu bar
Multiple Filter
Print page
Horizontal scrolling
Wix Code Style
Wix video player code
Multiple Uploads
More
Use tab to navigate through the menu items.
{
Salman
}
Home
Services
Testimonials
Get a Quote
Forum
My theme
Examples
Suggest an app
Custom Menu bar
Multiple Filter
Print page
Horizontal scrolling
Wix Code Style
Wix video player code
Multiple Uploads
More
Use tab to navigate through the menu items.
Toggle Play
Play Time 0 s
$w.onReady(function () { let time, maxTime; init(); $w('#button3').onClick(() => { $w('#videoPlayer2').togglePlay(); }); $w('#videoPlayer2').onPlay(() => { loop(); $w('#button3').label = 'Playing...' }); $w('#videoPlayer2').onPause(() => { $w('#button3').label = 'Paused' }); $w('#videoPlayer2').onEnded(() => { console.log('end!') $w('#slider1').value = 0; $w('#button3').label = 'Play again!' }); $w('#slider1').onChange(() => { $w('#videoPlayer2').seek($w('#slider1').value); }); function init() { time = $w('#videoPlayer2').currentTime; maxTime = $w('#videoPlayer2').duration; $w('#slider1').min = 0; $w('#slider1').max = maxTime; $w('#slider1').step = 1; $w('#slider1').value = time; } function loop() { let interval = setInterval(() => { if ($w('#videoPlayer2').isPlaying) { time = $w('#videoPlayer2').currentTime; $w('#slider1').value = Math.round(time); } else { clearInterval(interval); console.log('Time out is cleared!'); } }, 1000); } });
bottom of page