Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Autoplay video
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2021-11-14 01:30:59
ok i think i am a noob i was playing with codes until about 5-6 years ago
i put this code in functions
$s = preg_replace("/\[video\][^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\[\/video\]/ims", "<object width=\"340\" height=\"220\"><param name=\"movie\" value=\"https://www.youtube.com/v/\\1\"></param><embed src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" width=\"340\" height=\"220\"></embed></object>", $s);


The code is workiking but i am stupid and i cant manage to make it autoplay

but how the hell i make autoplay on it i have try 2 hours with code and i am so fk stupid  :mad
Last edited by djlive on 2021-11-14 01:31:57
2021-11-14 22:10:20
not sure about making it autoplay, but why would you want to do that? Imagine a post that has 5 videos all autoplaying at the same time.....I dont think thats a wise choice lol.
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2021-11-19 00:56:58
i dont want to all videos just if you want something like [auto]/[/auto]
so only if you want
i know its sheet if all video play auto
2021-11-20 14:03:09
hi djlive

at the end of the line of your <embed, <iframe <param tag you will add flashVars=“playerVars=autoPlay=yes”

Example fonctions.php:
    // [video]YouTube Vids url[/video]
      $s = preg_replace("/\[video\][^\s'\"<>]*youtube.com.*v=([^\s'\"<>]+)\[\/video\]/ims", "<paramb style=\"width:680px; height:440px;\" name=\"movie\" value=\"https://www.youtube.com/v/&autoplay=1\\1\" flashVars=“playerVars=autoPlay=yes” allowFullScreen=\"true\"></param><embed class=\"youtube\" src=\"https://www.youtube.com/v/&autoplay=1\\1\" flashVars=“playerVars=autoPlay=yes” type=\"application/x-shockwave-flash\" width=\"700\" height=\"380\"></embed>", $s);


it works for me it should be the same for you , does the same on functions file, bbcode if needed or other  :smile
Last edited by spiritblue on 2021-11-20 14:14:23
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728