tales
New Member
Posts: 1
inherit
244293
0
May 1, 2017 17:53:30 GMT -8
tales
1
May 2017
tales
|
Post by tales on May 1, 2017 17:39:53 GMT -8
I was wondering if there is a way to add youtube video to a thread and make it super small, as well as make it autoplay.
|
|
#eb7100
33409
0
1
Nov 13, 2024 16:56:46 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on May 2, 2017 10:01:41 GMT -8
The button on the posting page allows you to embed a video in a post and supports YouTube. You can also choose from a few preset sizes for the video. Videos don't autoplay by default but you may be able to make them do so with a code. You may also want to keep in mind that with the exception of pages where autoplaying content is to be expected (such as a page where the video is the main feature like when opening a video on YouTube) most automatically playing video and audio content is generally frowned upon in pages where it's not expected. I'm sure you can imagine the horror of hearing 15 autoplaying videos running at the exact same time on one page.
|
|
inherit
230464
0
Feb 18, 2023 17:22:41 GMT -8
mellotangelo
32
April 2016
mellotangelo
|
Post by mellotangelo on May 2, 2017 11:08:29 GMT -8
As Brian said, you definitely want to make sure not to annoy users with music playing where it shouldn't, but if you have an understanding with your members, it shouldn't be a problem.
I had a code made for me that allows you to specify which thread you want the music (via youtube video) to play in. It'll autoplay as well. All you need to do is put this code in your global header.
<div class="threadvids"></div>
<script type="text/javascript">
<!--
function threadvids(t,v){var v=v;
if(proboards.data("thread_id") && proboards.data("thread_id")==t){
$('.threadvids').html('<iframe width="1" height="1" src="http://www.youtube.com/embed/'+v+'?autoplay=1&loop=1&playlist='+v+'" frameborder="0"></iframe>');
}}
//threadvids("THREAD ID HERE","YOUTUBE VIDEO ID");
threadvids("1","youtube ID"); //EXAMPLE
-->
</script>
If you notice, every youtube video has a unique string of characters in its URL that signify that video. You need to copy and paste that code into the 'youtube video ID' area. The thread ID is which thread you want it to play for. If you check a thread, it should have a number associated with it in the URL.
I hope that helps and makes sense!
|
|