Skip to content
WJunction - Webmaster Forum

Embed video Player changer from player 1 to player 2 by clicking button.

Status
Not open for further replies.

coolmrrocky

Established Member
302
2016
14
i dont have knowledge on php too much, i need help guys, i have a website - watchmoviezz.com [adult] i embed video player from thirdparty hosting. so i need a button below player when user click on this button then first embed player replace by 2nd one in same place. plz help guys i am waiting . thanx
 

3 comments

Thats a Theme feature Yes You can do It with plugin if you know How to although You can Use tabs feature Install Shortcode Ultimate and Use Tabs Shortcode
 
html code:
<button onClick="changevid('http://www.w3.com/html/mov_bbb.mp4')">Video 1</button>
<button onClick="changevid('http://www.w3.com/tags/movie.mp4')">video 2</button>
<button onClick="changevid('vid/Video3.mp4')">Video 3</button>
<button onClick="changevid('vid/Video4.mp4')">video 4</button>


<video controls id="change">




javascript code:
function changevid(buttonlink) {
document.getElementById('change').src = buttonlink;
}

In HTML code you can refer any of the video link


By this code when clicking on video button continuously the video will get changed.
 
Status
Not open for further replies.

About the author

C
Established Member · Joined
Webmaster
302
Messages
14
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom