i'm building website youtube videos , need select tag select video gets played after current video done playing. i'd have this:
<select name="autoplay"> <option>date</option> <option>shuffle</option> <option>off</option> </select>
and once 1 selected stays selected throughout website. idea when 1 seleccted cahanges youtube video direction after video finished. videos using iframe player api once 1 select tag chosen changes link location:
<script> function onplayerstatechange(event) { if(event.data === 0) { location.href = '<?php selected autoplay location!?! ?>'; } } <script>
so exemple i'm using wordpress , have in autoplay "date select tag" "the_permalink(get_adjacent_post(false,'',true));"
next post or next video.
i'm not sure how set up.. plz if have ideas on how work out.
Comments
Post a Comment