Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2011
    Location
    Detroit
    Posts
    78
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Exclamation how can i make a video play in a different location

    I have a list of videos on one side of my page and a larger player in the main content column on the left.
    how can i click a video on the right and have it play in the big player on the left?



    image URL (in case it doesnt show in the post) http://mydomainsample.com/tims/ScreenShot.png

    also i would prefer to do this with links to youtube/vimeo rather than putting video files on my server.
    Last edited by Tim@DIM; 02-02-2012 at 09:57 PM. Reason: image not displaying right

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,915
    Thanks
    56
    Thanked 545 Times in 542 Posts
    what are those on the right side? photos? if they are simple img tags, you can use this code, which works with links, but just moving the onclick over to the img tag:

    Code:
    <html>
    <head>
    <title> Sample Page </title>
    <script>
    function play(clip){
    document.getElementById("frame").src= "http://www.youtube.com/v/"+clip+"&autoplay=1&rel=0";
     } 
    </script>
    </head>
    <body>
    <object width="425" height="355"><param name="movie" value=""></param><param name="wmode" value="transparent"></param><embed id ="frame" src="" type="application/x-shockwave-flash" border="1" wmode="transparent" width="425" height="344"></embed></object><br>
    <a href="#" onclick="play('6Zx39v3JUUI'); return false"> THIS IS FIRST Video Link </a><br>
    <a href="#" onclick="play('VVp0eo0vN8U'); return false"> THIS IS SECOND Video Link </a>
    </body>
    </html>

  • #3
    New Coder
    Join Date
    Dec 2011
    Location
    Detroit
    Posts
    78
    Thanks
    19
    Thanked 0 Times in 0 Posts
    I worked it out.
    thanks

  • #4
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Tim@DIM View Post
    I worked it out.
    thanks
    Can you please share how you worked it out? Did you use the above solution? Or do you have a different one?
    I'm trying to solve the same issue (in Wordpress), while keeping them as videos.
    Thanks!!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •